Re: How to program in Python to run system commands in 1000s of servers

2011-04-06 Thread bruce bushby
Hi Roy Two things you can look at: func https://fedorahosted.org/func/ mcollective http://docs.puppetlabs.com/mcollective/ On Wed, Apr 6, 2011 at 2:24 AM, Roy Smith wrote: > In article , > geremy condra wrote: > > > On Tue, Apr 5, 2011 at 7:51 AM, Babu wrote: > > > > > > Here is my pr

python 2.7.1 "serial" vs "pyserial"

2011-03-25 Thread bruce bushby
Hi Is there any difference between the "serial" module in Python 2.7.1 and "pyserial 2.5" ? I can "import serial" without any issuesbut when I follow code examples my scripts complain: "TypeError: readline() takes no keyword arguments" However lots of scripts "import serial" and then "ser.re

readline module (python: symbol 'tgetnum': can't resolve symbol)

2011-03-23 Thread bruce bushby
Hi I'm hoping the list could give me some insight into how python behaves when it has been compiled with "readline". I sent the following email to the uClibc list which describes my problem, any tips or pointers would be much appreciated! Thanks Bruce Using buildroot, I am able to co

Re: Validating Command Line Options

2011-03-23 Thread bruce bushby
optparse? http://docs.python.org/library/optparse.html if options.a and options.b: parser.error("options -a and -b are mutually exclusive") On Wed, Mar 23, 2011 at 2:10 PM, T wrote: > For a Python script with multiple command line options, what is the > best way to go about validating th

Re: file print extra spaces

2011-03-22 Thread bruce bushby
Run your script and "pipe" the output to "| od -c" the octal dumper will show you what characters you're printing.I'm guessing python's "print" is adding one and each line in your file contains another. You can also use a "," in python I forget the exact syntax, something like "print(line

Re: organizing many python scripts, in a large corporate environment.

2011-03-14 Thread bruce bushby
I'm probably going off on a tangent here..but has anybody seen any efforts to allow python to "import modules via a socket" ...rather then just a "dir path" ? On Mon, Mar 14, 2011 at 7:56 PM, eryksun () wrote: > On Monday, March 14, 2011 9:45:51 AM UTC-4, eryksun () wrote: > > > > If you

embedded python 2.7.1 slow startup

2011-03-08 Thread bruce bushby
Hi I've been playing with running python on embedded linux. I thought I would run some "straces" to see how the install went when I noticed python attempts to "open" loads of files that don't exist.is there a way to prevent these "open" attemptsthey're responsible for 40% of my scripts exe