While Statement

2009-05-22 Thread Joel Ross
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

Re: While Statement

2009-05-22 Thread Joel Ross
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

Re: While Statement

2009-05-22 Thread Joel Ross
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

Re: While Statement

2009-05-22 Thread Joel Ross
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

Re: While Statement

2009-05-22 Thread Joel Ross
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:

Problems with sys.stout.flush()

2009-05-22 Thread Joel Ross
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

Re: Problems with sys.stout.flush()

2009-05-23 Thread Joel Ross
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

Re: Problems with sys.stout.flush()

2009-05-23 Thread Joel Ross
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

Re: Problems with sys.stout.flush()

2009-05-23 Thread Joel Ross
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

Re: Problems with sys.stout.flush()

2009-05-23 Thread Joel Ross
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 *

Re: Problems with sys.stout.flush()

2009-05-23 Thread Joel Ross
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

Re: Problems with sys.stout.flush()

2009-05-23 Thread Joel Ross
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 --

Re: Problems with sys.stout.flush()

2009-05-23 Thread Joel Ross
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

Re: Problems with sys.stout.flush()

2009-05-24 Thread Joel Ross
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

Tkinter file dialog

2009-05-28 Thread Ronn Ross
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 --

RFID and Python

2009-05-31 Thread Ronn Ross
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

Re: matplotlib installation

2009-06-15 Thread Ross Ridge
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

Re: Redirecting STDOUT to a Python Variable

2012-09-22 Thread ross . marsden
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

Re: How to investigate web script not running?

2012-09-28 Thread Michael Ross
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

Re: String manipulation in python..NEED HELP!!!!

2012-12-11 Thread Ross Ridge
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

Re: Tarfile and usernames

2012-12-30 Thread Michael Ross
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

Try-except-finally paradox

2014-01-29 Thread Jessica Ross
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 ...

Re: Re: Re: convert string to bytes without changing data (encoding)

2012-03-28 Thread Ross Ridge
. 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

Re: Re: Re: convert string to bytes without changing data (encoding)

2012-03-28 Thread Ross Ridge
), 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

Re: convert string to bytes without changing data (encoding)

2012-03-29 Thread Ross Ridge
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

Re: convert string to bytes without changing data (encoding)

2012-03-29 Thread Ross Ridge
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

Re: Newbie questions on import cmd line run

2012-05-17 Thread Ross Ridge
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

Re: Smallest/cheapest possible Python platform?

2012-05-26 Thread Ross Ridge
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

Re: English version for M�mento Python 3 (draft, readers needed)

2012-06-06 Thread Alec Ross
- 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

Re: when normal parallel computations in CPython will be implemented at last?

2012-07-01 Thread Ross Ridge
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

Re: 2 + 2 = 5

2012-07-04 Thread Michael 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

Re: How to safely maintain a status file

2012-07-12 Thread Ross Ridge
. 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

Re: the meaning of rユ.......��

2012-07-23 Thread Ross Ridge
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

Re: the meaning of rユ.......ï¾

2012-07-23 Thread Ross Ridge
-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

Re: from future import pass_function

2012-07-25 Thread Ross Ridge
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

Re: from future import pass_function

2012-07-25 Thread Ross Ridge
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

Re: from future import pass_function

2012-07-25 Thread Ross Ridge
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

Re: [OT] Free software versus software idea patents (was: Python benefits over Cobra)

2011-04-07 Thread Ross Ridge
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

What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-11 Thread Ross Gayler
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

unittest and threading

2012-01-24 Thread Ross Boylan
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

Re: unittest and threading

2012-01-25 Thread Ross Boylan
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

Condition.wait() behavior with timeout

2012-01-30 Thread Ross Boylan
, 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

Re: XSLT to Python script conversion?

2012-02-17 Thread Ross Ridge
. 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

Re: XSLT to Python script conversion?

2012-02-17 Thread Ross Ridge
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

#line in python

2012-02-18 Thread Ross Boylan
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

Re: #line in python (dirty tricks)

2012-02-20 Thread Ross Boylan
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

Re: convert string to bytes without changing data (encoding)

2012-03-28 Thread Ross Ridge
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

Re: convert string to bytes without changing data (encoding)

2012-03-28 Thread Ross Ridge
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

Re: convert string to bytes without changing data (encoding)

2012-03-28 Thread Ross Ridge
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

Re: convert string to bytes without changing data (encoding)

2012-03-28 Thread Ross Ridge
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

Re: Re: convert string to bytes without changing data (encoding)

2012-03-28 Thread Ross Ridge
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

Overload print

2010-08-25 Thread Ross Williamson
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

Re: can I distribute Microsoft.VC90.CRT files?

2011-07-19 Thread Ross Ridge
. 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

inserting \ in regular expressions

2011-10-26 Thread Ross Boylan
on the reply. Thanks. Ross Boylan -- http://mail.python.org/mailman/listinfo/python-list

Re: inserting \ in regular expressions [solved]

2011-11-05 Thread Ross Boylan
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

Re: Question on for loop

2013-01-03 Thread Don Ross
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',

Re: Checking for valid date input and convert appropriately

2013-02-21 Thread Michael Ross
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:

Re: Checking for valid date input and convert appropriately

2013-02-21 Thread Michael Ross
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

Re: Checking for valid date input and convert appropriately

2013-02-21 Thread Michael Ross
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

Re: Python Newbie

2013-02-24 Thread Michael Ross
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

Re: Speeding up Python's exit

2013-03-03 Thread Ross Ridge
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

Re: How to prevent tests from running against production?

2013-03-03 Thread Ross Ridge
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

Re: Inserting-embedding some html data at the end of a .py file

2013-03-05 Thread Michael Ross
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

Re: Inserting-embedding some html data at the end of a .py file

2013-03-05 Thread Michael Ross
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

Re: Inserting-embedding some html data at the end of a .py file

2013-03-05 Thread Michael Ross
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

Re: sync databse table based on current directory data without losign previous values

2013-03-06 Thread Michael Ross
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

Re: Inserting-embedding some html data at the end of a .py file

2013-03-06 Thread Michael Ross
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

Re: Do you feel bad because of the Python docs?

2013-03-06 Thread Michael Ross
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) -

Re: An error when i switched from python v2.6.6 = v3.2.3

2013-03-07 Thread Michael Ross
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

Re: An error when i switched from python v2.6.6 = v3.2.3

2013-03-07 Thread Michael Ross
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, ο

Re: Excel column 256 limit

2013-03-18 Thread Michael Ross
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

Re: Excel column 256 limit

2013-03-19 Thread Michael Ross
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

[issue9344] please add posix.getgrouplist()

2010-12-12 Thread Ross Lagerwall
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

[issue6791] httplib read status memory usage

2010-12-15 Thread Ross Lagerwall
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

[issue6791] httplib read status memory usage

2010-12-15 Thread Ross Lagerwall
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

[issue6791] httplib read status memory usage

2010-12-15 Thread Ross Lagerwall
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

[issue10714] httpserver request length

2010-12-15 Thread Ross Lagerwall
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

[issue10714] httpserver request length

2010-12-15 Thread Ross Lagerwall
Changes by Ross Lagerwall rosslagerw...@gmail.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10714 ___ ___ Python-bugs-list

[issue10714] httpserver request length

2010-12-16 Thread Ross Lagerwall
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

[issue10739] Subprocess behavior on Windows

2010-12-19 Thread Ross Lagerwall
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

[issue10739] Subprocess behavior on Windows

2010-12-19 Thread Ross Lagerwall
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

[issue10739] Subprocess behavior on Windows

2010-12-20 Thread Ross Lagerwall
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

[issue4761] create Python wrappers for openat() and others

2010-12-21 Thread Ross Lagerwall
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

[issue4761] create Python wrappers for openat() and others

2010-12-21 Thread Ross Lagerwall
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

[issue4761] create Python wrappers for openat() and others

2010-12-21 Thread Ross Lagerwall
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

[issue10755] Add posix.fdlistdir

2010-12-21 Thread Ross Lagerwall
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

[issue10755] Add posix.fdlistdir

2010-12-22 Thread Ross Lagerwall
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

[issue4761] create Python wrappers for openat() and others

2010-12-22 Thread Ross Lagerwall
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

[issue4761] create Python wrappers for openat() and others

2010-12-22 Thread Ross Lagerwall
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

[issue10758] posix_access swallows all errors

2010-12-22 Thread Ross Lagerwall
Changes by Ross Lagerwall rosslagerw...@gmail.com: -- nosy: +rosslagerwall ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10758 ___ ___ Python-bugs

[issue10755] Add posix.fdlistdir

2010-12-22 Thread Ross Lagerwall
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

[issue10784] os.getpriority() and os.setpriority()

2010-12-27 Thread Ross Lagerwall
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

[issue7995] On Mac / BSD sockets returned by accept inherit the parent's FD flags

2010-12-30 Thread Ross Lagerwall
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

[issue7322] Socket timeout can cause file-like readline() method to lose data

2010-12-31 Thread Ross Lagerwall
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

[issue7322] Socket timeout can cause file-like readline() method to lose data

2010-12-31 Thread Ross Lagerwall
Changes by Ross Lagerwall rosslagerw...@gmail.com: -- nosy: +loewis, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7322 ___ ___ Python-bugs

[issue7995] On Mac / BSD sockets returned by accept inherit the parent's FD flags

2010-12-31 Thread Ross Lagerwall
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

[issue7995] On Mac / BSD sockets returned by accept inherit the parent's FD flags

2010-12-31 Thread Ross Lagerwall
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

[issue5870] subprocess.DEVNULL

2011-01-01 Thread Ross Lagerwall
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

[issue9905] subprocess.Popen fails with stdout=PIPE, stderr=PIPE if standard descriptors (0, 1, 2) are closed.

2011-01-02 Thread Ross Lagerwall
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

[issue5870] subprocess.DEVNULL

2011-01-02 Thread Ross Lagerwall
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

<    1   2   3   4   5   6   7   8   >