[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] Condor and Python



You can install Python modules in your own directories.  Unless you change the module search path, Python will search for modules in the same directory as the script being run.  If you install your module in this directory and create an empty file called __init__.py your script will be able to import the module from that directory.  If you have a module that spans an hierarchy of directories then you will need to set up your PYTHONPATH or sys.path to include them.

In practical terms, if you are using a shared file system for submissions then install your module in the same directory as your submitted script.  Touch the __init__.py file.  Then submit your script.  If you are not using a shared file system then you will need to include all of your module files plus the __init__.py in your transfer_input_files list.  In either case, be prepared to tweak your PYTHONPATH or sys.path to ensure that the main script can find all the modules it needs.

-- 
Rich Pieri
ratinox@xxxxxxx
24-030a / (617) 452-4081