Search Discussions

575 discussions - 3,287 posts

  • 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 ...
    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 ...
    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 ...
    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 PySeanm 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 ...
    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 ...
    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 RumpfAndreas 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: ...
    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 WithersChris 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 DanielsScott 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 BauerJohannes 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 HawthorneCasey 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 RossJoel 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 KeshetBen 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 ...
    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 ...
    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 ParthasarathyMohan 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. ...
    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 ...
    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 MientkiStef 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 MukherjeeSumitava 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 RossettiGabriel 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öwisMartin 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 TregarSam 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 ...
    May 12, 2009 at 3:06 am
    May 15, 2009 at 6:01 am
  • if anybody needs: http://code.google.com/p/phppython/
    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 ...
    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 BradyAaron 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 ...
    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 ...
    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 ...
    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 FergSteve 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 ...
    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 ...
    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 PetersonBenjamin 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 ...
    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é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 ...
    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 NagyLaszlo 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 ...
    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 RossJoel 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 ...
    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 ...
    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 OlofssonMikael Olofsson
    May 8, 2009 at 3:33 pm
    May 12, 2009 at 10:04 am
  • 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 ...
    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. GoldwasserMichael 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 KatsonIgor 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 ChakravarthyKalyan 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 KregzdeGediminas 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 ...
    May 14, 2009 at 12:32 pm
    May 15, 2009 at 5:34 pm
Group Navigation
period‹ prev | May 2009 | next ›
Group Overview
grouppython-list @

716 users for May 2009

Michele Petrazzo: 83 posts MRAB: 80 posts Dave Angel: 76 posts Scott David Daniels: 71 posts Steven D'Aprano: 70 posts Diez B. Roggisch: 67 posts Chris Rebert: 63 posts Norseman: 56 posts Piet van Oostrum: 55 posts Gabriel Genellina: 53 posts Terry Reedy: 52 posts Aahz: 51 posts Peter Otten: 47 posts Rhodri James: 45 posts Arnaud Delobelle: 43 posts Carl Banks: 42 posts Steven D'Aprano: 41 posts John Machin: 39 posts BearophileHUGS: 35 posts CTO: 35 posts
show more