Re: [Tutor] Telnet to cisco device

2006-02-27 Thread Hugo González Monteverde
Hi Gideon, Seems that you're looking for some prompts, but are you sure they are presented as such from the server? For example, your password prompt has a space after the colon: > tn.read_until('Password: ') #expected prompt after putting in the username Have you tested what you are supposed

[Tutor] Telnet to cisco device

2006-02-27 Thread STREET Gideon (SPARQ)
Title: Telnet to cisco device Hi all, I'm trying to get a script together to automate adding a couple of commands across a lot of cisco switches.  Thought I'd try to get the script working correctly on one switch first.  I've been reading a few online tutorials and have managed to kludge up

Re: [Tutor] New Tutorial topic available

2006-02-27 Thread ->Terry<-
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yesterday (Feb 26, 2006) at 9:04pm, Mark Thomas spoke these wise words: - ->On 2/26/06, Alan Gauld <[EMAIL PROTECTED]> wrote: - ->> I've just uploaded the latest tutorial topic covering inter-process - ->> communications. It covers pipes and the use

Re: [Tutor] Converting MAC address . Need Help

2006-02-27 Thread Travis Spencer
On 2/27/06, Kent Johnson <[EMAIL PROTECTED]> wrote: > This is not what Sudarshana asked for - '\\x00' and '\x00' are not the > same string Thanks for clearning that up for me, Kent. -- Regards, Travis Spencer ___ Tutor maillist - Tutor@python.org ht

Re: [Tutor] Converting MAC address . Need Help

2006-02-27 Thread Kent Johnson
Travis Spencer wrote: > On 2/27/06, Kent Johnson <[EMAIL PROTECTED]> wrote: > >>Sudarshana KS wrote: >> >>>The problem i am facing is the mac address i have is in the form >>>00:11:22:33:44:55 need to convert to '\x00\x11\x22\x33\x44\x55' > > > Perhaps I'm mistaking but it seems that you need to

Re: [Tutor] Converting MAC address . Need Help

2006-02-27 Thread Travis Spencer
On 2/27/06, Kent Johnson <[EMAIL PROTECTED]> wrote: > Sudarshana KS wrote: > > The problem i am facing is the mac address i have is in the form > > 00:11:22:33:44:55 need to convert to '\x00\x11\x22\x33\x44\x55' Perhaps I'm mistaking but it seems that you need to prepend the `\x' escape sequence t

Re: [Tutor] RDT server for excel

2006-02-27 Thread Danny Yoo
On Mon, 27 Feb 2006, [ISO-8859-1] J�nos Juh�sz wrote: > I would like to make a small RDT Server as COM Server in python that can > be called from excel as =RDT("StockBalance.MyServer",,"17") I'v > tried to use google, but with not too much success. I just would like a > simple sample. Hi Ja

Re: [Tutor] RDT server for excel

2006-02-27 Thread Bob Gailer
János Juhász wrote: > Hi All, > > I would like to make a small RDT Server as COM Server in python that can be > called from excel as =RDT("StockBalance.MyServer",,"17") > I for one have no idea what RDT is, so can't help. Maybe someone else has an idea. Or can you give us more information o

[Tutor] RDT server for excel

2006-02-27 Thread János Juhász
Hi All, I would like to make a small RDT Server as COM Server in python that can be called from excel as =RDT("StockBalance.MyServer",,"17") I'v tried to use google, but with not too much success. I just would like a simple sample. Yours sincerely, __ János Juhász

Re: [Tutor] Converting MAC address . Need Help

2006-02-27 Thread Kent Johnson
Sudarshana KS wrote: > > Hi, > > I am using scapy for writing a dhcp client. > > The problem i am facing is the mac address i have is in the form > 00:11:22:33:44:55 need to convert to '\x00\x11\x22\x33\x44\x55' > Please help me out with this problem. The chaddr field in dhcp ( SCAPY) > requir

[Tutor] Converting MAC address . Need Help

2006-02-27 Thread Sudarshana KS
Hi, I am using scapy for writing a dhcp client. The problem i am facing is the mac address i have is in the form 00:11:22:33:44:55 need to convert to '\x00\x11\x22\x33\x44\x55' Please help me out with this problem. The chaddr field in dhcp ( SCAPY) requires '\x00\x11\x22\x33\x44\x55'  format.

Re: [Tutor] Finding items in a list

2006-02-27 Thread Hugo González Monteverde
As others have said, a concrete example would be great. For the time being, sounds like maybe regular expressions could do it. We don't know if your data is already in a list of small strings, or if it is just a huge string. Take a look here for an intro to RE, though: http://www.amk.ca/python

Re: [Tutor] list packing

2006-02-27 Thread Kent Johnson
kevin parks wrote: > John, > > Thanks... i am liking this variation a tad more since it means i only > have to type the path in one place but it is akin to your second > one... i was (still am really) having a hard time understanding > how to apply path.join _and_ listdir sometimes list

Re: [Tutor] list packing

2006-02-27 Thread Kent Johnson
Sean Perry wrote: > os.path.join() is self-documenting. I find this to be a better reason to > use it than anything else. But then my code only ever runs on Unix of > some flavor. I'm not sure why you put in the comment about Unix - os.path.join() is the recommended way of joining paths portabl

Re: [Tutor] list packing

2006-02-27 Thread kevin parks
John, Thanks... i am liking this variation a tad more since it means i only have to type the path in one place but it is akin to your second one... i was (still am really) having a hard time understanding how to apply path.join _and_ listdir sometimes list comprehensions twist my brain b