def generate_data(input_data):						# generate experiment data and store in the data file
	data = input_data.split('\n')
	N = len(data)
	for k in xrange(N):
		n = int(data[k])
		s = generate.setup(n)
		r = generate.release(n,3)
		f = open(".\\data\\"+str(data[k]),'w')
		step = generate.jobstep(n,8,20)
		q = generate.process(step[0])
		n_job = generate.itemjobs(n,1000,2000)
		p = [generate.processtime(n_job[0],q)]
		wt = generate.weights(n,8)
		wc = generate.weights(n,6)
		for j in xrange(1,n):
			q = generate.process(step[j])
			temp = generate.processtime(n_job[j],q)
			p.append(temp)
		d = generate.due_date_r(r,p)
		for i in xrange(n):
			f.write(str(p[i])+' ' + str(r[i]) + ' ' + str(s[i]) + ' ' + str(d[i]) + ' ' + str(wt[i]) + ' ' + str(wc[i]) + '\n')
		f.close()
		print 'data_' + str(data[k]) +' '+ 'done!'
Beispiel #2
0
from distribute_setup import use_setuptools

use_setuptools()

from distutils.core import setup
import sys
import os
import generate

vlc_include_path = os.path.join("..", "..", "include", "vlc")
if not os.path.exists(vlc_include_path):
    raise Exception("This script should be run from a VLC tree.")

files = [os.path.join(vlc_include_path, filename) for filename in os.listdir(vlc_include_path)]

generate.process("vlc.py", files)

setup(
    name="python-vlc",
    version="1.1.0",
    author="Olivier Aubert",
    author_email="*****@*****.**",
    url="http://wiki.videolan.org/PythonBinding",
    py_modules=["vlc"],
    keywords=["vlc", "video"],
    license="GPL",
    description="VLC bindings for python.",
    long_description="""VLC bindings for python.

This module provides ctypes-based bindings for the native libvlc API
(see http://wiki.videolan.org/LibVLC) of the VLC video player.
from distutils.core import setup
import sys
import os
import generate

vlc_include_path = os.path.join("..","..","include","vlc")
if not os.path.exists(vlc_include_path):
    raise Exception("This script should be run from a VLC tree.")

files = [ os.path.join(vlc_include_path, filename)
          for filename in os.listdir(vlc_include_path) ]

generate.process('vlc.py', files)

setup(name='python-vlc',
      version = '1.1.0',
      author='Olivier Aubert',
      author_email='*****@*****.**',
      url='http://wiki.videolan.org/PythonBinding',
      py_modules=['vlc'],
      keywords = [ 'vlc', 'video' ],
      license = "GPL",
      description = "VLC bindings for python.",
      long_description = """VLC bindings for python.

This module provides ctypes-based bindings for the native libvlc API
(see http://wiki.videolan.org/LibVLC) of the VLC video player.

It is automatically generated from the include files.
"""
      )
Beispiel #4
0
from distutils.core import setup
import sys
import os
import generate

vlc_include_path = os.path.join("..", "..", "include", "vlc")
if not os.path.exists(vlc_include_path):
    raise Exception("This script should be run from a VLC tree.")

files = [
    os.path.join(vlc_include_path, filename)
    for filename in os.listdir(vlc_include_path)
]

generate.process('vlc.py', files)

setup(name='python-vlc',
      version='1.1.0',
      author='Olivier Aubert',
      author_email='*****@*****.**',
      url='http://wiki.videolan.org/PythonBinding',
      py_modules=['vlc'],
      keywords=['vlc', 'video'],
      license="GPL",
      description="VLC bindings for python.",
      long_description="""VLC bindings for python.

This module provides ctypes-based bindings for the native libvlc API
(see http://wiki.videolan.org/ExternalAPI) and the MediaControl API
(see http://wiki.videolan.org/PythonBinding) of the VLC video player.