1
2 """
3 Collection of python modules for scheduling and running Grid IceTray based jobs in
4 a grid environment
5
6 @version: trunk
7 @date: mar ago 26 16:16:30 CDT 2008
8 @author: Juan Carlos Diaz Velez <juancarlos@icecube.wisc.edu>
9 """
10 import os
11 import os.path
12 from os.path import join,expandvars
13 from ConfigParser import SafeConfigParser
14
15 __version__ = 'trunk'
16
17
18 -def zipfile(fmt= "iceprod-%(version)s"):
19 vars = {'version':__version__, 'platform':os.uname()[0],'arch': os.uname()[4]}
20 return fmt % vars
21
22
23 -def mktar(rootdir,module,outfile,mode='w'):
24 curdir = os.getcwd()
25 os.chdir(rootdir)
26 if mode == 'a':
27 os.system("zip -q -g -r %s.zip %s -i \*.py" % (outfile,module))
28 else:
29 os.system("zip -q -r %s.zip %s -i \*.py" % (outfile,module))
30 os.chdir(curdir)
31
32 apr1 = [65,108,108,32,119,111,114,107,32,97,110,100,32,110,111,32,112,108,
33 97,121,32,109,97,107,101,115,32,74,97,99,107,32,97,32,100,117,108,
34 108,32,98,111,121,46,32,10,9]
35