En Tue, 06 Oct 2009 11:24:23 -0300, MRAB
escribió:
Gabriel Genellina wrote:
En Sat, 03 Oct 2009 21:53:12 -0300, Andrew Savige
escribió:
When I run this little test program on Linux:
import subprocess
subprocess.call(["python","-V"], stderr=open("log.tmp","a"))
the file log.tmp is appe
Gabriel Genellina wrote:
En Sat, 03 Oct 2009 21:53:12 -0300, Andrew Savige
escribió:
When I run this little test program on Linux:
import subprocess
subprocess.call(["python","-V"], stderr=open("log.tmp","a"))
the file log.tmp is appended to each time I run it.
When I run it on Windows, how
En Sat, 03 Oct 2009 21:53:12 -0300, Andrew Savige
escribió:
When I run this little test program on Linux:
import subprocess
subprocess.call(["python","-V"], stderr=open("log.tmp","a"))
the file log.tmp is appended to each time I run it.
When I run it on Windows, however, the file log.tmp ge
When I run this little test program on Linux:
import subprocess
subprocess.call(["python","-V"], stderr=open("log.tmp","a"))
the file log.tmp is appended to each time I run it.
When I run it on Windows, however, the file log.tmp gets
overwritten each time I run it.
Though I can make it append on
gabrielmonnerat wrote:
>> I am using subprocess because I need store the pid. Any suggestions?
> Sorry, I was forgot the parameter shell=True.
> i.e
> In [20]: subprocess.call('DISPLAY=:99
> /opt/ooo-dev3/program/soffice.bin',shell=True)
You should avoid using the shell=True parameter. It may resu
gabrielmonnerat wrote:
Hi all,
I need start a openoffice in Xvfb, but when I call with the DISPLAY
occurs this error:
[r...@localhost oood]# Xvfb :99 -screen 0 1024x768x24 &
In [9]: subprocess.call('/opt/ooo-dev3/program/soffice.bin')
Out[9]: 0
In [10]: subprocess.call('DISPLAY=:99 /opt/ooo
Hi all,
I need start a openoffice in Xvfb, but when I call with the DISPLAY
occurs this error:
[r...@localhost oood]# Xvfb :99 -screen 0 1024x768x24 &
In [9]: subprocess.call('/opt/ooo-dev3/program/soffice.bin')
Out[9]: 0
In [10]: subprocess.call('DISPLAY=:99 /opt/ooo-dev3/program/soffice.bi
Colin J. Williams wrote:
Below is a test script:
# tSubProcess.py
import subprocess
import sys
try:
v= subprocess.Popen('ftype py=C:\Python25\Python.exe')
except WindowsError:
print(sys.exc_info())
I'm assuming that you've previously done something like this:
assoc .py=py
and are now t
On Fri, 2009-03-20 at 22:14 -0400, Colin J. Williams wrote:
> Below is a test script:
>
> # tSubProcess.py
>
> import subprocess
> import sys
> try:
>v= subprocess.Popen('ftype
> py=C:\Python25\Python.exe')
> except WindowsError:
>print(sys.exc_info())
>
> Here is the output:
>
> *** P
Below is a test script:
# tSubProcess.py
import subprocess
import sys
try:
v= subprocess.Popen('ftype
py=C:\Python25\Python.exe')
except WindowsError:
print(sys.exc_info())
Here is the output:
*** Python 2.5.4 (r254:67916, Dec 23
2008, 15:10:54) [MSC v.1310 32 bit
(Intel)] on win32. **
Hello,
I'm having this script here:
import sys, tempfile, subprocess
if len(sys.argv) > 1:
i = 0
while i < 1000:
print "Hello World" * 500
i = i + 1
exit( 1 )
h,fp = tempfile.mkstemp()
print "out: " + fp
out = open(fp, "r")
proc = subp
On Mar 12, 12:58 pm, Ningyu Shi <[EMAIL PROTECTED]> wrote:
> I'm trying to write a multi-task downloader to download files from a
> website using multi-threading. I have one thread to analyze the
> webpage, get the addresses of the files to be downloaded and put these
> in a Queue. Then the main th
I'm trying to write a multi-task downloader to download files from a
website using multi-threading. I have one thread to analyze the
webpage, get the addresses of the files to be downloaded and put these
in a Queue. Then the main thread will start some threads to get the
address from the queue and
On 2007-09-07, NeoGregorian <[EMAIL PROTECTED]> wrote:
> I tried instead to use:
>
> lines = []
> line = proc.stdout.readline()
> while line :
> lines.append(line)
> line = proc.stdout.readline()
>
> This prints out everything except the ">" line, which is good. But
> then freezes while wai
Hello, I am writing a wrapper to a basic Input/Output programs (where
you type a one line command at a time and then get 0 or more lines of
output before you can input the next command).
I'm sorry if this problem description is a bit long, but I wanted to
make the problem clear.
Example run of th
Fredrik Lundh wrote:
> Pekka Niiranen wrote:
>
>
>>I am running Python script in W2K or in WinXP.
>>The script is started from DOS prompt and writes text file to disk
>>with codecs.open() in UTF8.
>>
>>The problem is: When script writes the file and tries to read it
>>with by calling itself thru
Fredrik Lundh wrote:
> Pekka Niiranen wrote:
>
>
>>I am running Python script in W2K or in WinXP.
>>The script is started from DOS prompt and writes text file to disk
>>with codecs.open() in UTF8.
>>
>>The problem is: When script writes the file and tries to read it
>>with by calling itself thru
Pekka Niiranen wrote:
> I am running Python script in W2K or in WinXP.
> The script is started from DOS prompt and writes text file to disk
> with codecs.open() in UTF8.
>
> The problem is: When script writes the file and tries to read it
> with by calling itself thru subprocess() the created file
Hi,
I am running Python script in W2K or in WinXP.
The script is started from DOS prompt and writes text file to disk
with codecs.open() in UTF8.
The problem is: When script writes the file and tries to read it
with by calling itself thru subprocess() the created files are
NOT accessible because
19 matches
Mail list logo