Re: Newbie: executing a system command from my Python app

2005-12-14 Thread Magnus Lycka
Dan M wrote: > Have done so. Thanks for pointing out the shutils module! I keep finding > more and more excellent modules available. Do we have a Python equivalent > to Perl's CPAN? See http://www.python.org/pypi -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie: executing a system command from my Python app

2005-12-13 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Dan M <[EMAIL PROTECTED]> wrote: (quoting someone) > > 4. If you only have one argument, you don't need a tuple > > for string formatting. > > 5. "(dateYest)" is not a tuple anyway--the parentheses are > > superfluous 6. Single item tuples can be created with "(ani

Re: Newbie: executing a system command from my Python app

2005-12-13 Thread Dan M
> Few points points: > > 1. Generally: I would try to minimize system calls. They make your code less > portable. Excellent point. In this case the app will never live anywhere other than one specific FreeBSD machine, but I do appreciate the value of the advice anyway. Therefore... > 2. Look

Re: Newbie: executing a system command from my Python app

2005-12-13 Thread mwilliams
You may also look into the PExpect modules as well. If you're that's truly what you wish to do. Regards, Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie: executing a system command from my Python app

2005-12-12 Thread James Stroud
Dan M wrote: > I'm writing a Python replacement for a particularly ugly shell script. we > are running mimedefang on our mail server, moving spam and virus messages > to a quarantine directory. This little python script successfully chdir's > to the quarantine directory, identifies all of the quara

Re: Newbie: executing a system command from my Python app

2005-12-12 Thread Dan M
On Mon, 12 Dec 2005 13:25:14 -0800, Dan M wrote: > I'm writing a Python replacement for a particularly ugly shell script. we > are running mimedefang on our mail server, moving spam and virus messages > to a quarantine directory. This little python script successfully chdir's > to the quarantine d

Newbie: executing a system command from my Python app

2005-12-12 Thread Dan M
I'm writing a Python replacement for a particularly ugly shell script. we are running mimedefang on our mail server, moving spam and virus messages to a quarantine directory. This little python script successfully chdir's to the quarantine directory, identifies all of the quarantine subdirectories