Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > command line or idle?

Reply
Thread Tools

command line or idle?

 
 
sjf
Guest
Posts: n/a
 
      09-23-2003
Is it possible to distinguish if script is running on python command line
(python.exe) or IDLE?


--
regards,
sjf
 
Reply With Quote
 
 
 
 
Bob Gailer
Guest
Posts: n/a
 
      09-23-2003
At 07:17 AM 9/23/2003, sjf wrote:

>Is it possible to distinguish if script is running on python command line
>(python.exe) or IDLE?


search archive; several threads on this recently.


Bob Gailer
http://www.velocityreviews.com/forums/(E-Mail Removed)
303 442 2625


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.506 / Virus Database: 303 - Release Date: 8/1/2003

 
Reply With Quote
 
 
 
 
Alex Martelli
Guest
Posts: n/a
 
      09-23-2003
sjf wrote:

> Is it possible to distinguish if script is running on python command line
> (python.exe) or IDLE?


Not in entirely reliable way, but there are many hints you can generally
rely on. For example, in the IDLE "Python Shell" sys.stdout is an
instance of idlelib.rpc.RPCProxy (in IDLE 1.0) -- that MIGHT happen
even "on python command line", of course, but it is not very likely to.


Alex

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Command line option syntax error. Type Command /? for Help chuckcar Computer Support 11 04-21-2009 09:59 PM
Re: Command line option syntax error. Type Command /? for Help Evan Platt Computer Support 1 04-18-2009 10:17 PM
Run Unix shell command $ parse command line arguments in python rkoida@yahoo.com Python 4 04-23-2005 04:42 AM
Need simple command for validating xml files at the command line Bernd Oninger XML 1 07-07-2004 06:20 PM
RUN/execute a Command-Line command from an ASP page. Lucas Cowald ASP .Net 4 10-23-2003 11:09 AM



Advertisments