Hi all,
I have this piece of code
class progess():
def __init__(self, number, char):
total = number
percentage = number
while percentage 0 :
percentage = int(number/total*100)
number-=1
char+=*
print char
Joel Ross wrote:
Hi all,
I have this piece of code
class progess():
def __init__(self, number, char):
total = number
percentage = number
while percentage 0 :
percentage = int(number/total*100)
number-=1
char
Andre Engels wrote:
On Fri, May 22, 2009 at 11:17 AM, Joel Ross jo...@cognyx.com wrote:
Hi all,
I have this piece of code
class progess():
def __init__(self, number, char):
total = number
percentage = number
while percentage 0 :
percentage = int(number
Andre Engels wrote:
On Fri, May 22, 2009 at 12:35 PM, Joel Ross jo...@cognyx.com wrote:
Im using 2.6 python and when running this
class progess():
def __init__(self, number, total, char):
percentage = float(number/total*100)
percentage = int(round(percentage))
char
Dave Angel wrote:
Tim Wintle wrote:
On Fri, 2009-05-22 at 13:19 +0200, Andre Engels wrote:
number/total = 998/999 = 0
number/total*100 = 0*100 = 0
float(number/total*100) = float(0) = 0.0
Change float(number/total*100) to float(number)/total*100 and it
should work:
I'd use:
Hi all,
I'm using python 2.5 and trying to flush the sys.stout buffer with
sys.stout.flush(), but doesn't seem to work. Each time a line is printed
it appends the one before it I need to clear the output and write a
new output without appending the previous one. I have tried the -u
Carl Banks wrote:
On May 22, 10:33 pm, Joel Ross jo...@cognyx.com wrote:
Hi all,
I'm using python 2.5 and trying to flush the sys.stout buffer with
sys.stout.flush(), but doesn't seem to work. Each time a line is printed
it appends the one before it I need to clear the output and write
Carl Banks wrote:
On May 23, 2:20 am, Joel Ross jo...@cognyx.com wrote:
Carl Banks wrote:
On May 22, 10:33 pm, Joel Ross jo...@cognyx.com wrote:
Hi all,
I'm using python 2.5 and trying to flush the sys.stout buffer with
sys.stout.flush(), but doesn't seem to work. Each time a line is printed
Carl Banks wrote:
On May 23, 3:49 am, Joel Ross jo...@cognyx.com wrote:
def progressbar(self, number, total, char):
percentage = float(number*100)/total
percentage = int(round(percentage))
percentage = int(100 - percentage)
self.f=sys.stdout
Thanks for all the help guys. I got it to work correctly with this
class progress:
def __init__(self):
self.already = 0
def progressbar(self, number, total, char):
percentage = int(100 - round(number*100.0/total))
if percentage 0:
xchar = char *
Rhodri James wrote:
On Sat, 23 May 2009 18:19:11 +0100, Joel Ross jo...@cognyx.com wrote:
Now I can move onto next one.
Except that you still have the interesting issue that your environment
isn't responding to '\r' correctly, which worries me rather. Or did
you never test that?
Yeah I
Dennis Lee Bieber wrote:
flush() is working perfectly fine -- it says transmit any data still
held within internal buffers. It is NOT a clear screen, clear line
terminal command.
I was mistaken about the sys.stout.flush(). I understand it a little
more now thanks
--
Mel wrote:
Joel Ross wrote:
Rhodri James wrote:
[ ... ]
Except that you still have the interesting issue that your environment
isn't responding to '\r' correctly, which worries me rather. Or did
you never test that?
Yeah I gave the \r a go and it kept printing out on a new line I
AK wrote:
import time, sys
print ONE,
sys.stdout.flush()
time.sleep(0.5)
print \rTWO,
sys.stdout.flush()
time.sleep(0.5)
Running the command above prints out
ONE
TWO
but running
for i in range(10):
print ONE,
time.sleep(0.2)
prints out
ONE ONE ONE ONE ONE ONE ONE ONE ONE ONE
I'm using Tkinter file selector to get a direcotry path. I'm using:
self.file = tkFileDialog.askdirectory(title=Please select your directory)
print file
but all it prints out is:
type 'file'
How would I print the directory path?
Thanks
--
I'm looking to play around with RFID and Python. Can anyone offer any
suggestions on the cheap? I'm possibly looking for a starter kit.
--
http://mail.python.org/mailman/listinfo/python-list
with the
Microsoft runtime. A library that mixes both objects and import records
is perfectly legitimate.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db
To capture the traceback, so to put it in a log, I use this
import traceback
def get_traceback(): # obtain and return the traceback
exc_type, exc_value, exc_traceback = sys.exc_info()
return ''.join(traceback.format_exception(exc_type, exc_value,
exc_traceback))
Suppose I have a
On Fri, 28 Sep 2012 13:37:36 +0200, Gilles nos...@nospam.com wrote:
Hello
I'm trying to run my very first FastCGI script on an Apache shared
host that relies on mod_fcgid:
==
#!/usr/bin/python
from fcgi import WSGIServer
import cgitb
# enable debugging
cgitb.enable()
def
concatenation into O(n) back in
Python 2.4.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 30 Dec 2012 19:57:31 +0100, Nicholas Cole nicholas.c...@gmail.com wrote:Dear List,I'm hoping to use the tarfile module in the standard library to move some files between computers.I can't see documented anywhere what this library does with userids and groupids. I can't guarantee that the
I found something like this in a StackOverflow discussion.
def paradox():
... try:
... raise Exception(Exception raised during try)
... except:
... print Except after try
... return True
... finally:
... print Finally
...
.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
--
http://mail.python.org/mailman/listinfo/python-list
), but in a high
level language, you cannot assume any correlation between objects and
bytes. Any code that depends on implementation details is risky.
How does that in anyway justify Evan Driscoll maliciously lying about
code he's never seen?
Ross Ridge
--
l
of code in thread. Just because I refuse to drink the it's
impossible to represent strings as a series of bytes kool-aid does't mean
that I'm a heretic that must oppose against everything you believe in.
Ross Ridge
--
l/ // Ross Ridge -- The Great
Ross Ridge wrote:
Just because I refuse to drink the
it's impossible to represent strings as a series of bytes kool-aid
Terry Reedy tjre...@udel.edu wrote:
I do not believe *anyone* has made that claim. Is this meant to be a
wild exaggeration? As wild as Evan's?
Sorry, it would've been more
the shell what interpreter to use to execute the program if
you run it directly.
They're actually interpreted by the kernel so that they'll work when
run from any program.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri
consider
whether any of these devices have Python bindings to interface with
their GPIO pins. If not you'll probably have to end up writing some C
code anyways.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
- from
latin).
FWIW, English idiomatic usage includes see overleaf, and see over,
for the obverse side of a page/sheet, i.e, the following page; and see
facing page, w/ the obvious meaning.
Alec
--
Alec Ross
--
http://mail.python.org/mailman/listinfo/python-list
Thomas Jollans t...@jollybox.de wrote:
There is, of course, Stackless Python.
http://stackless.com/
Stackless Python doesn't really address the original poster's problem
as the GIL still effectively limits Python code running in one thread
at a time.
Ross
Am 04.07.2012, 21:37 Uhr, schrieb Paul Rubin phr-2...@nightsong.com:
I just came across this (https://gist.github.com/1208215):
import sys
import ctypes
pyint_p = ctypes.POINTER(ctypes.c_byte*sys.getsizeof(5))
five = ctypes.cast(id(5), pyint_p)
print(2 + 2 == 5) # False
.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
--
http://mail.python.org/mailman/listinfo/python-list
language like this it would've come into existance 20 or 30
years ago not 20 or 30 years from now.
Python actually choose to go the other direction and choose to use
keywords as operators instead of symbols in a number of instances.
Ross Ridge
--
l
-ASCII characters outside of strings and comments even when the
language (supposedly) allows it.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
--
http
everything you've said about why its a good thing the that
print statement is now a function? That.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
What's the point of this?
Ross Ridge wrote:
Remember everything you've said about why its a good thing the that
print statement is now a function? That.
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
I can't believe I
Ross Ridge rri...@csclub.uwaterloo.ca wrote:
No, they're very much alike. That's why all your arguments for print
as function also apply just as well to pass a function. Your arguments
had very little to do what what print actually did.
Chris Angelico ros...@gmail.com wrote:
Except
the GPL doesn't meet the legal definition
of a contract, it can be revoked unilateraly (but not retroactively)
by the copyright holder at any time for any reason.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
with 64 bit Python running on
64 bit linux.
Is that true?I have spent a couple of hours searching for a definitive
description of the difference between the 32 and 64 bit versions of Python
for Windows and haven't found anything.
Thanks
Ross
--
https://mail.python.org/mailman/listinfo/python-list
anything definitive.
If it matters, I'm using CPython 2.7.
Thanks. If you're using email, I'd appreciate a cc.
Ross Boylan
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 2012-01-24 at 13:54 -0800, Ross Boylan wrote:
Is it safe to use unittest with threads?
In particular, if a unit test fails in some thread other than the one
that launched the test, will that information be captured properly?
A search of the net shows a suggestion that all failures
, not one with notify() and a single thread waiting (which is
what I'm thinking about). The thread does say there is no return value;
it seems to me it would be useful to document that if it's still true
(or True :).
Can anyone help me understand what's going on?
Thanks.
Ross Boylan
--
http
.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
--
http://mail.python.org/mailman/listinfo/python-list
Ross Ridge writes:
The XSLT language is one of the worst misuses of XML, which puts it way
beyond bad.
Stefan Behnel stefan...@behnel.de wrote:
Clearly a matter of opinion.
No. There's no excuse for using XML as the syntax of a language like
XLST
and methods that could do the conversion on the fly? I
don't know if there's a way to go from the function (or class) object
the decorator receives to the AST.
Comments?
Ross Boylan
--
http://mail.python.org/mailman/listinfo/python-list
Duncan Booth wrote
Ross Boylan ross at biostat.ucsf.edu wrote:
As an extension or alternate, could there be a decorator like
@source_line(lineno, filename)
for classes and methods that could do the conversion
problem here than then that's what you should be addressing, not
pretending that it's fundamentally impossible.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db
Ross Ridge rri...@csclub.uwaterloo.ca wr=
Of course it is. =A0Conceptually you're not supposed to think of it that
way, but a string is stored in memory as a series of bytes.
Chris Angelico ros...@gmail.com wrote:
Note that distinction. I said that a string is not a series of
bytes; you say
need to
pretend like Chris Angelico that there's isn't a direct mapping from
the his Python 3 implementation's internal respresentation of strings
to bytes in order to label what he's asking for as being silly.
Ross Ridge
--
l/ // Ross Ridge -- The Great
of strings wasn't what he
expected to be.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
--
http://mail.python.org/mailman/listinfo/python-list
it.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
--
http://mail.python.org/mailman/listinfo/python-list
Gives:
hello
I'm looking at finding nice way to print variables in a class just by
asking to print it
Cheers
Ross
--
Ross Williamson
University of Chicago
Department of Astronomy Astrophysics
773-834-9785 (office)
312-504-3051 (Cell)
--
http://mail.python.org/mailman/listinfo/python-list
.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
--
http://mail.python.org/mailman/listinfo/python-list
on the reply.
Thanks.
Ross Boylan
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 2011-10-26 at 12:48 -0700, Ross Boylan wrote:
I want to replace every \ and (the two characters for backslash and
double quotes) with a \ and the same character, i.e.,
\ - \\
- \
I'd like to thank Ian, Dave, MRAB, and John for their helpful responses.
I hadn't realized
I'm interested to know why you're trying this as well. Is this something that
would be helped by creating a class and then dynamically creating instances of
that class? Something like...
class Fruit:
def __init__(self, name):
self.name = name
for fruit in ['banana', 'apple',
On Thu, 21 Feb 2013 22:22:15 +0100, Ferrous Cranus nikos.gr...@gmail.com
wrote:
Τη Πέμπτη, 21 Φεβρουαρίου 2013 10:14:13 μ.μ. UTC+2, ο χρήστης MRAB
έγραψε:
On 2013-02-21 19:38, Ferrous Cranus wrote:
import datetime from datetime
Should be:
from datetime import datetime
try:
On Fri, 22 Feb 2013 00:08:01 +0100, Ferrous Cranus nikos.gr...@gmail.com
wrote:
Τη Παρασκευή, 22 Φεβρουαρίου 2013 12:03:59 π.μ. UTC+2, ο χρήστης Michael
Ross έγραψε:
On Thu, 21 Feb 2013 22:22:15 +0100, Ferrous Cranus
nikos.gr...@gmail.com
wrote:
Τη Πέμπτη, 21 Φεβρουαρίου 2013 10:14
On Fri, 22 Feb 2013 01:12:40 +0100, Ferrous Cranus nikos.gr...@gmail.com
wrote:
Please i have been trying hours for this:
Don't do that: Spending hours on being stuck. Take a break. Call it a
night.
Brain needs time to unstick itself.
Besides:
from datetime import date
entry='31
On Sun, 24 Feb 2013 20:40:05 +0100, piterrr.dolin...@gmail.com wrote:
if (some statement): # short form
rather than
if (some statement == true): # long form
What all those ugly brackets are for?
Mark,
Back in the day when C was king, or take many newer long
change this. Only the Python process's own internal buffers are
flushed, the OS doesn't change its handling of its buffers. If you want
written data to be fully committed before exiting you need to use other
OS services that guarantee this.
Ross Ridge
--
l
environment would seem to be the obvious solution.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
--
http://mail.python.org/mailman/listinfo
On Tue, 05 Mar 2013 21:04:59 +0100, Νίκος Γκρ33κ nikos.gr...@gmail.com
wrote:
#open html template
if htmlpage.endswith('.html'):
f = open( /home/nikos/public_html/ + htmlpage )
htmldata = f.read()
counter = ''' centera
On Tue, 05 Mar 2013 23:47:18 +0100, Νίκος Γκρ33κ nikos.gr...@gmail.com
wrote:
Thank you very much! This is what i was looking for and here is my code
after receiving your help.
So, with the command you provided to me i can actually run the .py
script ans save its output and then append
On Wed, 06 Mar 2013 00:39:31 +0100, Νίκος Γκρ33κ nikos.gr...@gmail.com
wrote:
htmldata = subprocess.check_output( '/home/nikos/public_html/cgi-bin/' +
htmlpage )
htmldata = subprocess.check_output( ['/usr/bin/python',
'/home/nikos/public_html/cgi-bin/' + htmlpage] )
Both of the above
On Wed, 06 Mar 2013 12:52:00 +0100, Mark Lawrence
breamore...@yahoo.co.uk wrote:
On 06/03/2013 07:45, Νίκος Γκρ33κ wrote:
I'am using this snipper to read a current directory and insert all
filenames into a databse and then display them.
But what happens when files are get removed form the
On Thu, 07 Mar 2013 00:18:44 +0100, Νίκος Γκρ33κ nikos.gr...@gmail.com
wrote:
Τη Τετάρτη, 6 Μαρτίου 2013 2:06:33 π.μ. UTC+2, ο χρήστης Michael Ross
έγραψε:
check_output is available as of Python 2.7
I guess you are still on version 2.6 ?
I can access each of these from my jailed shell
On Thu, 07 Mar 2013 02:28:10 +0100, Chris Kaynor
ckay...@zindagigames.com wrote:
I actually just tried that, and the results weren't very good.
Using the doc's search feature, the Reporting Bugs (and the About
these documents) page was significantly down the page (about 2/3 of
the way) -
On Thu, 07 Mar 2013 12:27:03 +0100, Νίκος Γκρ33κ nikos.gr...@gmail.com
wrote:
Τη Πέμπτη, 7 Μαρτίου 2013 11:06:27 π.μ. UTC+2, ο χρήστης Νίκος Γκρ33κ
έγραψε:
Any ideas about the error please?
I can assure you all the statemnt are correct ebcause they work in
python v2.6.6
can someone
On Thu, 07 Mar 2013 13:25:58 +0100, Νίκος Γκρ33κ nikos.gr...@gmail.com
wrote:
Τη Πέμπτη, 7 Μαρτίου 2013 1:51:42 μ.μ. UTC+2, ο χρήστης Michael Ross
έγραψε:
On Thu, 07 Mar 2013 12:27:03 +0100, Νίκος Γκρ33κ nikos.gr...@gmail.com
wrote:
Τη Πέμπτη, 7 Μαρτίου 2013 11:06:27 π.μ. UTC+2, ο
On Mon, 18 Mar 2013 16:50:21 +0100, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
On Mon, 18 Mar 2013 08:28:46 -0700, Ana Dionísio wrote:
Is there some way to go around this limit? I need to import data from
python to excel and I need 1440 columns for that.
That's an Excel
On Tue, 19 Mar 2013 15:07:54 +0100, Neil Cerutti ne...@norwich.edu wrote:
On 2013-03-18, Ana Dion?sio anadionisio...@gmail.com wrote:
But I still get the error and I use Excel 2010.
I'm trying to export data in a list to Excel
xlrd: Library for developers to extract data from Microsoft
Ross Lagerwall rosslagerw...@gmail.com added the comment:
Attached is a patch (against the latest revision, 87178) which adds the
functionality to the posix module as well as adds a testcase for it.
I haven't added it to the os module, I'm not sure if that should be done.
I tested it on Linux
Ross Lagerwall rosslagerw...@gmail.com added the comment:
Attached is a unit test which tests the issue.
Unfortunately, since it uses the resource module to limit memory to a workable
size, it will only work on Unix.
The given patch appears to fix the issue well.
I think this should be taken
Ross Lagerwall rosslagerw...@gmail.com added the comment:
A py3k patch against revision 87228.
--
Added file: http://bugs.python.org/file20049/i6791_py3k.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6791
Ross Lagerwall rosslagerw...@gmail.com added the comment:
That's true. Near the bottom of the code, it says:
# The status-line parsing code calls readline(), which normally
# get the HTTP status line. For a 0.9 response, however, this is
# actually the first line of the body!
Limiting
New submission from Ross Lagerwall rosslagerw...@gmail.com:
BaseHTTPRequestHandler in http.server does not limit the length of the request
line so a malicious client can cause the server to run out of memory with a
malicious request.
This patch limits the length to 64K (like Apache) and sends
Changes by Ross Lagerwall rosslagerw...@gmail.com:
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10714
___
___
Python-bugs-list
Ross Lagerwall rosslagerw...@gmail.com added the comment:
OK, here is an updated patch using threading 0 as a port number.
--
Added file: http://bugs.python.org/file20076/httpserver_py3k_v2.patch
___
Python tracker rep...@bugs.python.org
http
New submission from Ross Lagerwall rosslagerw...@gmail.com:
On Windows, creating a subprocess does not work when stdin (or stdout or
stderr) is set as a file object created from socket.makefile(). An IOError is
thrown.
This works fine on Unix so I assume it is a platform limitation rather
Ross Lagerwall rosslagerw...@gmail.com added the comment:
Attached is a patch to document this.
--
keywords: +patch
Added file: http://bugs.python.org/file20116/subprocessdoc.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Ross Lagerwall rosslagerw...@gmail.com added the comment:
Since the code in subprocess gets the underlying fileno of the file-like object
(line 819 of subprocess.py), I presume it is an example of the general problem
of files and sockets not mixing very well on Windows.
So, I have attached
Ross Lagerwall rosslagerw...@gmail.com added the comment:
Attached is a patch that adds:
faccessat, fchmodat, fchownat, fstatat, futimesat, linkat, mkdirat, mknodat,
openat, readlinkat, renameat, symlinkat, unlinkat, utimensat and mkfifoat.
Each function has documentation and a unit test
Ross Lagerwall rosslagerw...@gmail.com added the comment:
Attached is an updated patch which:
- fixes badly indented C code
- uses support.unlink consistently
- cleans up tests better using finally
--
Added file: http://bugs.python.org/file20133/i4761_v2.patch
Ross Lagerwall rosslagerw...@gmail.com added the comment:
Ok, attached is a patch with the documentation updated as per recommendation.
--
Added file: http://bugs.python.org/file20135/i4761_v3.patch
___
Python tracker rep...@bugs.python.org
http
New submission from Ross Lagerwall rosslagerw...@gmail.com:
Along with #4761, the *at wrappers, it would be nice to have a patch adding the
use of fdopendir.
This patch adds a function fdlistdir, a unittest and documentation.
--
components: Extension Modules
files: i_fdlistdir.patch
Ross Lagerwall rosslagerw...@gmail.com added the comment:
When maintaining an fd to implement a per thread current directory, you can use
it to get a list of files in the directory.
For security reasons, instead of a named path, you can keep an fd to a
directory so that if the path is changed
Ross Lagerwall rosslagerw...@gmail.com added the comment:
New patch *should* have fixed up reference counting and version tags.
I standardized all the error calls to posix_error.
--
Added file: http://bugs.python.org/file20137/i4761_v4.patch
Ross Lagerwall rosslagerw...@gmail.com added the comment:
This new patch has proper octal mode strings and another doc update.
I'll leave faccessat until #10758 has been resolved.
--
Added file: http://bugs.python.org/file20138/i4761_v5.patch
Changes by Ross Lagerwall rosslagerw...@gmail.com:
--
nosy: +rosslagerwall
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10758
___
___
Python-bugs
Ross Lagerwall rosslagerw...@gmail.com added the comment:
Hi,
Attached is a slightly updated patch that improves doc and changes fdlistdir to
always return strings, not bytes.
--
Added file: http://bugs.python.org/file20145/i10755.patch
___
Python
Ross Lagerwall rosslagerw...@gmail.com added the comment:
Patch looks good, just one thing:
In setpriority(), it should be possible to use the Py_RETURN_NONE; macro
instead of INCREFing manually.
--
components: +Extension Modules
nosy: +rosslagerwall
type: - feature request
Ross Lagerwall rosslagerw...@gmail.com added the comment:
Attached is a patch (the original one in patch form) against py3k with unit
test.
It seems to work well - tested on Linux FreeBSD.
--
keywords: +patch
nosy: +rosslagerwall
Added file: http://bugs.python.org/file20201/7995_v1
Ross Lagerwall rosslagerw...@gmail.com added the comment:
Attached is a patch which fixes the issue.
Instead of allowing the readline method to lose data, it adds a check to
SocketIO.readinto() to ensure that the socket does not have a timeout and
throws an IOError if it does. Also does
Changes by Ross Lagerwall rosslagerw...@gmail.com:
--
nosy: +loewis, pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7322
___
___
Python-bugs
Ross Lagerwall rosslagerw...@gmail.com added the comment:
issue1515839 seems to be a duplicate of this one.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7995
Ross Lagerwall rosslagerw...@gmail.com added the comment:
From what I coud see, the same applied to NetBSD so I enabled it for NetBSD as
well - if there are any other OSes that need it enabled, they can be added.
The updated patch checks for fcntl() failing and simply leaves the socket
Ross Lagerwall rosslagerw...@gmail.com added the comment:
Here is a fairly simple patch that adds the subprocess.DEVNULL constant.
--
keywords: +patch
nosy: +rosslagerwall
versions: +Python 3.3 -Python 2.7
Added file: http://bugs.python.org/file20215/5870_v1.patch
Ross Lagerwall rosslagerw...@gmail.com added the comment:
OK here is a patch + tests. Basically, it makes sure that the fd that it is
closing is not 0, 1 or 2.
I've set it for 2.7, 3.1 and 3.2.
--
keywords: +patch
nosy: +rosslagerwall
versions: +Python 2.7, Python 3.1, Python 3.2
Ross Lagerwall rosslagerw...@gmail.com added the comment:
I think if you look closely at the patch, the fd does not stay open the whole
time. It is opened if necessary in _get_handles() with e.g.:
elif stdin == DEVNULL:
p2cread = self._get_devnull()
and then closed in _execute_child
301 - 400 of 788 matches
Mail list logo