Package madgraph :: Package iolibs :: Module files
[hide private]
[frames] | no frames]

Module files

source code

Methods and classes dealing with file access.

Functions [hide private]
 
read_from_file(filename, myfunct, *args, **opt)
Open a file, apply the function myfunct (with sock as an arg) on its content and return the result.
source code
 
write_to_file(filename, myfunct, *args)
Open a file for writing, apply the function myfunct (with sock as an arg) on its content and return the result.
source code
 
append_to_file(filename, myfunct, *args)
Open a file for appending, apply the function myfunct (with sock as an arg) on its content and return the result.
source code
 
is_uptodate(picklefile, path_list=None, min_time=1300120445)
Check if the pickle files is uptodate compare to a list of files.
source code
 
format_path(path)
Format the path in local format taking in entry a unix format
source code
 
cp(path1, path2, log=True)
simple cp taking linux or mix entry
source code
 
mv(path1, path2)
simple mv taking linux or mix format entry
source code
 
ln(file_pos, starting_dir='.', name='', log=True)
a simple way to have a symbolic link whithout to have to change directory starting_point is the directory where to write the link file_pos is the file to link WARNING: not the linux convention
source code
Variables [hide private]
  logger = logging.getLogger('madgraph.files')
  __package__ = 'madgraph.iolibs'
Function Details [hide private]

read_from_file(filename, myfunct, *args, **opt)

source code 

Open a file, apply the function myfunct (with sock as an arg) on its content and return the result. Deals properly with errors and returns None if something goes wrong.

write_to_file(filename, myfunct, *args)

source code 

Open a file for writing, apply the function myfunct (with sock as an arg) on its content and return the result. Deals properly with errors and returns None if something goes wrong.

append_to_file(filename, myfunct, *args)

source code 

Open a file for appending, apply the function myfunct (with sock as an arg) on its content and return the result. Deals properly with errors and returns None if something goes wrong.

is_uptodate(picklefile, path_list=None, min_time=1300120445)

source code 

Check if the pickle files is uptodate compare to a list of files. If no files are given, the pickle files is checked against it' current directory