Re: [Tutor] Use flag to exit?

2010-06-25 Thread ALAN GAULD
> But I usually prefer to run the programs I write > in an IDE's shell, unless they are GUI's, of course. Why? That seems like a real pain to me! > What are my options for running my > scripts outside of an IDE? Double click them in Windows explorer. Put a shortcut on your desktop. All the

Re: [Tutor] Use flag to exit? (OT - PEP 8 Gripe)

2010-06-25 Thread Emile van Sebille
On 6/25/2010 1:33 AM ALAN GAULD said... Copy and pasting is a PITA. Why would you want to copy and paste? Because it makes it easy to work on code. My preferred editor (TextPad) allows block selection of indented text such that I can copy and paste functions and methods into the python CLI

Re: [Tutor] Use flag to exit? (OT - PEP 8 Gripe)

2010-06-25 Thread Steve Willoughby
On 25-Jun-10 08:23, Emile van Sebille wrote: On 6/25/2010 1:33 AM ALAN GAULD said... Copy and pasting is a PITA. Why would you want to copy and paste? Because it makes it easy to work on code. My preferred editor (TextPad) allows block selection of indented text such that I can copy and past

Re: [Tutor] Use flag to exit? (OT - PEP 8 Gripe)

2010-06-25 Thread Emile van Sebille
On 6/25/2010 9:08 AM Steve Willoughby said... On 25-Jun-10 08:23, Emile van Sebille wrote: On 6/25/2010 1:33 AM ALAN GAULD said... Copy and pasting is a PITA. Why would you want to copy and paste? Because it makes it easy to work on code. My preferred editor (TextPad) allows block selection

Re: [Tutor] Use flag to exit? (OT - PEP 8 Gripe)

2010-06-25 Thread Richard D. Moores
On Fri, Jun 25, 2010 at 09:48, Emile van Sebille wrote: > On 6/25/2010 9:08 AM Steve Willoughby said... >> >> On 25-Jun-10 08:23, Emile van Sebille wrote: >>> >>> On 6/25/2010 1:33 AM ALAN GAULD said... > > Copy and pasting is a PITA. Why would you want to copy and paste? >>> >>>

[Tutor] Running external commands from Python

2010-06-25 Thread Randy Kao
Hi all, I'm a newbie to Python (switching from Perl) and had a question about the best way to run external commands in Python. In doing some reading I'm confused about which is the best way to accomplish this. With Perl, the way I went about running commands was by opening a filehandle and parsi

Re: [Tutor] Running external commands from Python

2010-06-25 Thread Luke Paireepinart
Subprocess module is the preferred strategy when You want to communicate with the command you're running. If not, you can use os.system. Sent from my iPhone On Jun 25, 2010, at 5:46 PM, Randy Kao wrote: > Hi all, > > I'm a newbie to Python (switching from Perl) and had a question about the >

Re: [Tutor] Running external commands from Python

2010-06-25 Thread Steven D'Aprano
On Sat, 26 Jun 2010 08:46:17 am Randy Kao wrote: > Hi all, > > I'm a newbie to Python (switching from Perl) and had a question about > the best way to run external commands in Python. [...] > through: os.popen, os.popen2, os.popen3, os.system, > commands.getoutput() os.system is the oldest way, a

Re: [Tutor] Running external commands from Python

2010-06-25 Thread David Hutto
On Fri, Jun 25, 2010 at 8:16 PM, Steven D'Aprano wrote: > On Sat, 26 Jun 2010 08:46:17 am Randy Kao wrote: >> Hi all, >> >> I'm a newbie to Python (switching from Perl) and had a question about >> the best way to run external commands in Python. > [...] >> through: os.popen, os.popen2, os.popen3,

Re: [Tutor] Running external commands from Python

2010-06-25 Thread Luke Paireepinart
On Fri, Jun 25, 2010 at 7:48 PM, David Hutto wrote: > On Fri, Jun 25, 2010 at 8:16 PM, Steven D'Aprano wrote: >> On Sat, 26 Jun 2010 08:46:17 am Randy Kao wrote: >>> Hi all, >>> >>> I'm a newbie to Python (switching from Perl) and had a question about >>> the best way to run external commands in

Re: [Tutor] Running external commands from Python

2010-06-25 Thread Randy Kao
Thanks for the great and quick feedback from everyone! That definitely clears things up. -Randy On Fri, Jun 25, 2010 at 5:16 PM, Steven D'Aprano wrote: > On Sat, 26 Jun 2010 08:46:17 am Randy Kao wrote: > > Hi all, > > > > I'm a newbie to Python (switching from Perl) and had a question about >

Re: [Tutor] Running external commands from Python

2010-06-25 Thread David Hutto
On Fri, Jun 25, 2010 at 9:37 PM, Randy Kao wrote: > Thanks for the great and quick feedback from everyone! > That definitely clears things up. > -Randy > On Fri, Jun 25, 2010 at 5:16 PM, Steven D'Aprano > wrote: >> >> On Sat, 26 Jun 2010 08:46:17 am Randy Kao wrote: >> > Hi all, >> > >> > I'm a n

Re: [Tutor] Running external commands from Python

2010-06-25 Thread Luke Paireepinart
On Fri, Jun 25, 2010 at 8:43 PM, David Hutto wrote: > On Fri, Jun 25, 2010 at 9:37 PM, Randy Kao wrote: >> Thanks for the great and quick feedback from everyone! >> That definitely clears things up. >> -Randy > > And I was like...me too. Just to clarify, it looks like subprocess is intended to r

Re: [Tutor] Use flag to exit? (OT - PEP 8 Gripe)

2010-06-25 Thread Dave Angel
Richard D. Moores wrote: On Fri, Jun 25, 2010 at 09:48, Emile van Sebille wrote: On 6/25/2010 9:08 AM Steve Willoughby said... On 25-Jun-10 08:23, Emile van Sebille wrote: On 6/25/2010 1:33 AM ALAN GAULD said... Copy and pasting is a PITA. Why would you

Re: [Tutor] Use flag to exit? (OT - PEP 8 Gripe)

2010-06-25 Thread Richard D. Moores
On Fri, Jun 25, 2010 at 23:08, Dave Angel wrote: > Do you activate Quick-Edit mode in your DOS box?  Once you have that on, > it's not much of a pain to copy and paste, as long as what you're copying > fits a rectangle. Yes, it's on. I agree that copying is easy, but if I can't use Ctrl+V, pastin

Re: [Tutor] Use flag to exit? (OT - PEP 8 Gripe)

2010-06-25 Thread Dave Angel
Richard D. Moores wrote: On Fri, Jun 25, 2010 at 23:08, Dave Angel wrote: Do you activate Quick-Edit mode in your DOS box? Once you have that on, it's not much of a pain to copy and paste, as long as what you're copying fits a rectangle. Yes, it's on. I agree that copying is easy, bu