Re: [Tutor] Pythonic way to normalize vertical whitespace

2009-05-08 Thread Kent Johnson
On Fri, May 8, 2009 at 1:03 PM, wrote: > Note: Following cross-posted to python-list where it got queued due to > suspicious subject line. > > I'm looking for suggestions on technique (not necessarily code) about the > most pythonic way to normalize vertical whitespace in blocks of text so that >

Re: [Tutor] glob paramiko

2009-05-08 Thread Kent Johnson
On Fri, May 8, 2009 at 3:50 PM, Matt Herzog wrote: > localpath = glob.glob("*.tab") > > for blob in localpath: >        sftp.put(blob, filepath) > sftp.close() > transport.close() > > This fails. I have forgotten most of what I knew, I guess. How does it fail? Again, the full traceback and error

Re: [Tutor] Optparse question: if only certain values are acceptable

2009-05-08 Thread Terry Carroll
On Sat, 9 May 2009, Sander Sweers wrote: > Is the below what you are looking for? It's exactly what I was looking for. Thanks very much. Now I'm going to have to re-read the docs and see why I couldn't pick that up from them. ___ Tutor maillist -

Re: [Tutor] Optparse question: if only certain values are acceptable

2009-05-08 Thread Sander Sweers
2009/5/9 Terry Carroll : > In otherwords, if the user enters: > >  progname -f X > > It runs, producing its output in format X.  Similar if "Y" or "Z" is > specified instead of "X". > > But if the user specifies > >  progname -f A > > I want it to spit up because A is not a recognized format. Is t

[Tutor] Optparse question: if only certain values are acceptable

2009-05-08 Thread Terry Carroll
I'm tryng to use optparse for the first time. The toy summary is that I want to have the following command format: prognam -f FORMAT Where FORMAT, if specified, must be one of "X", "Y", or "Z". In otherwords, if the user enters: progname -f X It runs, producing its output in format X. Sim

Re: [Tutor] Pythonic way to normalize vertical whitespace

2009-05-08 Thread bob gailer
pyt...@bdurham.com wrote: Note: Following cross-posted to python-list where it got queued due to suspicious subject line. I'm looking for suggestions on technique (not necessarily code) about the most pythonic way to normalize vertical whitespace in blocks of text so that there is never more

Re: [Tutor] glob paramiko

2009-05-08 Thread Kent Johnson
On Fri, May 8, 2009 at 2:56 PM, Matt Herzog wrote: > On Fri, May 08, 2009 at 02:30:22PM -0400, Kent Johnson wrote: >> On Fri, May 8, 2009 at 1:04 PM, Matt Herzog wrote: >> > Hey All. >> > >> > All I need to do in this script is scp or sftp a bunch of files to a >> > remote server. This script wi

Re: [Tutor] glob paramiko

2009-05-08 Thread Matt Herzog
On Fri, May 08, 2009 at 02:30:22PM -0400, Kent Johnson wrote: > On Fri, May 8, 2009 at 1:04 PM, Matt Herzog wrote: > > Hey All. > > > > All I need to do in this script is scp or sftp a bunch of files to a remote > > server. This script will run from a cron job eventually. > > > > For whatever rea

Re: [Tutor] glob paramiko

2009-05-08 Thread Kent Johnson
On Fri, May 8, 2009 at 1:04 PM, Matt Herzog wrote: > Hey All. > > All I need to do in this script is scp or sftp a bunch of files to a remote > server. This script will run from a cron job eventually. > > For whatever reason, paramiko can't cope with a list. > > --

[Tutor] glob paramiko

2009-05-08 Thread Matt Herzog
Hey All. All I need to do in this script is scp or sftp a bunch of files to a remote server. This script will run from a cron job eventually. For whatever reason, paramiko can't cope with a list. --- AttributeError

[Tutor] Pythonic way to normalize vertical whitespace

2009-05-08 Thread python
Note: Following cross-posted to python-list where it got queued due to suspicious subject line. I'm looking for suggestions on technique (not necessarily code) about the most pythonic way to normalize vertical whitespace in blocks of text so that there is never more than 1 blank line between paragr

Re: [Tutor] Need help with registry access

2009-05-08 Thread Tim Golden
ALAN GAULD wrote: The _winreg module is part of the standard library and provides functions for accessing the Windows registry. There's some (incomplete) help here, but as Alan said, you need to learn Python to some extent before trying to do this. http://timgolden.me.uk/python-on-windows/pro

Re: [Tutor] Need help with registry access

2009-05-08 Thread ALAN GAULD
Always use ReplyAll to include the mailing list. The _winreg module is part of the standard library and provides functions for accessing the Windows registry. But you need to learn enough about Python to be able to use modules and functions. You will also need to know enough about Windows in