FAQ

Search Discussions

463 discussions - 3,011 posts

  • Python is an object oriented langage (OOL). The Python main implementation is written in pure and "old" C90. Is it for historical reasons? C is not an OOL and C++ strongly is. I wonder if it wouldn't ...
    CandideCandide
    Aug 1, 2010 at 11:08 pm
    Aug 15, 2010 at 10:40 am
  • 1) Why do Python lists start with element [0], instead of element [1]? "Common sense" would seem to suggest that lists should start with [1]. 2) In Python 3, why is print a function only, so that: ...
    Default UserDefault User
    Aug 7, 2010 at 3:05 am
    Aug 24, 2010 at 4:06 am
  • [Q] How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ? Because a stack has push and pop, it is able to release and allocate memory. We envisage an exogenous ...
    Standish PStandish P
    Aug 16, 2010 at 7:20 am
    Aug 26, 2010 at 8:48 pm
  • Hi I'm writing a multithreaded app that relies on Queues to move data between the threads. I'm trying to write my objects in a general way so that I can reuse them in the future so I need to write ...
    EWEW
    Aug 11, 2010 at 4:55 pm
    Sep 12, 2010 at 1:11 am
  • level: beginner exercise: given that packs of McNuggets can only be bought in 6, 9 or 20 packs, write an exhaustive search to find the largest number of McNuggets that cannot be bought in exact ...
    BabaBaba
    Aug 11, 2010 at 8:14 pm
    Aug 18, 2010 at 8:02 pm
  • As monitors are getting bigger, is there a general change in opinion on the 79 chars limit in source files? I've experimented with 98 characters per line and I find it quite a bit more comfortable to ...
    AKAK
    Aug 17, 2010 at 2:35 am
    Aug 24, 2010 at 10:13 am
  • level: beginner the following code looks ok to me but it doesn't work. I would like some hints as to where my reasoning / thought goes wrong def i_palindrome(pal): while len(pal) 1: if pal[0] == ...
    BabaBaba
    Aug 27, 2010 at 8:53 am
    Sep 15, 2010 at 12:26 am
  • How does "x is not None" make any sense? "not x is None" does make sense. I can only surmise that in this context (preceding is) "not" is not a unary right-associative operator, therefore: x is not ...
    Wheres pythonmonksWheres pythonmonks
    Aug 5, 2010 at 3:42 pm
    Aug 13, 2010 at 6:03 am
  • Hello dear Pythoneers, I have over 500 .php web pages in various subfolders under 'data' folder that i have to rename to .html and and ditch the '<?' and '? ' tages from within and also insert a very ...
    ΝίκοςΝίκος
    Aug 8, 2010 at 12:20 am
    Aug 16, 2010 at 7:45 am
  • Level: Beginner exercise source: http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer-science-and-programming-fall-2008/assignments/pset3.pdf I am ...
    BabaBaba
    Aug 19, 2010 at 9:12 pm
    Sep 6, 2010 at 4:17 pm
  • =============================== cursor.execute( ''' SELECT host, hits, date FROM visitors WHERE page = '%s' ORDER BY date DESC ''' % (page) ) =============================== Someone told me NOT to do ...
    ΝίκοςΝίκος
    Aug 18, 2010 at 3:15 am
    Sep 4, 2010 at 1:10 pm
  • Is the "in" test faster for a dict or a set? Is "frozenset" faster than "set"? Use case is for things like applying "in" on a list of 500 or so words while checking a large body of text. John Nagle
    John NagleJohn Nagle
    Aug 29, 2010 at 7:12 pm
    Sep 3, 2010 at 6:05 pm
  • Hey guys, I am programming a webserver, I receive a jpeg file with the POST method.The file (.jpeg) is encoded in bytes, I parse the bytes by decoding them to a string. I wanted to know how i could ...
    Navkirat SinghNavkirat Singh
    Aug 26, 2010 at 5:22 pm
    Aug 27, 2010 at 11:14 pm
  • In my on-again-off-again experience with Python for 18 months, portability seems an issue. As an example, my inexperienced Python partner 30 miles away has gotten out of step somehow. I think by ...
    W. eWatsonW. eWatson
    Aug 6, 2010 at 1:50 am
    Aug 9, 2010 at 7:56 am
  • Hello everyone! I need to read, for each of the directories in a shared file server unit, who has access to the directories and what type of access privileges. This is something that I can easily do ...
    VsolerVsoler
    Aug 19, 2010 at 3:55 pm
    Aug 28, 2010 at 8:19 pm
  • Hi all, I would like to aquint myself with Python Interview questions . I am a Python Scripter, so if u could orient the pointers in the same direction it would be very handy Regards An HTML ...
    Prakash jpPrakash jp
    Aug 6, 2010 at 5:44 pm
    Aug 13, 2010 at 5:03 pm
  • Hello fellow Python Coders! I don't see the error in my attempt to set a a cookie in this test script. Can you help please?! Thank you! [code] #!/usr/bin/python # -*- coding: utf-8 -*- import Cookie ...
    ΝίκοςΝίκος
    Aug 1, 2010 at 4:56 pm
    Aug 4, 2010 at 6:22 pm
  • I know that this question has been asked for several times, but it surprises that there is no tool under very active development and the community activities are very low (mailing list posts). All ...
    Alex BarnaAlex Barna
    Aug 9, 2010 at 12:10 pm
    Mar 21, 2011 at 7:48 pm
  • # initialize cookie cookie = Cookie.SimpleCookie() cookie.load( os.environ.get('HTTP_COOKIE', '') ) mycookie = cookie.get('visitor') if ( mycookie and mycookie.value != 'nikos' ) or re.search( ...
    ΝίκοςΝίκος
    Aug 16, 2010 at 10:57 am
    Sep 2, 2010 at 2:30 am
  • Howdy-ho. So, I'm working on a project which embeds Python into a bigger system to provide extensibility. In this project, there's basically two types of people who will be entering python code. The ...
    Stephen HansenStephen Hansen
    Aug 13, 2010 at 11:37 pm
    Aug 22, 2010 at 3:23 am
  • Hi all, Im stuck on this problem: I have a function which return me a list of string (basically the result looks like: ["FN067_098_MEN", FN067_098_JIN", FN067_098_BG"] In other hand, I have another ...
    Alban NonaAlban Nona
    Aug 31, 2010 at 6:57 pm
    Sep 1, 2010 at 6:12 pm
  • When stdin is not a tty, Python seems to buffer all the input through EOF before processing any of it: [ron at mickey:~]$ cat | python print 123 print 456 <hit ctrl-D here 123 456 Is there a way to ...
    RGRG
    Aug 11, 2010 at 7:11 am
    Aug 12, 2010 at 7:32 pm
  • I'm running into some performance / memory bottlenecks on large lists. Is there any easy way to minimize/optimize memory usage? Simple str() and unicode objects() [Python 2.6.4/Linux/x86]: Lists of ...
    DmtrDmtr
    Aug 7, 2010 at 12:45 am
    Aug 7, 2010 at 2:41 pm
  • Assuming I have a module 'foo.py' with something like this: def error(s): print "Error", s sys.exit(1) def func(s): ... do some processing ... call error() if bad .. go to system exit. ... more ...
    BvdpBvdp
    Aug 14, 2010 at 11:05 pm
    Aug 30, 2010 at 3:28 am
  • Hi All, I have a script that does the following: from subprocess import Popen,PIPE,STDOUT def execute(command,cwd): return Popen( command, stderr=STDOUT, stdout=PIPE, universal_newlines=True, ...
    Chris WithersChris Withers
    Aug 5, 2010 at 11:16 am
    Aug 6, 2010 at 7:38 am
  • Hi all. Is there a way I can keep my floating point number as I typed it? For example, I want 34.52 to be 34.52 and NOT 34.5200000002. -- Bradley J. Hintze Graduate Student Duke University School of ...
    Bradley HintzeBradley Hintze
    Aug 12, 2010 at 8:43 pm
    Aug 13, 2010 at 9:34 pm
  • Hi there. I'm kind of a beginner with Python (and programming in general). My problem is with initializing a class. Let's say I've defined it like this: class foo: a = 0 b = 0 and later I'm trying to ...
    Costin GamentCostin Gament
    Aug 8, 2010 at 1:32 pm
    Aug 9, 2010 at 12:17 am
  • Looking for a method that does the opposite of 'split', i.e. elements in a list are automatically concatenated with a user selectable spacer in between e.g. '\t'. This is to prepare lines to be ...
    Alex van der SpekAlex van der Spek
    Aug 15, 2010 at 6:24 pm
    Aug 17, 2010 at 7:14 pm
  • Level: beginner I would like to know how to approach the following Fibonacci problem: How may rabbits do i have after n months? I'm not looking for the code as i could Google that very easily. I'm ...
    BabaBaba
    Aug 28, 2010 at 11:12 pm
    Sep 1, 2010 at 5:31 pm
  • Hi, i have a script that reads and writes linux paths in a file. I save the path (as unicode) with 2 other variables. I save them seperated by "," and the "packets" by newlines. So my file looks like ...
    AmFreakAmFreak
    Aug 31, 2010 at 2:49 pm
    Sep 1, 2010 at 1:46 pm
  • Hi! Does anyone know of an easy way to convert a Unicode string into an image file (either jpg or png)? TIA! ~k
    KjKj
    Aug 28, 2010 at 12:01 am
    Aug 31, 2010 at 7:59 pm
  • See Subject. I use matplotlib, scipy, numpy and possibly one other module. If I go to the control panel, I only see numpy listed. Why? I use a search and find only numpy and Python itself. How can ...
    W. eWatsonW. eWatson
    Aug 8, 2010 at 4:16 pm
    Aug 11, 2010 at 11:24 pm
  • There's got to be a better way to do this: def editmoney(n) : return((",".join(reduce(lambda lst, item : (lst + [item]) if item else lst, re.split(r'(\d\d\d)',str(n)[::-1]),[])))[::-1]) '0' '13,535' ...
    John NagleJohn Nagle
    Aug 5, 2010 at 4:33 am
    Aug 7, 2010 at 9:53 am
  • That creates a list, and then calls "set" with the list as an argument. Every time, because that's what the code says: call "set" with a new list containing 1, 2, and 3. If you use a tuple instead of ...
    Thomas JollansThomas Jollans
    Aug 30, 2010 at 3:53 pm
    Sep 1, 2010 at 4:59 pm
  • I am a complete newbie to Python (and programming in general) and I have no idea what I'm missing. Below is a script that I am trying to work with and I cannot get it to work. When I call the final ...
    FuglyduckyFuglyducky
    Aug 11, 2010 at 4:07 pm
    Aug 30, 2010 at 9:24 am
  • Hello folks, You all know i been forced to use Ruby and i am not happy about that. But i thought i would share more compelling evidence of the moronicity of the Ruby language syntax from the ...
    RantingrickRantingrick
    Aug 9, 2010 at 12:43 am
    Aug 16, 2010 at 10:58 pm
  • Hello guys! Need your precious help again! In every html file i have in the very first line a page_id fro counetr countign purpsoes like in a format of a comment like this: <!-- 1 -- <!-- 2 -- <!-- 3 ...
    ΝίκοςΝίκος
    Aug 7, 2010 at 5:29 pm
    Aug 7, 2010 at 8:29 pm
  • It's been awhile since I've used python, and I recall there is a way to find the version number from the IDLE command line prompt. dir, help, __version.__? I made the most minimal change to a ...
    W. eWatsonW. eWatson
    Aug 6, 2010 at 12:55 am
    Aug 7, 2010 at 4:12 pm
  • Problem: Given tuples in the form (key, string), use 'key' to determine what string method to apply to the string: key operation ----------------------- l lower() u upper() t title() ... Commentary: ...
    Tim DaneliukTim Daneliuk
    Aug 19, 2010 at 11:27 pm
    Aug 25, 2010 at 10:35 am
  • There is a blog post from Jimmy Schementi who previously worked at Microsoft on IronRuby about the state of dynamic language work there. ...
    Neil HodgsonNeil Hodgson
    Aug 7, 2010 at 12:05 am
    Aug 11, 2010 at 11:52 pm
  • Hello, I'm building an elevator simulator for a class assignment. I recently ran into a roadblock and don't know how to fix it. For some reason, in my checkQueue function below, the call to ...
    Brandon McCombsBrandon McCombs
    Aug 5, 2010 at 7:25 am
    Aug 7, 2010 at 6:10 am
  • Okey, i have many hours now struggling to convert a mysql datetime field that i retreive to a string of this format '%d %b, %H:%M' I google a lot but couldnt found out how to format it being a string ...
    ΝίκοςΝίκος
    Aug 4, 2010 at 11:40 pm
    Feb 24, 2011 at 9:53 am
  • I'm interested in studying the itertools source code, especially the permutations function. However, I cannot find the library. Where could I find it? Running Python 3.1 Thank you
    VsolerVsoler
    Aug 31, 2010 at 2:00 am
    Sep 1, 2010 at 7:30 pm
  • This is all about walking trees, recursion and generators. None of which fit my brain at all! From an XML tree (an SVG file) I build a bunch of Tag objects. [I use lxml, but I am combining multiple ...
    DonnDonn
    Aug 28, 2010 at 3:21 am
    Aug 28, 2010 at 2:39 pm
  • The regular expression "split" behaves slightly differently than string split: ['', 'HELLO', 'THERE', ''] ['VERISIGN', 'INC', ''] I'd thought that "split" would never produce an empty string, but it ...
    John NagleJohn Nagle
    Aug 2, 2010 at 5:34 pm
    Aug 5, 2010 at 10:07 am
  • I am developing a little program in Mac with wxPython. But I have problems with the characters that are not in ASCII. Like some special characters in French or Turkish. So I am looking for a way to ...
    Ata.jafAta.jaf
    Aug 17, 2010 at 8:19 pm
    Aug 23, 2010 at 9:38 pm
  • Here's the story : I've been hired by a company as a consultant to reorganise there development department. The actual situation is : The manager of the development has been fired, main reason (what ...
    RonyRony
    Aug 20, 2010 at 8:16 am
    Aug 20, 2010 at 6:34 pm
  • Hello to all I am new to python. I am facing problem to use variables as object attributes. I have to use loop and dynamically add attributes to a object and for this purpose I have to use variables ...
    Vikas MahajanVikas Mahajan
    Aug 16, 2010 at 1:40 pm
    Aug 17, 2010 at 5:19 pm
  • I'm looking for a module that implements "persistent lists": objects that behave like lists except that all their elements are stored on disk. IOW, the equivalent of "shelves", but for lists rather ...
    KjKj
    Aug 10, 2010 at 12:19 pm
    Aug 15, 2010 at 3:13 pm
  • Hi, all, Is there a way to get a number of files in a particular directory? I tried using os.walk, os.listdir but they are return me with a list, tuple of the files, etc. But I want it to return a ...
    Blur959Blur959
    Aug 13, 2010 at 7:54 am
    Aug 13, 2010 at 7:30 pm
Group Navigation
period‹ prev | Aug 2010 | next ›
Group Overview
grouppython-list @
categoriespython
discussions463
posts3,011
users553
websitepython.org

553 users for August 2010

MRAB: 114 posts Peter Otten: 101 posts Steven D'Aprano: 94 posts Lawrence D'Oliveiro: 88 posts Νίκος: 84 posts Thomas Jollans: 61 posts Chris Rebert: 51 posts Paul Rubin: 43 posts Terry Reedy: 41 posts John Nagle: 40 posts Aahz: 36 posts Stefan Schwarzer: 35 posts Dave Angel: 34 posts Chris Hare: 32 posts Jean-Michel Pichavant: 32 posts Navkirat Singh: 32 posts Roy Smith: 32 posts Thomas Jollans: 32 posts Grant Edwards: 31 posts Gregory Ewing: 31 posts
show more
Archives