[Tutor] free loop device

2008-05-05 Thread Nathan McBride
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey Guys, I have a program that uses the loop devices. However I originally was finding the free one with: 'losetup -f'. Which returns the next free loop device. :D However, I found that some of the other distros have a version of losetup that

Re: [Tutor] free loop device

2008-05-05 Thread Nathan McBride
it to the end of /dev/loop_. The only other thing I had to do was put a check in incase there were no used loop devices in which case then it defaults to /dev/loop0. Works like a charm. :D Nate bob gailer wrote: Nathan McBride wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey Guys, I have

Re: [Tutor] socket / over network

2008-04-06 Thread Nathan McBride
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alan Gauld wrote: Nathan McBride [EMAIL PROTECTED] wrote Hi Nathan, Please don't reply to an existing message to start a new discussion. It messes up those of us using threaded mail/news readers and increases the likelihood that your message

[Tutor] socket / over network

2008-04-03 Thread Nathan McBride
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey guys, I'm pretty tired of the lame backup solution we have at work. Could anyone point me to a (more or less newbieish) example of how to have python open a socket on one box and get data from it, then have another box write to it over the

Re: [Tutor] Maybe advanced pexpect question?

2008-03-25 Thread Nathan McBride
I'm thinking more along the lines as of running a program, sending tab to get to the field send text to put on the field, tab, send text ? On Sun, 2008-03-23 at 14:00 -0500, mwalsh wrote: Kent Johnson wrote: Nathan McBride wrote: I've used pexpect for a few projects and love it. Basically

[Tutor] Maybe advanced pexpect question?

2008-03-22 Thread Nathan McBride
I've used pexpect for a few projects and love it. Basically pexpect lets you spawn a program and interact with it from code like you yourself were running it in a console. How would you send the ctrl key? nomb ___ Tutor maillist - Tutor@python.org

Re: [Tutor] how to get response from os.system()

2008-03-17 Thread Nathan McBride
That's a great tip I'll have to save than. -Original Message- From: Martin Walsh [EMAIL PROTECTED] Sent: Monday, March 17, 2008 9:38 AM To: Nathan McBride [EMAIL PROTECTED] Cc: tutor@python.org Subject: Re: [Tutor] how to get response from os.system() Hi Nathan, Nathan McBride wrote

Re: [Tutor] how to get response from os.system()

2008-03-17 Thread Nathan McBride
That's a great tip I'll have to save than. -Original Message- From: Martin Walsh [EMAIL PROTECTED] Sent: Monday, March 17, 2008 9:38 AM To: Nathan McBride [EMAIL PROTECTED] Cc: tutor@python.org Subject: Re: [Tutor] how to get response from os.system() Hi Nathan, Nathan McBride wrote

Re: [Tutor] how to get response from os.system()

2008-03-17 Thread Nathan McBride
That's a great tip I'll have to save than. -Original Message- From: Martin Walsh [EMAIL PROTECTED] Sent: Monday, March 17, 2008 9:38 AM To: Nathan McBride [EMAIL PROTECTED] Cc: tutor@python.org Subject: Re: [Tutor] how to get response from os.system() Hi Nathan, Nathan McBride wrote

Re: [Tutor] how to get response from os.system()

2008-03-17 Thread Nathan McBride
That's a great tip I'll have to save than. -Original Message- From: Martin Walsh [EMAIL PROTECTED] Sent: Monday, March 17, 2008 9:38 AM To: Nathan McBride [EMAIL PROTECTED] Cc: tutor@python.org Subject: Re: [Tutor] how to get response from os.system() Hi Nathan, Nathan McBride wrote

Re: [Tutor] how to get response from os.system()

2008-03-16 Thread Nathan McBride
Why don't you just use 'commands.getoutput'? -Original Message- From: linuxian iandsd [EMAIL PROTECTED] Sent: Sunday, March 16, 2008 3:12 PM To: tutor@python.org Subject: Re: [Tutor] how to get response from os.system() use os.popen(your cmd here) On Sun, Mar 16, 2008 at 8:06 PM, Luke

Re: [Tutor] how to get response from os.system()

2008-03-16 Thread Nathan McBride
Would you mind perhaps show an example running an interactive command like su and show how to send input to the commands waiting propmts? -Original Message- From: linuxian iandsd [EMAIL PROTECTED] Sent: Sunday, March 16, 2008 3:17 PM To: tutor@python.org Subject: Re: [Tutor] how to get

Re: [Tutor] how to get response from os.system()

2008-03-16 Thread Nathan McBride
Yup I use the pexpect module for a lot however couldn't get 'pexpect.run' to work with mysqldump piping to gzip -Original Message- From: Jeff Younker [EMAIL PROTECTED] Sent: Sunday, March 16, 2008 6:59 PM To: Nathan McBride [EMAIL PROTECTED] Cc: tutor@python.org Subject: Re: [Tutor] how

[Tutor] beginner pexpect question

2008-02-13 Thread Nathan McBride
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey guys, I'm practically still a beginner with python. I am working on a program that originally I used popen for but then switched to pexpect because it was easier for me to understand. I was hoping someone could help me get this working: I do a:

Re: [Tutor] beginner pexpect question

2008-02-13 Thread Nathan McBride
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Anyone have any recomendations? Seems like it is giving it the passwords since it finishes cleanly, but maybe not like I think? Nate Nathan McBride wrote: Hey guys, I'm practically still a beginner with python. I am working on a program

[Tutor] Is it possible?

2008-02-08 Thread Nathan McBride
Is it possible to write a program that you pipe other programs through and it measures the MBs per second of data moved? Like I could pipe it a cp and find out how fast the cp is working? Thanks, Nate ___ Tutor maillist - Tutor@python.org