RE: [PyCrust] how do you load and run the Data samples?
Brought to you by:
pobrien
From: Patrick K. O'B. <po...@or...> - 2001-08-03 16:25:23
|
shell.runfile('Data\PythonTutorial.py') This is something fun I was toying with. PythonTutorial.py is a series of commands, such as one would enter in the shell directly. I actually lifted them directly from Guido's tutorial. runfile() runs through all the commands and pushes them into the editor. So it kind of simulates an actual user session except that the shell results are real live results from the interpreter. If runfile() finds any command intended for the shell - shell.whatever() - it runs those "silently" so that you can build into the tutorial.py file things like shell.clear() and shell.pause() and such to interact with the user during the tutorial. This isn't really complete. But the basics are there and it did force me to support pushing commands to the interpreter recursively, which was a bit of a mind-bender. I think this could be extended to do some wild stuff. So, for PythonCard, you could create tutorials that would demonstrate, live, how to mess with stuff from the shell. --- Patrick K. O'Brien Orbtech "I am, therefore I think." -----Original Message----- From: pyc...@li... [mailto:pyc...@li...]On Behalf Of Kevin Altis Sent: Friday, August 03, 2001 10:41 AM To: pyc...@li... Subject: [PyCrust] how do you load and run the Data samples? There is a Data directory in the distribution with: PyCrustTutorial.py PythonTutorial.py How can these be loaded and run from within PyCrust? ka _______________________________________________ PyCrust-users mailing list PyC...@li... http://lists.sourceforge.net/lists/listinfo/pycrust-users |