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 y
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:
os.system('mpg321
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:
https://mail.pyt
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:
https://mail.pyth
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
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 "BYPASSR
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
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
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 t
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 c
oding? This would give
you a better understanding of what I am trying to accomplish.
Thank you,
Bo
>> On Aug 31, 2014, at 1:22 AM, Cameron Simpson wrote:
>>
>> On 30Aug2014 22:32, Crush wrote:
>> Thank you Allan for your criticism. Please see the below changes
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():
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
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 wrote:
>
> Hi Bo,
>
> One other thing: if you can avoid running commands a
4 at 2:13 PM, Crush 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/AAAZaxwB27nw1nmz7tz
>> On 28Aug2014 09:42, Crush 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/aoneliveO
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
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 -anal
...@python.org
>
> When replying, please edit your Subject line 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. Int
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 subproce
20 matches
Mail list logo