Parse command line output using textfsm

2012-06-21 Thread Ferdinand Sousa
Hi List, I am using python to run command line utilities on Linux machine. I came across textfsm and feel that it fits my requirements. Here is the structure of the output from the 2 utilities Command 1: Id AddressPort Location State Tenant count Max tenants Description -- --

Re: strange dict issue

2009-01-12 Thread Ferdinand Sousa
James First off, the computer is always right :-) > {'value': 'Route66', 'key': 'NAME'} > > > > Yet when the second line of my code throws an error saying the key 'NAME' > doesn't exist. > If you look carefully the key NAME indeed does not exist. The dictionary contains 2 key-value pairs. This

Re: Python-list Digest, Vol 64, Issue 617

2009-01-28 Thread Ferdinand Sousa
> > Secondly, it has no way to display the image drawn on. Is it possible, or >>> do >>> I have to pass the image off to another module's methods? >> >> im.show() this will display the image (and any modification(s) made to it) > >> Example: Draw a Grey Cross Over an Image >> import Image, ImageDr

Varibles -- copies and references

2009-02-02 Thread Ferdinand Sousa
Hi Some weeks back I had been following the thread "Why can't assign to function call". Today, I saw the "function scope" thread, and decided I should ask about the behaviour below: >>> # Simple variables >>>p=55 >>> q=p >>> q

Re: Varibles -- copies and references

2009-02-03 Thread Ferdinand Sousa
People get a confused because if you pass a mutable object inside a def function and mutate that object the changes /are/ propagated outside-- because now you have a name inside the function and a name outside the object both pointing to the same object. Since tuples are immutable, I guess pass

COM and threading, "CoInitialize"?

2009-02-10 Thread Ferdinand Sousa
Greetings to list members, I am trying to use an Acrobat COM object in a class that is subclassed from threading.Thread. Since threading.Thread is subclassed, the __init__ method of the inheriting class must explicitly call the threading.Thread.__init__ method of the parent. I guess I'm missing so

Transferring a file over sockets

2008-12-17 Thread Ferdinand Sousa
I am using sockets to transfer a file over LAN. There are 2 scripts, the server opens a listens for connection and the client is run on another machine. I always make sure the server is run first. The strange thing is that if the the server script is double-clicked and executed (run in a console wi