Search Discussions

775 discussions - 4,360 posts

  • I have to generate a list of N random numbers (integer) whose sum is equal to M. If, for example, I have to generate 5 random numbers whose sum is 50 a possible solution could be [3, 11, 7, 22, 7]. ...
    Mar 9, 2007 at 2:44 pm
    Mar 14, 2007 at 5:13 pm
  • I'm using Python for what is becoming a sizeable project and I'm already running into problems organizing code and importing packages. I feel like the Python package system, in particular the ...
    Martin UnsalMartin Unsal
    Mar 5, 2007 at 12:21 am
    Mar 7, 2007 at 5:56 pm
  • OK... I've been told that Both Fortran and Python are easy to read, and are quite useful in creating scientific apps for the number crunching, but then Python is a tad slower than Fortran because of ...
    Nomad CNomad C
    Mar 26, 2007 at 1:20 pm
    Mar 29, 2007 at 4:11 am
  • Hi all, I have recently released version 0.0.20 and 0.0.21 of Shed Skin, an optimizing Python-to-C++ compiler. Shed Skin allows for translation of pure (unmodified), implicitly statically typed ...
    Mark DufourMark Dufour
    Mar 31, 2007 at 9:55 am
    Jul 10, 2007 at 2:58 pm
  • I get the following behaviour on Python 2.5 (OS X 10.4.8 on PowerPC, in case it's relevant.) (0.0, 0.0) (-0.0, -0.0) I would have expected y to be -0.0 in the first case, and 0.0 in the second. ...
    Mark DickinsonMark Dickinson
    Mar 11, 2007 at 3:31 pm
    Mar 13, 2007 at 5:50 am
  • Hi all, Imagine I have three functions a(x), b(x), c(x) that each return something or raise an exception. Imagine I want to define a function that returns a(x) if possible, otherwise b(x), otherwise ...
    Arnaud DelobelleArnaud Delobelle
    Mar 7, 2007 at 6:32 pm
    Mar 9, 2007 at 12:53 pm
  • If you had an application that you were about to begin development on which you wanted to be cross platform (at least Mac and Windows), would you suggest using c++ and Python? I'm asking because we ...
    David CramerDavid Cramer
    Mar 11, 2007 at 3:23 am
    Mar 13, 2007 at 10:22 pm
  • Hi John, I had exactly this problem... use the PyFile_AsFile function. Below is a code snippet from my project: // Thank you: http://www.ragestorm.net/tutorial?id!#8 PyObject* PyFileObject = ...
    Carl DouglasCarl Douglas
    Mar 21, 2007 at 3:08 am
    Mar 25, 2007 at 8:35 am
  • Had a thought that's grown on me. No idea if it's original or not- too inexperienced in programming- but I guess there's no harm floating it out there. Python wins big on readability, and there's no ...
    Mar 9, 2007 at 9:14 am
    Mar 11, 2007 at 8:44 am
  • Hi ,Im a BSc4 Maths/Computer Science student.Unfortunately my curriculum did not include Python programming yet I see many vacancies for Python developers.I studied programming Pascal,C++ and ...
    Mar 16, 2007 at 11:41 am
    Apr 3, 2007 at 5:45 am
  • I'm trying to use Python to work with large pipe ('|') delimited data files. The files range in size from 25 MB to 200 MB. Since each line corresponds to a record, what I'm trying to do is create an ...
    Matt GarmanMatt Garman
    Mar 23, 2007 at 9:11 pm
    Mar 26, 2007 at 10:27 pm
  • Hi! I was told in this NG that string is obsolet. I should use str methods. So, how do I join a list of strings delimited by a given char, let's say ','? Old way: l=['a','b','c'] ...
    Paulo da SilvaPaulo da Silva
    Mar 23, 2007 at 6:37 pm
    Mar 25, 2007 at 10:44 pm
  • I want to upgrade to 2.5 but I don't see any unistall instructions anywhere. Robert
    Robert HicksRobert Hicks
    Mar 24, 2007 at 5:30 pm
    Mar 25, 2007 at 7:03 pm
  • Given class Node(object): pass node = Node() nextnode = Node() I tried to refactor the following piece of code node.next = nextnode node = nextnode as node = node.next = nextnode only to discover ...
    Marcin CiuraMarcin Ciura
    Mar 21, 2007 at 9:53 pm
    Mar 22, 2007 at 6:42 pm
  • hi, I am puzzled about how to determine whether an object is initilized in one class, anyone could give me any instructions? here is an example code: class coffee: def boil(self): self.temp = 80 a = ...
    Mar 19, 2007 at 7:37 am
    Mar 26, 2007 at 7:43 am
  • ========================================== PyPy 1.0: JIT compilers for free and more ========================================== Welcome to the PyPy 1.0 release - a milestone integrating the results ...
    Carl Friedrich BolzCarl Friedrich Bolz
    Mar 27, 2007 at 9:48 pm
    Mar 30, 2007 at 9:08 pm
  • Hi, I've written a script which uses Optik/Optparse to display the options (which works fine). The text for the help message is localised (with german umlauts) and when I execute the script with the ...
    Thorsten KampeThorsten Kampe
    Mar 31, 2007 at 10:01 pm
    Apr 2, 2007 at 6:06 pm
  • Hi, I'm new to python and looking for a better idiom to use for the manner I have been organising my python scripts. I've googled all over the place about this but found absolutely nothing. I'm a ...
    Mar 21, 2007 at 12:37 am
    Mar 25, 2007 at 10:26 am
  • Hi all, I looked to the PEPs & didn't find a proposition to remove brackets & commas for to make Python func call syntax caml- or tcl- like: instead of result = myfun(param1, myfun2(param5, param8), ...
    Mar 21, 2007 at 2:38 pm
    Mar 23, 2007 at 3:15 pm
  • Howdy Folks, I was just playing around in IDLE at the interactive prompt and typed in dir({}) for the fun of it. I was quite surprised to see a pop method defined there. I mean is that a misnomer or ...
    Nicholas ParsonsNicholas Parsons
    Mar 3, 2007 at 8:36 pm
    Mar 6, 2007 at 3:15 am
  • Did anyone write a contextmanager implementing a timeout for python2.5? I'd love to be able to write something like with timeout(5.0) as exceeded: some_long_running_stuff() if exceeded: print "Oops - ...
    Nick Craig-WoodNick Craig-Wood
    Mar 26, 2007 at 10:30 am
    Mar 31, 2007 at 9:30 am
  • http://www.spoj.pl/problems/SUMFOUR/ 3 0 0 0 0 0 0 0 0 -1 -1 1 1 Answer for this input data is 33. My solution for the problem is ...
    Mar 15, 2007 at 10:42 pm
    Mar 26, 2007 at 2:09 pm
  • Hi all I suspect I may be missing something vital here, but Python's garbage collection doesn't seem to work as I expect it to. Here's a small test program which shows the problem on python 2.4 and ...
    Tom WrightTom Wright
    Mar 21, 2007 at 1:13 pm
    Mar 22, 2007 at 2:42 pm
  • Hi, I am looking for the most efficient / cleanest way to implement a socket read with timeout (Windows mainly but would be great if the same code worked under *nix) Tanks, hg
    Mar 27, 2007 at 6:35 am
    Apr 3, 2007 at 6:17 am
  • Sorry to put here too many questions about __init__ __new__ stuff but I always found a new problem when using them. I have searched for simple __new__ docs on how to do the basic things but find ...
    Paulo da SilvaPaulo da Silva
    Mar 17, 2007 at 9:31 pm
    Mar 23, 2007 at 2:41 pm
  • Hello All, I have a hard question, every time I look for this answer its get out from the technical domain and goes on in the moral/social domain. First, I live in third world with bad gov., bad ...
    Mar 21, 2007 at 1:36 pm
    Mar 23, 2007 at 5:44 am
  • Hi, I create a dictionary like this myDict = {} and I add entry like this: myDict['a'] = 1 but how can I empty the whole dictionary? Thank you.
    Marko Cain 23Marko Cain 23
    Mar 28, 2007 at 10:38 pm
    Apr 10, 2007 at 5:59 am
  • I am trying to get a program to add up input from the user to get to the number 100 using a loop. However, I am having some issues. Here is what I have so far. I know I am just trying to hard, but I ...
    Mar 5, 2007 at 6:33 pm
    Mar 12, 2007 at 9:48 pm
  • Hi guys!!! Just one quick question... Which database module should I use when I want to use multi threading as my application requires lots of data from internet ???? I also want this database module ...
    Mar 10, 2007 at 2:14 pm
    Mar 11, 2007 at 12:58 pm
  • I'm new to Python and fairly experienced in Perl, although that experience is limited to the things I use daily. I wrote the same script in both Perl and Python, and the output is identical. The run ...
    Shawn MiloShawn Milo
    Mar 2, 2007 at 10:44 pm
    Mar 4, 2007 at 10:48 pm
  • What are OOP's Jargons and Complexities Xah Lee, 20050128 Classes, Methods, Objects In computer languages, often a function definition looks like this: subroutine f (x1, x2, ...) { variables ... do ...
    Xah LeeXah Lee
    Mar 29, 2007 at 3:01 pm
    Mar 31, 2007 at 6:45 pm
  • When is it appropriate to use dict.items() vs dict.iteritems. Both seem to work for something like: for key,val in mydict.items(): print key,val for key,val in mydict.iteritems(): print key,val Also, ...
    Mar 14, 2007 at 3:30 pm
    Mar 15, 2007 at 9:23 pm
  • It seems like this would be easy but I'm drawing a blank. What I want to do is be able to open any file in binary mode, and read in one byte (8 bits) at a time and then count the number of 1 bits in ...
    Mar 1, 2007 at 6:52 am
    Mar 7, 2007 at 5:42 am
  • I am looking for a fake consumer review generator that could generate realistic looking reviews for any products, kind of like on amazon.com but generated by Artificial Intelligence. Is there a ...
    Mar 29, 2007 at 6:19 pm
    Apr 3, 2007 at 9:53 am
  • Hi I need to process a really huge text file (4GB) and this is what i need to do. It takes for ever to complete this. I read some where that "list comprehension" can fast up things. Can you point out ...
    Rkmr EmRkmr Em
    Mar 18, 2007 at 4:11 pm
    Mar 19, 2007 at 5:50 am
  • Hello everyone, can I sort a multidimensional array in Python by multiple sort keys? A litte code sample would be nice! Thx, Rehceb
    Rehceb RotkivRehceb Rotkiv
    Mar 31, 2007 at 12:43 pm
    Apr 2, 2007 at 3:02 pm
  • Hello, Here is what I do in C++ and can not right now in python : pushMatrix() { drawStuff(); pushMatrix(); { drawSomeOtherStuff() } popMatrix(); } popMatrix(); The curly brackets have no functional ...
    Mar 30, 2007 at 9:04 am
    Mar 31, 2007 at 2:05 pm
  • I am brand new to pylint. As a tab user, I want the tabs warning turned off. How? Larger question: where is the config file format documented? Thanks, Alan Isaac PS This is a wonderful tool.
    Alan IsaacAlan Isaac
    Mar 8, 2007 at 5:26 pm
    Mar 10, 2007 at 9:40 pm
  • Does this class need anything more? Is there any risk of a lookup loop? Seems to work... class attrdict(dict): """Dict where d['foo'] also can be accessed as d.foo""" def __init__(self, *args, ...
    Hallvard B FurusethHallvard B Furuseth
    Mar 2, 2007 at 11:04 am
    Mar 9, 2007 at 9:38 am
  • Hi Folks, OK I love the logging module. I use it everywhere. I was happily putting at the top of each of my scripts ------<snip ------ #!/usr/bin/env python2.4 import logging LOGLEVEL=logging.INFO # ...
    Mar 20, 2007 at 4:22 pm
    Mar 23, 2007 at 6:25 pm
  • If I build a strict with: import struct print struck.pack ('i', 1) it returns a '\n'. What's wrong with it??? :( -- Andr?s M. ---------------------------------------------
    Mar 19, 2007 at 5:12 am
    Mar 20, 2007 at 10:18 am
  • Hello all, I come from a shell/perl background and have just to learn python. To start with, I'm trying to obtain system information from a Linux server using the /proc FS. For example, in order to ...
    Mar 14, 2007 at 12:37 pm
    Mar 19, 2007 at 3:33 pm
  • I have an ordered list e.g. x = [0, 100, 200, 1000], and given any positive integer y, I want to determine its appropriate position in the list (i.e the point at which I would have to insert it in ...
    Mar 16, 2007 at 5:59 pm
    Mar 18, 2007 at 5:33 pm
  • I've been installing Python and its supporting packages on a dedicated server with Fedora Core 6 for about a day now. This is a standard dedicated rackmount server in a colocation facility, ...
    John NagleJohn Nagle
    Mar 4, 2007 at 6:42 am
    Mar 11, 2007 at 1:24 am
  • Hi I am working on a python app, an outliner(a window with a TreeCtrl on the left to select a document, and a RichTextBox at the right to edit the current doc). I am familiarized with OOP concepts ...
    Mar 1, 2007 at 1:24 pm
    Mar 5, 2007 at 12:45 am
  • I have a sort function in a python chess program. Currently it looks like this: def sortMoves (board, table, ply, moves): f = lambda move: getMoveValue (board, table, ply, move) moves.sort(key=f, ...
    Thomas Dybdahl AhleThomas Dybdahl Ahle
    Mar 2, 2007 at 7:29 pm
    Mar 3, 2007 at 11:35 am
  • Here is some example code that produces an error: class Test(object): def greet(): print "Hello" t = Test() t.greet() TypeError: greet() takes no arguments (1 given) Ok. That makes sense. t.greet() ...
    Mar 25, 2007 at 3:24 am
    Mar 27, 2007 at 2:49 am
  • Hello, How do you create/spawn new processes in XP over telnet using python? I.e. I would like to create a new process and have it running in the background... when I terminate the telnet connection, ...
    Mar 23, 2007 at 10:47 am
    Mar 26, 2007 at 8:59 am
  • Neosynapse is seeking a senior software developer located in or willing to relocate to the Northern VA area to join a project building one of the largest grid computing data platforms in the world. ...
    Steven D. ArnoldSteven D. Arnold
    Mar 21, 2007 at 10:58 pm
    Mar 24, 2007 at 3:16 pm
  • On Java's Interface Xah Lee, 20050223 In Java the language, there's this a keyword ?interface?. In a functional language, a function can be specified by its name and parameter specs. For example: ...
    Xah LeeXah Lee
    Mar 21, 2007 at 5:23 am
    Mar 23, 2007 at 10:30 pm
Group Navigation
period‹ prev | Mar 2007 | next ›
Group Overview
grouppython-list @

921 users for March 2007

Gabriel Genellina: 197 posts Alex Martelli: 107 posts Kyosohma: 81 posts Diez B. Roggisch: 80 posts Steve Holden: 79 posts Bruno Desthuilliers: 72 posts John Nagle: 68 posts Steven D'Aprano: 66 posts Bruno Desthuilliers: 54 posts Duncan Booth: 50 posts Bjoern Schliessmann: 48 posts 7stud: 46 posts Marc 'BlackJack' Rintsch: 46 posts MonkeeSage: 44 posts Skip: 42 posts Ben Finney: 40 posts Paul Boddie: 39 posts Peter Otten: 39 posts Paulo da Silva: 37 posts Hendrik van Rooyen: 34 posts
show more