Re: [Tutor] I apologize

2014-11-15 Thread Crush
Below was the post that was sent from the wrong email. Not sure if the first post went through, so in the event it did not, I will post again; if it was posted twice, I apologize for the redundancy. Subject: Re: Help understanding classes Thank you Alan and Danny. It amazes me at the lengths

Re: [Tutor] Python GPIO Code Help Needed

2014-10-26 Thread Crush
Could this work? /usr/bin/env python import os import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(23, GPIO.IN) GPIO.setup(24, GPIO.IN) GPIO.setup(25, GPIO.IN) pin_list = ['GPIO.input(23)', 'GPIO.input(23)', 'GPIO.input(23)'] for item in pin_list: if item == false:

Re: [Tutor] Code critique

2014-10-25 Thread Crush
Thank you Peter for your example. I have the code working now and will post soon for eveyones benefit. Thank you all who took the time to help. Bo ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options:

Re: [Tutor] Insert time into email

2014-10-20 Thread Crush
Hey thanks for the help, it worked like a charm. I will post the complete code soon, so others may benefit should they ever need it. Thanks again. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options:

Re: [Tutor] printing all text that begins with 25

2014-10-02 Thread Crush
Yes the format is always the same and the IPs will always be in the 3rd collumn; although, the amount of whitspace that seperates column 2 and 3 may be different depending on how long the name is in column 2. Also all of the IPs will begin with a 25, so there would be no fear of having to deal

Re: [Tutor] Subprocess help

2014-09-21 Thread Crush
Thank you Danny for your assistance. Just a couple of follow up questions to help me understand what is going on. You said... Semantically, the command above means: execute ./octosetupBROADCASTER-linux_i386.bin in an environment that binds BYPASSROOT to yes. Does the above mean BYPASSROOT is

[Tutor] Subprocess help

2014-09-20 Thread Crush
Hey all, hope everyone is well. I am trying to write a script that automates a certain task I have recently found myself doing a lot lately. The command I need to run is BYPASSROOT=yes ./octosetupBROADCASTER-linux_i386.bin I know how to use subprocess to execute the ./octosetup... command,

[Tutor] Vol 127, Issue 15

2014-09-05 Thread Crush
Ok nevermind, I did not figure it out. My code... count = 0 while count 3: count += 1 Subprocess.Popen('command') if count == 3: sys.exit() This does not work as I want it to; it consecutively executes the command three times in a row. I only want it to execute once. However, if

[Tutor] command counter

2014-09-05 Thread Crush
My code is as follows... count = 0 while count 3: count += 1 subprocess.Popen('command') if count == 3: sys.exit() 'command' is any command. For testing, I have been using the command 'xterm' just so I can see it opening. As far as error and pertaining to the above code, if I close the

[Tutor] private help...interacting with stderr/stdout

2014-09-02 Thread Crush
It is becoming too difficult to explain the problems I am having with my code via email. Is anyone willing to help via Skype or Teamviewer...I will pay for your time if need be. Thanks, Bo ___ Tutor maillist - Tutor@python.org To unsubscribe or

Re: [Tutor] Interacting with stderr

2014-08-31 Thread Crush
to accomplish. Thank you, Bo On Aug 31, 2014, at 1:22 AM, Cameron Simpson c...@zip.com.au wrote: On 30Aug2014 22:32, Crush crushe...@gmail.com wrote: Thank you Allan for your criticism. Please see the below changes. As far as the embedded loops, I know no other way to achieve the same

Re: [Tutor] Interacting with stderr

2014-08-30 Thread Crush
Ok, i understand the dangers of using root. I will bring this to the attention of the CTO of the company, which he should know already, but none the less. You must know though, I do not have the power to change the way things are done. If he says ahhh, dont worry about it, then what am I to do?

Re: [Tutor] Tutor Digest, Vol 126, Issue 86

2014-08-30 Thread Crush
Thank you Allan for your criticism. Please see the below changes. As far as the embedded loops, I know no other way to achieve the same out come. def kill_proc(process1, process2): i = psutil.Popen([ps, cax], stdout=PIPE) out, err = i.communicate() for proc in psutil.process_iter():

Re: [Tutor] Interacting with stderr

2014-08-29 Thread Crush
wrote: On 28Aug2014 09:42, Crush crushe...@gmail.com wrote: As far as the pipe in... avconv -v verbose -re -analyzeduration 1000 -ihttp://localhost:6498/ms2/1382097438004/0MediaPlayer+0+/octoshape+hVV+octolive.americaone.com+V+aone+V+live+V+ONECONNXTDEMO1_HD_flv/aoneliveONECONNXTDEMO1HDflv

Re: [Tutor] Interacting with stderr

2014-08-29 Thread Crush
, 2014 at 2:13 PM, Crush crushe...@gmail.com wrote: I am now able to print stderr to the screen, however I still can not run conditional statements against stderr. Please see the screenshots(SS) here... https://www.dropbox.com/sh/31wyjtvqymo94uk/AAAZaxwB27nw1nmz7tz69I5La?dl=0 Hi Bo

Re: [Tutor] Interacting with stderr

2014-08-29 Thread Crush
Haha Yes I am aware of people like you who are just itching to exploit vulnerabilities like that; however, the programs my company uses to broadcast will only run as root. Bo On Aug 29, 2014, at 6:12 PM, Danny Yoo d...@hashcollision.org wrote: Hi Bo, One other thing: if you can avoid

Re: [Tutor] Interacting with stderr

2014-08-28 Thread Crush
So, are yall done arguing haha...jk! Seriously, thank you for taking the time to pick this issue apart with me. Cameron your learning comment was right on; my ultimate goal in posting here is to learn and of course to figure out my code. As far as the pipe in... avconv -v verbose -re

[Tutor] Quick question for Tutor admin.

2014-08-28 Thread Crush
Am I allowed to attach screen shots to my emails? Bo ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Interacting with stderr

2014-08-27 Thread Crush
Hello, it has been a while and I hope I am sending to the correct email. How would I go about running a conditional statement against the contents of stderr. For instance, if blah blah blah is in stderr do X, else do Y. CODE: SELECT ALL #!/usr/bin/env python import subprocess from

[Tutor] Interacting with stderr

2014-08-27 Thread Crush
so it is more specific than Re: Contents of Tutor digest... Today's Topics: 1. Re: Python Programming (Alan Gauld) 2. Re: simple unicode question (Alan Gauld) 3. Interacting with stderr (Crush) 4. Re: Interacting with stderr (Cameron Simpson) 5. Re: debug and execute python