RE: [PyCrust] how do you load and run the Data samples?
Brought to you by:
pobrien
From: Kevin A. <al...@se...> - 2001-08-03 16:39:55
|
Okay, the obvious next question is what is the process of copying and pasting or doing a shell.savefile() or whatever to take all or only the selected part of the shell window contents and making it into one of these runs? Minus the output of course? On a related note, should we give the shell (PyCrust) a hierarchical menu in the Debug menu of PythonCard so it has the ability to respond to some menu commands? If so, we'll need to coordinate menu ids, functions to bind, etc. ka > -----Original Message----- > From: pyc...@li... > [mailto:pyc...@li...]On Behalf Of Patrick > K. O'Brien > Sent: Friday, August 03, 2001 9:19 AM > To: pyc...@li... > Subject: RE: [PyCrust] how do you load and run the Data samples? > > > 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 > > > _______________________________________________ > PyCrust-users mailing list > PyC...@li... > http://lists.sourceforge.net/lists/listinfo/pycrust-users > |