Execute commands from file
Steve Holden
steve at holdenweb.com
Wed May 16 09:26:19 EDT 2007
tmp123 wrote:
> Hello,
>
> Thanks for your time.
>
> We have very big files with python commands (more or less, 500000
> commands each file).
>
Those are BIG programs. Presumably other programs are writing them?
> It is possible to execute them command by command, like if the
> commands was typed one after the other in a interactive session?
>
You need to look for "pdb", the interactive Python debugger. This is
capable of single-step operations, and supports breakpoints.
> ( Better using command flags than with an small script like "while 1:
> input()" )
>
> Thanks a lot.
>
You are pretty much going to have to run pdb then trigger your code by
calling a pdb method with a function in your code as an argument, if I
am remembering correctly how it works.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
------------------ Asciimercial ---------------------
Get on the web: Blog, lens and tag your way to fame!!
holdenweb.blogspot.com squidoo.com/pythonology
tagged items: del.icio.us/steve.holden/python
All these services currently offer free registration!
-------------- Thank You for Reading ----------------
More information about the Python-list
mailing list