"B G" <compbiocancerresearc...@gmail.com> wrote

I'm trying to analyze thousands of different cancer datasets and run the same python program on them. I use Windows XP, Python 2.7 and the IDLE
interpreter.


First thing: Don;t use IODLE as your interpreter. IDLE is a
development environment that should not be used for running
code in "production" type environments. Python is the interoreter,
use it directly.

I already have the input files in a directory and I want to
learn the syntax for the quickest way to execute the program over all these
datasets.

If the script take a filename as an input parameter you can likely do

python myfile.py *.*

from the OS command prompt.

Or in MacOS or Windows select all the files in Explorer and drag them onto
your script. I suspect most Linux desktops will allow the same.

Or you could write a second python script that traverses the files in your folder and calls a function which contains your code (recall that a python
file can be impoerted as a module into another python file...)

Just some ideas,

--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to