Leo Kislov wrote:
> Confirmed on windows with 2.4 and 2.5:
>
> C:\p>\Python24\python.exe bzp.py
> line number: 588317
> '\x1e'
> ''
>
> C:\p>\Python25\python.exe bzp.py
> line number: 588317
> '\x1e'
> ''
>
> Looks like one byte of garbage is appended at the end of file. Please
> file a bug report.
Fredrik Lundh wrote:
> Clodoaldo Pinto Neto wrote:
>
> > The offending file is 5.5 MB. Sorry, i could not reproduce this problem
> > with a smaller file.
>
> but surely you can post the repr() of the last two lines?
This is the output:
$ python bzp.py
line number: 588
lines += 1
if line1 != line2:
print 'line number:', lines
print repr(line1)
print repr(line2)
f1.close()
f2.close()
##
The offending file is 5.5 MB. Sorry, i could not reproduce this problem
with a smaller file.
http://fahstats.c
Fredrik Lundh wrote:
> Clodoaldo Pinto Neto wrote:
>
> > But I still don't understand what is happening. The manual says that
> > when shell=True the executable argument specifies which shell to use:
>
> no, it says that when shell=True, it runs the command "thro
Fredrik Lundh wrote:
> [EMAIL PROTECTED] wrote:
>
> > I can't see any obvious way to ask subprocess to use a shell other than
> > the default.
>
> -c ?
>
> >>> f = Popen(["/bin/bash", "-c", "set|grep IFS"], stdout=PIPE)
> >>> f.stdout.read()
> "IFS=$' \\t\\n'\n"
> >>> f = Popen(["/bin/sh", "-c",
Now we have 3 different outputs from 3 people to the command:
>>> f = subprocess.Popen("set | grep IFS", shell=True,
stdout=subprocess.PIPE)
>>> f.stdout.readlines()
>From me on FC5:
["BASH_EXECUTION_STRING='set | grep IFS'\n", "IFS=' \t\n"]
>From Fredrik Lundh on unknown
Fredrik Lundh wrote:
> this works for me:
>
> >>> f = subprocess.Popen("set | grep IFS", shell=True,
> stdout=subprocess.PIPE)
> >>> f.stdout.readlines()
> ["IFS=$' \\t\\n'\n"]
>
> what does the above return on your machine?
>>> f = subprocess.Popen("set | grep IFS", shell=True, stdout=subproce
27; \t\n"
Both outputs for comparison:
IFS=$' \t\n'
"IFS=' \t\n"
The subprocess.Popen() output is missing the $ and the last '
How to get the raw shell output from subprocess.Popen()?
Regards, Clodoaldo Pinto Neto
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Clodoaldo Pinto Neto wrote:
>
> > print 'The submited name was "' + name + '"'
>
> Bzzt! Script injection security hole. See cgi.escape and use it (or a
> similar function) for *all* text -> HTML output.
>
le-structure, etc),
> and thus should only be used while debugging, and turned off in
> any sort of production code.
Yes, another warning was issued.
Thanks for your help. Clodoaldo Pinto Neto
--
http://mail.python.org/mailman/listinfo/python-list
Clodoaldo Pinto Neto wrote:
> I'm just building a Python CGI Tutorial and would appreciate any
> feedback from the many experts in this list.
http://webpython.codepoint.net
--
http://mail.python.org/mailman/listinfo/python-list
Clodoaldo Pinto Neto wrote:
> I'm just building a Python CGI Tutorial and would appreciate any
> feedback from the many experts in this list.
http://webpython.codepoint.net
--
http://mail.python.org/mailman/listinfo/python-list
I'm just building a Python CGI Tutorial and would appreciate any
feedback from the many experts in this list.
Regards, Clodoaldo Pinto Neto
--
http://mail.python.org/mailman/listinfo/python-list
13 matches
Mail list logo