Shurui Liu (Aaron Liu) wrote:
# Translate wrong British words
#Create an empty file
print "\nReading characters from the file."
raw_input("Press enter then we can move on:")
text_file = open("storyBrit.txt", "r+")
whole_thing = text_file.read()
print whole_thing
raw_input("Press enter then we ca
# Translate wrong British words
#Create an empty file
print "\nReading characters from the file."
raw_input("Press enter then we can move on:")
text_file = open("storyBrit.txt", "r+")
whole_thing = text_file.read()
print whole_thing
raw_input("Press enter then we can move on:")
print "\nWe are gon
On Dec 26, 2008, at 8:57, "Emad Nawfal (عماد نوفل)" mail.com> wrote:
2008/12/26 Kent Johnson
On Fri, Dec 26, 2008 at 8:09 AM, Emad Nawfal (عماد نوفل)
wrote:
> suppose I have an external program that prints "testing the
subprocess
> module"
> I know I can run it through the commands module
"Emad Nawfal (عماد نوفل)" wrote
proc = subprocess.Popen('python3.0 hello.py',
shell=True,
stdout=subprocess.PIPE,
)
stdout_value = proc.communicate()[0]
Thank you Kent.
It works, but isn't the commands module much simpler? I
2008/12/26 Kent Johnson
> On Fri, Dec 26, 2008 at 8:09 AM, Emad Nawfal (عماد نوفل)
> wrote:
> > suppose I have an external program that prints "testing the subprocess
> > module"
> > I know I can run it through the commands module like this:
> >
> a = commands.getoutput("python3.0 hello.py"
On Fri, Dec 26, 2008 at 8:09 AM, Emad Nawfal (عماد نوفل)
wrote:
> suppose I have an external program that prints "testing the subprocess
> module"
> I know I can run it through the commands module like this:
>
a = commands.getoutput("python3.0 hello.py")
a
> 'testing the subprocess modul
Hello Tutors, and Happy New Year and Holidays,
suppose I have an external program that prints "testing the subprocess
module"
I know I can run it through the commands module like this:
>>> a = commands.getoutput("python3.0 hello.py")
>>> a
'testing the subprocess module'
>>> len(a)
29
>>> b = a.sp
Evert Rol wrote:
>> So, I tried setting COLUMNS equal to 500 (arbitrarily large) prior to
>> going into python. It seems to change back to 158 automatically
>> however.
>> For example, when I go into python, import commands, and execute
>> commands.getoutput('set') I find that COLUMNS is back to 1
> So, I tried setting COLUMNS equal to 500 (arbitrarily large) prior to
> going into python. It seems to change back to 158 automatically
> however.
> For example, when I go into python, import commands, and execute
> commands.getoutput('set') I find that COLUMNS is back to 158. So, I
> think m
Evert Rol wrote:
>> >> I've been trying to do something that I thought was going to be
>> >> relatively straight-forward, but so far I haven't found a good solution.
>> >>
>> >> What I'm trying to do is discover a pid on a process and kill it. The
>> >> way that I thought that I could do it is so
> I've been trying to do something that I thought was going to be
> relatively straight-forward, but so far I haven't found a good
> solution.
>
> What I'm trying to do is discover a pid on a process and kill it. The
> way that I thought that I could do it is something along the lines of:
>
> im
I've been trying to do something that I thought was going to be
relatively straight-forward, but so far I haven't found a good solution.
What I'm trying to do is discover a pid on a process and kill it. The
way that I thought that I could do it is something along the lines of:
import commands
p
> Is it possible for me to make a command do multiple things instead
of 1?
Yes, its called writing a function or method.
> self.submit_bttn = Button(self, text = "Tries: 0", command =
self.reveal, self.update_count)
> I have tried putting the code as 2 commands on separate lines,
Try putting th
On Tue, 29 Mar 2005, Diana Hawksworth wrote:
> Is it possible for me to make a command do multiple things instead of 1?
> For instance, I have a button that allows me to "submit" some user input
> (that is, show it in a window), but I also want it to count the number
> of times that submit button
Quoting Diana Hawksworth <[EMAIL PROTECTED]>:
> Is it possible for me to make a command do multiple things instead of
> 1?
Not directly ... But you can always write a function that does both things.
> self.submit_bttn = Button(self, text = "Tries: 0", command =
> self.reveal, self.update_count)
Dear list!
Is it possible for me to make a command
do multiple things instead of 1?
For instance, I have a button that allows me to
"submit" some user input (that is, show it in a window), but I also want it to
count the number of times that submit button has been pressed.
I have tried th
16 matches
Mail list logo