| Hello André- 90% of the program is the user interface. The actually running of the program is just spawning a Python process. I do a little bit of magic to allow multi-file programs that I discuss below, but basically it's just popen(). Regarding the "stop" button, that is just killing the process. And the ">>>" button, is just adding the command line option to Python: -i : inspect interactively after running script Regarding the magic I do before running a script, if there exits a file named main.py in the current or parent folder, then that is run instead of the current script. And the first argument on the command line is the current script's file name. This allows me to write multi-file programs, but it also allows me to do funny things like pre-load certain libraries and add them to __built_in__ or to execute the user's script in a testing framework which I do for a tutorial. I haven't made these things ready for release due to time, but having the main.py file that can "override" the execution of these scripts turned out to be very handy. -winston On Jan 20, 2006, at 10:48 AM, Andre Roberge wrote:
______________________________________________________ winston wolff - (646) 827-2242 - http://www.stratolab.com learning by creating - video game courses for kids in new york |
_______________________________________________ Edu-sig mailing list [email protected] http://mail.python.org/mailman/listinfo/edu-sig
