Search Discussions
-
With so many choices, I was wondering what editor is the one you prefer when coding Python, and why. I normally use vi, and just got into Python, so I am looking for suitable syntax files for it, and ...
LittleGrasshopper
May 25, 2009 at 5:35 pm
Jun 18, 2009 at 3:52 am -
Python for parallel loops would add a lot of power and simplicity, e.g. par i in list: updatePartition(i) There would be no locking and it would be the programmer's responsibility to ensure that the ...
Jeremy
May 17, 2009 at 12:05 pm
Jun 5, 2009 at 9:38 pm -
Sometimes I rename recursive functions, or I duplicate&modify them, and they stop working because inside them there's one or more copy of their old name. This happens to me more than one time every ...
BearophileHUGS
May 3, 2009 at 10:39 pm
May 9, 2009 at 7:48 am -
The explaination in my introductory Python book is not very satisfying, and I am hoping someone can explain the following to me: 0.80000000000000004 4 / 5.0 is 0.8. No more, no less. So what's up ...
Seanm Py
May 21, 2009 at 9:05 pm
May 28, 2009 at 2:55 pm -
If I have a list of tuples a = [(1,2), (3,4), (5,6)], and I want to return a new list of each individual element in these tuples, I can do it with a nested for loop but when I try to do it using the ...
Ross
May 1, 2009 at 12:56 am
May 11, 2009 at 4:29 pm -
For the past couple weeks, I've been working on an algorithm to schedule tennis leagues given court constraints and league considerations (i.e. whether it's a singles or a doubles league). Here were ...
Ross
May 4, 2009 at 2:36 am
May 8, 2009 at 3:41 pm -
Dear Python-users, I invented a new programming language called "Nimrod" that combines Python's readability with C's performance. Please check it out: http://force7.de/nimrod/ Any feedback is ...
Andreas Rumpf
May 8, 2009 at 3:48 pm
May 17, 2009 at 3:32 am -
#how can I print a list of object which may return unicode representation? # -*- coding: utf-8 -*- class A(object): def __unicode__(self): return u"?au" __str__ = __repr__ = __unicode__ a = A() try: ...
Anuraguniyal
May 8, 2009 at 2:53 pm
May 11, 2009 at 5:16 pm -
I'll say! I think .pth files are absolute evil and I wish they could just be banned. +1 on anything that makes them closer to going away or reduces the possibility of yet another similar feature from ...
Chris Withers
May 1, 2009 at 4:26 pm
May 11, 2009 at 4:35 pm -
You apparently have caught the soft-/hard- disease spread by several software retailers. There are no such characters as "hard break," "soft break," "hard space," and "soft space." Check you ASCII or ...
Scott David Daniels
May 9, 2009 at 2:19 pm
Jul 5, 2009 at 10:54 pm -
Hello group, I'm trying to write a function in Python which does the following: For a number of arguments which are all lists, return a list (or generator) which yields all tuples of combination. ...
Johannes Bauer
May 31, 2009 at 8:23 pm
Jun 5, 2009 at 8:55 am -
I'm intrigued that Python has some functional constructions in the language. Would it be possible to more clearly separate the pure code (without side effects) from the impure code (that deals with ...
Casey Hawthorne
May 8, 2009 at 7:04 pm
May 11, 2009 at 7:56 am -
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 ...
Joel Ross
May 23, 2009 at 5:33 am
May 24, 2009 at 10:43 am -
Hi, I am trying to write a simple python script to manipulate files and call other programs. I have a program installed (rocs) which I run using cygwin on my XP (but is not in python). Can I run the ...
Ben Keshet
May 6, 2009 at 3:31 pm
May 7, 2009 at 1:51 am -
Hello all, Is there a Python construct to allow me to do something like this: for i in range(-10.5, 10.5, 0.1): ... If there is such a thing already available, I'd like to use it, otherwise I can ...
Esmail
May 2, 2009 at 3:12 pm
May 5, 2009 at 5:11 pm -
I know about the construct: try: # do something except ...: # handle exception else: # do something else ...but I can't come with an example in which the same couldn't be accomplished with try: # do ...
Kj
May 10, 2009 at 9:00 pm
May 23, 2009 at 2:18 am -
I am new to Python. I am slowly realizing that Python might be a better choice when compared to java on the server side. Is there any performance comparison between Java and Python ? For example, if ...
Mohan Parthasarathy
May 19, 2009 at 5:32 pm
May 21, 2009 at 6:48 pm -
Hi, There happened something that I do not understand. Actually I don't even know how it can be possible. I import a module and then the name space of the importing module seems do be overwritten. ...
Marco
May 8, 2009 at 5:14 pm
May 10, 2009 at 8:05 pm -
I made this little script (below) to look througt a dir to see if there are any files newer than .e.g. 1 hour. I have the loop through the dir working and can retreive file time as well as present ...
Martin
May 30, 2009 at 9:33 am
Jun 29, 2009 at 8:30 pm -
hello, Moving my entire program section between windows and Ubuntu, sometimes causes problems, due to the existence of pyc-files (and probably because my program still has hard coded paths). Now I ...
Stef Mientki
May 24, 2009 at 1:01 pm
Jun 4, 2009 at 6:31 am -
Hi all, I need to randomly sample from a list where all choices have weights attached to them. The probability of them being choosen is dependent on the weights. If say Sample list of choices are ...
Sumitava Mukherjee
May 26, 2009 at 6:39 pm
May 31, 2009 at 7:15 pm -
Hello everyone, I am trying to use dbapi with mysql and I get this error: Traceback (most recent call last): File "<stdin ", line 1, in <module File "<stdin ", line 2, in getUnitParams File ...
Gabriel Rossetti
May 26, 2009 at 11:46 am
May 31, 2009 at 2:15 am -
Thomas Wouters reminded me of a long-standing idea; I finally found the time to write it down. Please comment! Regards, Martin PEP: 384 Title: Defining a Stable ABI Version: $Revision: 72754 $ ...
Martin v. Löwis
May 17, 2009 at 8:54 pm
May 26, 2009 at 6:54 pm -
Greetings. I'm working on learning Python and I'm looking for good books to read. I'm almost done with Dive into Python and I liked it a lot. I found Programming Python a little dry the last time I ...
Sam Tregar
May 11, 2009 at 8:44 pm
May 22, 2009 at 9:47 pm -
All, How best to go about this? I have a list containing strings referring to months, like ["x_apr", "x_jul", "x_jan", "x_aug", "x_may", etc] -- always using the 3-chars for month. The list will ...
Noydb
May 12, 2009 at 3:06 am
May 15, 2009 at 6:01 am -
if anybody needs: http://code.google.com/p/phppython/
Bvidinli
May 8, 2009 at 10:38 am
May 13, 2009 at 4:12 pm -
I've passed this around some other groups, and I'm being told "probably not possible". But I thought I'd try here as well :) I *did* search first, and found several similar threads, but they quickly ...
Warpcat
May 1, 2009 at 4:24 pm
May 6, 2009 at 1:04 pm -
I am writing a mapping object, and I want to ask about the details of __hash__ and __eq__. IIUC if I understand correctly, the Python dict's keys' hash codes are looked up first in O( 1 ), then all ...
Aaron Brady
May 30, 2009 at 6:20 pm
Jun 4, 2009 at 1:41 pm -
I have come across a problem that, as I understand all documentation I have found, should not exist. Python version is 2.5.2, Tinker in that package. Linux Slackware 10.2 I went to test os.popen and ...
Norseman
May 19, 2009 at 5:43 pm
Jun 1, 2009 at 11:24 pm -
I am experimenting with metaclasses, trying to figure out how things are put together. At the moment I am baffled by the output of the following code: ************************************ """ Output ...
LittleGrasshopper
May 30, 2009 at 11:01 pm
Jun 1, 2009 at 6:21 pm -
Hello all, I would like to maximize or minimize a given math function over a specific set of values, in Python preferably. I was checking out Wolfram Alpha (http://www70.wolframalpha.com/) and it can ...
Esmail
May 23, 2009 at 1:22 pm
May 31, 2009 at 9:51 am -
A few years ago someone, somewhere on the Web, posted a blog in which he observed that developers, by general temperament, seem to fall into two groups. On the one hand, there are developers who love ...
Steve Ferg
May 17, 2009 at 7:44 pm
May 28, 2009 at 6:19 pm -
Wouldn't it be easy for Python to implement generating functions so that the iterators they return are equipped with a __reset__() method? Here is the context of this question. Python documentation ...
Jan
May 20, 2009 at 6:35 pm
May 23, 2009 at 12:31 am -
import sys try: raise "xxx" except str,e: print "1",e # is not caught here except:# is caught here print "2",sys.exc_type,sys.exc_value In the above code a string exception is raised which though ...
Anuraguniyal
May 15, 2009 at 8:13 am
May 15, 2009 at 10:01 pm -
On behalf of the Python development team, I'm thrilled to announce the first and only beta release of Python 3.1. Python 3.1 focuses on the stabilization and optimization of features and changes ...
Benjamin Peterson
May 6, 2009 at 11:01 pm
May 8, 2009 at 1:06 pm -
I have Windows Vista Home Premium. As a non-techy, I want to use "virtualenv" I had Python 2.6 on my laptop. I needed "easyinstall" to install virtualenv. During installation of easyinstall, I got ...
OldGrantonian
May 7, 2009 at 7:03 am
May 8, 2009 at 9:15 am -
Hi. My problem is to replace all occurrences of a sublist with a new element. Example: Given ['a','c','a','c','c','g','a','c'] I want to replace all occurrences of ['a','c'] by 6 (result ...
Matthias Gallé
May 4, 2009 at 12:08 pm
May 5, 2009 at 10:26 am -
Hello! if one of parameter in values is empty, I'm getting TypeError: not enough arguments for format string But how to handle such situation? It is ok for DB, that some of values are empty. def ...
Someone
May 25, 2009 at 12:10 pm
May 29, 2009 at 3:23 pm -
Given this example program: import dbfpy def dbf_open(tblname): fpath = os.path.join(local.DB_DIR,tblname) f = file(fpath,"ab+") f.seek(0) tbl = dbf.Dbf(f) return tbl tbl = dbf_open("partners.dbf") ...
Laszlo Nagy
May 21, 2009 at 11:25 am
May 27, 2009 at 2:55 pm -
I know that s = r'x\nx' means 'x' followed by a literal '\' followed by an 'n' (the '\n' is not a carriage return). s = r'x\tx' means 'x' followed by a literal '\' followed by an 't' (the '\t' is not ...
Walterbyrd
May 20, 2009 at 5:38 pm
May 24, 2009 at 1:34 am -
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+="*" ...
Joel Ross
May 22, 2009 at 9:17 am
May 23, 2009 at 4:15 am -
I'm using Ubuntu and some of the packages in the repository are too old. So I got the thought to remove nearly all packages downloaded from the repository and install them with easy_install. Is this ...
Sverre
May 18, 2009 at 7:52 pm
May 19, 2009 at 11:57 pm -
I have about 150 unix formated text files that I would like to convert to dos formated. I am guessing that I loop though each file in the directory, read each line and conver the last character, then ...
Walterbyrd
May 12, 2009 at 8:39 pm
May 13, 2009 at 2:32 pm -
Hi all! I have long tried to avoid decorators, but now I find myself in a situation where I think they can help. I seem to be able to decorate functions, but I fail miserably when trying to decorate ...
Mikael Olofsson
May 8, 2009 at 3:33 pm
May 12, 2009 at 10:04 am -
13
SQL and CSV
I have a requirement to read a CSV file. Normally, no problem, just import CSV and slurp the file up. However, in this case I want to filter out lines that have fields set to particular values. It ...Nick
May 5, 2009 at 4:07 pm
May 9, 2009 at 4:50 am -
I've been playing around recently with customizing the deepcopy semantics within an inheritance hierarchy, and run across the following hurdle. Assume that class B inherits from class A, and that ...
Michael H. Goldwasser
May 31, 2009 at 5:27 am
Jun 3, 2009 at 11:45 pm -
I have written a socket server and some arbitrary clients. When I shutdown the server, and do socket.close(), I cannot immediately start it again cause it has some open sockets in TIME_WAIT state. It ...
Igor Katson
May 24, 2009 at 8:45 am
May 31, 2009 at 8:00 am -
Hi All, I have data in Spread Sheet ( First Name and Last Name), how can i see this data in Python code ( how can i use Spread Sheet as Data Store ) . -- Regards Kalyan An HTML attachment was ...
Kalyan Chakravarthy
May 18, 2009 at 11:01 am
May 20, 2009 at 7:31 am -
Hello, I'm Vilnius college II degree student and last semester our teacher introduced us to python I've used to program with Delphi, so I very fast adopted to python Now I'm developing cross platform ...
Gediminas Kregzde
May 15, 2009 at 11:56 am
May 18, 2009 at 4:51 pm -
Hello, I am wondering if it's possible to get the return value of a method *without* calling it using introspection? something like this, suppose I want to know the type of the return value for the ...
Flamz3d
May 14, 2009 at 12:32 pm
May 15, 2009 at 5:34 pm
Group Overview
group | python-list |
categories | python |
discussions | 575 |
posts | 3,287 |
users | 716 |
website | python.org |
716 users for May 2009
Archives
- September 2015 (591)
- August 2015 (1,058)
- July 2015 (1,440)
- June 2015 (1,704)
- May 2015 (1,841)
- April 2015 (1,231)
- March 2015 (1,717)
- February 2015 (1,612)
- January 2015 (889)
- December 2014 (1,283)
- November 2014 (1,600)
- October 2014 (1,447)
- September 2014 (1,031)
- August 2014 (1,867)
- July 2014 (1,618)
- June 2014 (1,357)
- May 2014 (1,431)
- April 2014 (1,285)
- March 2014 (2,093)
- February 2014 (1,999)
- January 2014 (2,089)
- December 2013 (2,060)
- November 2013 (2,507)
- October 2013 (1,932)
- September 2013 (1,634)
- August 2013 (1,532)
- July 2013 (2,062)
- June 2013 (2,795)
- May 2013 (1,935)
- April 2013 (1,980)
- March 2013 (1,953)
- February 2013 (1,789)
- January 2013 (1,924)
- December 2012 (1,569)
- November 2012 (1,579)
- October 2012 (1,961)
- September 2012 (2,311)
- August 2012 (1,808)
- July 2012 (1,577)
- June 2012 (1,199)
- May 2012 (1,197)
- April 2012 (1,416)
- March 2012 (1,373)
- February 2012 (1,442)
- January 2012 (1,446)
- December 2011 (1,895)
- November 2011 (1,291)
- October 2011 (1,188)
- September 2011 (1,587)
- August 2011 (2,069)
- July 2011 (2,140)
- June 2011 (1,908)
- May 2011 (2,475)
- April 2011 (2,098)
- March 2011 (1,761)
- February 2011 (1,746)
- January 2011 (2,123)
- December 2010 (1,671)
- November 2010 (2,355)
- October 2010 (2,518)
- September 2010 (2,187)
- August 2010 (3,098)
- July 2010 (2,579)
- June 2010 (3,238)
- May 2010 (2,458)
- April 2010 (2,356)
- March 2010 (2,759)
- February 2010 (3,486)
- January 2010 (3,294)
- December 2009 (2,899)
- November 2009 (3,396)
- October 2009 (3,346)
- September 2009 (3,087)
- August 2009 (3,903)
- July 2009 (3,761)
- June 2009 (3,321)
- May 2009 (3,370)
- April 2009 (4,272)
- March 2009 (4,228)
- February 2009 (3,965)
- January 2009 (4,732)
- December 2008 (4,335)
- November 2008 (3,799)
- October 2008 (4,123)
- September 2008 (3,816)
- August 2008 (4,056)
- July 2008 (4,238)
- June 2008 (3,737)
- May 2008 (4,976)
- April 2008 (4,708)
- March 2008 (4,122)
- February 2008 (4,132)
- January 2008 (4,145)
- December 2007 (3,686)
- November 2007 (3,419)
- October 2007 (4,234)
- September 2007 (4,332)
- August 2007 (4,189)
- July 2007 (3,771)
- June 2007 (4,142)
- May 2007 (5,018)
- April 2007 (4,912)
- March 2007 (4,365)
- February 2007 (3,951)
- January 2007 (3,864)
- December 2006 (4,449)
- November 2006 (4,229)
- October 2006 (5,506)
- September 2006 (5,244)
- August 2006 (4,829)
- July 2006 (4,720)
- June 2006 (5,054)
- May 2006 (5,302)
- April 2006 (4,845)
- March 2006 (5,729)
- February 2006 (4,839)
- January 2006 (5,249)
- December 2005 (5,011)
- November 2005 (5,677)
- October 2005 (5,387)
- September 2005 (4,458)
- August 2005 (4,428)
- July 2005 (4,472)
- June 2005 (4,562)
- May 2005 (4,269)
- April 2005 (5,019)
- March 2005 (5,070)
- February 2005 (5,159)
- January 2005 (5,194)
- December 2004 (5,211)
- November 2004 (4,048)
- October 2004 (5,191)
- September 2004 (5,534)
- August 2004 (6,168)
- July 2004 (4,217)
- June 2004 (4,202)
- May 2004 (3,890)
- April 2004 (4,285)
- March 2004 (5,077)
- February 2004 (4,213)
- January 2004 (3,988)
- December 2003 (3,818)
- November 2003 (4,940)
- October 2003 (6,297)
- September 2003 (4,299)
- August 2003 (5,654)
- July 2003 (4,912)
- June 2003 (4,933)
- May 2003 (4,938)
- April 2003 (5,017)
- March 2003 (5,031)
- February 2003 (7,701)
- January 2003 (6,229)
- December 2002 (4,102)
- November 2002 (4,346)
- October 2002 (3,307)
- September 2002 (4,206)
- August 2002 (4,919)
- July 2002 (4,826)
- June 2002 (4,215)
- May 2002 (5,295)
- April 2002 (5,967)
- March 2002 (5,323)
- February 2002 (5,245)
- January 2002 (5,617)
- December 2001 (4,443)
- November 2001 (4,565)
- October 2001 (3,669)
- September 2001 (3,719)
- August 2001 (5,208)
- July 2001 (6,528)
- June 2001 (4,905)
- May 2001 (5,492)
- April 2001 (4,713)
- March 2001 (4,478)
- February 2001 (3,871)
- January 2001 (4,187)
- December 2000 (3,099)
- November 2000 (2,336)
- October 2000 (3,820)
- September 2000 (3,933)
- August 2000 (4,253)
- July 2000 (4,199)
- June 2000 (4,089)
- May 2000 (4,269)
- April 2000 (3,217)
- March 2000 (3,719)
- February 2000 (4,000)
- January 2000 (2,682)
- December 1999 (2,283)
- November 1999 (1,896)
- October 1999 (2,048)
- September 1999 (2,001)
- August 1999 (2,151)
- July 1999 (2,351)
- June 1999 (2,386)
- May 1999 (2,201)
- April 1999 (1,706)
- March 1999 (6)
- February 1999 (1)