Re: [Tutor] Need to be able to accept Page Down or CTRL-E

2013-02-01 Thread Dave Wilder
-Original Message- From: Tutor [mailto:tutor-bounces+d.wilder=f5@python.org] On Behalf Of Dave Angel Sent: Friday, February 01, 2013 7:38 AM To: tutor@python.org Subject: Re: [Tutor] Need to be able to accept Page Down or CTRL-E On 02/01/2013 03:34 AM, Alan Gauld wrote: snip

[Tutor] Need to be able to accept Page Down or CTRL-E

2013-01-31 Thread Dave Wilder
Hello, In a script I am writing, I would like to be able to accept the PAGE DOWN key as an input as well as the arrow keys. Is that possible w/ Python (I am using python 2.7.3 and Linux OS)? If so, could someone point me to documentation on how to do that? I have done things like this

Re: [Tutor] Need to be able to accept Page Down or CTRL-E

2013-01-31 Thread Dave Wilder
On 01/31/2013 09:43 PM, Dave Wilder wrote: Hello, In a script I am writing, I would like to be able to accept the PAGE DOWN key as an input as well as the arrow keys. Is that possible w/ Python (I am using python 2.7.3 and Linux OS)? If so, could someone point me to documentation

[Tutor] Question on re.findall usage

2013-01-28 Thread Dave Wilder
Hello, I am trying using re.findall to parse the string below and then create a list from the results. junk_list = 'tmsh list net interface 1.3 media-ca \rpabilities\r\nnet interface 1.3 {\r\nmedia-capabilities {\r\nnone\r\nauto\r\n 4SR4-FD\r\n 10T-HD\r\n

Re: [Tutor] Question on re.findall usage

2013-01-28 Thread Dave Wilder
On 28 January 2013 2:44, : Oscar Benjamin [mailto:oscar.j.benja...@gmail.com wrote: Please post in plain text (not html) as otherwise the code gets screwed up. ... Some people like to use regexes for everything. I prefer to try string methods first as I find them easier to understand.

[Tutor] manipulating a string in python

2012-11-27 Thread Dave Wilder
Hello, I believe there is a simple answer to this, but I am confused on what direction I should go that would perform what I wish to do most efficiently. ** My Environment *** [root@f5ite ~/tests]$ python Python 2.7 (r27:82500, Jul 6 2010, 02:54:50) [GCC 4.1.2 20080704 (Red Hat

Re: [Tutor] Obtaining result from a sendline

2012-10-31 Thread Dave Wilder
just renamed it when I emailed my question, which was probably not a good idea. Thanks, Dave -Original Message- From: eryksun [mailto:eryk...@gmail.com] Sent: Wednesday, October 31, 2012 1:44 AM To: Dave Wilder Cc: tutor@python.org Subject: Re: [Tutor] Obtaining result from

[Tutor] Obtaining result from a sendline

2012-10-30 Thread Dave Wilder
Okay, file this under RTFM, but even after research, I cannot figure out the answer to this simple question. When I do an ssh in python (version 2.7.3) to a device, I am trying to capture the output of the command. However, all I get back is a numerical value. I am looking to get the actual

Re: [Tutor] Filename match on file extensions

2012-10-03 Thread Dave Wilder
] Filename match on file extensions On Wed, Oct 03, 2012 at 03:14:16AM +, Dave Wilder wrote: Hello, Below is a snippet of a search I want to do for any file that contains the string quarantine in the filename. It works for picking up any file name containing quarantine except when

[Tutor] Filename match on file extensions

2012-10-02 Thread Dave Wilder
Hello, Below is a snippet of a search I want to do for any file that contains the string quarantine in the filename. It works for picking up any file name containing quarantine except when quarantine is used as an extension. For example, the search would find quarantine.txt but fails to find

Re: [Tutor] Filename match on file extensions

2012-10-02 Thread Dave Wilder
Hello, Below is a snippet of a search I want to do for any file that contains the string quarantine in the filename. It works for picking up any file name containing quarantine except when quarantine is used as an extension. For example, the search would find quarantine.txt but fails to

Re: [Tutor] Python and boot sequences

2012-07-08 Thread Dave Wilder
[mailto:tutor-bounces+d.wilder=f5@python.org] On Behalf Of Alan Gauld Sent: Wednesday, July 04, 2012 1:07 PM To: tutor@python.org Subject: Re: [Tutor] Python and boot sequences On 28/06/12 13:54, Dave Wilder wrote: Can a Python script be written that has the ability to stop a Linux device

[Tutor] Python and boot sequences

2012-07-04 Thread Dave Wilder
Hello, This is a general Python question, so I don't require specific answers on how to do it, but... Can a Python script be written that has the ability to stop a Linux device in the middle of a boot when a certain sequence occurs and then perform an action? For example, when I boot my