[Pythonmac-SIG] More on stdin and python scripts in BBEdit and TextWrangler

Louis Pecora pecora at anvil.nrl.navy.mil
Fri Mar 4 19:40:16 CET 2005


I contacted the software company for BBEdit and TextWrangler re:  my 
problem with using stdin (e.g raw_input) when running a script from 
within the program (Unix Output window,  not a terminal run window).   
Several people were interested so I thought I'd post the reply:

scripts which are run directly within BBEdit cannot read from STDIN. 

In order to accomplish that, you'll need to either run them in the Terminal, or within a BBEdit shell worksheet (File -> New -> Shell Worksheet). 

(If you haven't used shell worksheets before, and don't require a fully interactive terminal session, you might want to give them a try, as they can be quite handy.)

------
The worksheet seems to solve that problem, but it does not enable me to use TextWrangler or BBEdit as an IDE-type environment.  In fact what I want to do won't even work in the terminal window.  I have some simple functions that require interactive use, i.e. Apple events (e.g. file open and saves using EasyDialogs).  Using them terminates the program in a terminal, a python session (with the >>> prompt), or a worksheet with the message:

MacOS.Error: (-1713, 'no user interaction is allowed')


Sigh.  Back to MacPython IDE.  Seems to be the only option.

Thanks for the feedback from many people. 

-- 
Cheers,

Lou Pecora

Code 6362
Naval Research Lab
Washington, DC  20375
USA
Ph:  +202-767-6002
email:  pecora at anvil.nrl.navy.mil



More information about the Pythonmac-SIG mailing list