[Boa Constr] Re: Boa files modified to support -s command line switch
Status: Beta
Brought to you by:
riaan
From: Riaan B. <riaan@e.co.za> - 2001-06-29 21:50:27
|
Hi Patrick, the changes are booked into CVS go get them ;) "Patrick K. O'Brien" wrote: > > Attached are three modified files. (I'm pretty sure I started with the > latest versions - Boa 0.0.9) The files have been changed to allow the > command line switch -s to execute the PYTHONSTARTUP (or BOASTARTUP) script > when Boa starts, just like IDLE. The key thing is that the startup scripts > need to execute in the shell interpreter's namespace. I borrowed the basic > technique from IDLE and modified it to fit the coding conventions used in > Boa. Thanks for the fix! > > These changes were tested with a good startup script as well as one that had > an error. Boa loads gracefully in either case and reports the error if there > is one. I also tried it with the -D filename debugging option and the > startup stuff was ignored. I'm not sure why. I'll leave it up to Riaan to > decide if that is appropriate behavior or not. I did NOT test it with the -T > option. It now works. > > One difference that I found between my implementation and IDLE's concerns > print statements within the startup script. In IDLE, print statements in the > startup script appear in the shell itself, whereas in Boa the same print > statements appear in the Python console. Again, I'll defer to Riaan on this > issue. This was fixed neatly, see the source ;) > > Here is an example of running Boa with the -s switch: > > C:\Python21\python.exe C:\Code\boa\Boa.py -s > > You can also run it from a Windows shortcut or menu (but not from a DOS > prompt) with just the following: > > C:\Code\boa\Boa.py -s > > If there is a better way to submit patches like this, please let me know. If The best place would be here (SF submit new patch): http://sourceforge.net/tracker/?func=add&group_id=1909&atid=301909 and a message to the mailing list with a link of the new patch url. Direct to me is also fine. The mailing list is not the ideal place for attaching patches, but MUCH better than not sending them at all ;) > you think my code sucks, let me know that as well. <grin> Not at all! Although I did change it a little. Thanks for the patch and the suggestion, I'm using it now too :) > > --- > Patrick K. O'Brien > Orbtech > "I am, therefore I think." > > ------------------------------------------------------------------------ > Name: CommandLine.html > CommandLine.html Type: Hypertext Markup Language (text/html) > Encoding: quoted-printable > > Name: ShellEditor.py > ShellEditor.py Type: Plain Text (text/plain) > Encoding: quoted-printable > > Name: Boa.py > Boa.py Type: Plain Text (text/plain) > Encoding: quoted-printable -- Riaan Booysen ___________________________________________________ Boa Constructor - RAD GUI building IDE for wxPython http://boa-constructor.sourceforge.net |