FAQ

Search Discussions

445 discussions - 3,288 posts

  • What are the arguments for choosing Python against Ruby for introductory programming ? Python has no provisions for tail recursion, Ruby is going to... So what ? Thanks, JG
    Jean Guillaume PyraksosJean Guillaume Pyraksos
    Jan 27, 2010 at 1:01 pm
    Feb 10, 2010 at 6:30 pm
  • I observe that python library primarily use exception for error handling rather than use error code. In the article API Design Matters by Michi Henning Communications of the ACM Vol. 52 No. 5, Pages ...
    Peng YuPeng Yu
    Jan 1, 2010 at 4:47 am
    Jan 7, 2010 at 7:30 pm
  • The v2.6.4 version of the tutorial says this: ''' It is also possible to use a list as a queue, where the first element added is the first element retrieved (?first-in, first-out?); however, lists ...
    Steve HowellSteve Howell
    Jan 22, 2010 at 7:14 pm
    Jan 27, 2010 at 2:53 pm
  • Hi folks, I was going to write this post for a while because all sorts of myths periodically come up on this list about python 3. I don't think the posters mean to spread false information on ...
    Daniel FetchinsonDaniel Fetchinson
    Jan 27, 2010 at 10:32 am
    Feb 1, 2010 at 11:08 pm
  • Some thoughts about Python 3 Adoption. Xah Lee, 2010-01-26 Some notes of Wikipedia readings related to Python. Unladen Swallow, a new project from Google. It is a new python compiler with the goal of ...
    Xah LeeXah Lee
    Jan 26, 2010 at 11:47 pm
    Jan 29, 2010 at 3:35 pm
  • Hello all, When passing parameters to a function, you sometimes need a paramter which can only assume certain values, e.g. def move (direction): ... If direction can only be "up", "down", "left" or ...
    Martin DrautzburgMartin Drautzburg
    Jan 21, 2010 at 7:43 am
    Jan 29, 2010 at 8:08 am
  • I have a plain text file which I would like to protect in a very simple minded, yet for my purposes sufficient, way. I'd like to encrypt/convert it into a binary file in such a way that possession of ...
    Daniel FetchinsonDaniel Fetchinson
    Jan 8, 2010 at 7:14 pm
    Jan 18, 2010 at 7:45 pm
  • Just as a contribution, since someone hinted that I haven't really contributed much to the Python community. The [simple_sound] code will probably go into my ch 3 at <url: ...
    Alf P. SteinbachAlf P. Steinbach
    Jan 14, 2010 at 5:09 am
    Jan 25, 2010 at 2:50 pm
  • Argh! This was really annoying! Much time wasted (one naturally thinks that silly error must be one's own). But, anyway: Lines: 244 nitems = (chunk.chunksize - chunk.size_read) / self._sampwidth 464 ...
    Alf P. SteinbachAlf P. Steinbach
    Jan 12, 2010 at 8:25 am
    Jan 13, 2010 at 11:14 pm
  • I'm a little confused. Is python not good enough? for google, enhance python performance is the good way better then choose build Go language? Go language try to merge low level, hight level and ...
    Ikuta liuIkuta liu
    Jan 12, 2010 at 3:09 pm
    Jan 25, 2010 at 5:22 pm
  • PEP 3147 has just been posted, proposing that, beginning in release 3.2 (and possibly 2.7) compiled .pyc and .pyo files be placed in a directory with a .pyr extension. The reason is so that compiled ...
    John RothJohn Roth
    Jan 30, 2010 at 10:14 pm
    Feb 3, 2010 at 10:28 pm
  • Hello I use a dictionary to keep a list of users connected to a web site. To avoid users from creating login names that start with digits in order to be listed at the top, I'd like to sort the list ...
    Gilles GanaultGilles Ganault
    Jan 22, 2010 at 12:17 pm
    Jan 25, 2010 at 6:57 am
  • Folks, I am new to Python and could not find a function along the lines of string.ishex in Python. There is however, a string.hexdigits constant in the string module. I thought I would enhance the ...
    ChandraChandra
    Jan 14, 2010 at 3:52 pm
    Jan 22, 2010 at 4:00 pm
  • hi. what is the most pythonic way to substitute substrings? eg: i want to apply: foo -- bar baz -- quux quuux -- foo so that: fooxxxbazyyyquuux -- barxxxquuxyyyfoo bye
    SuperpolloSuperpollo
    Jan 18, 2010 at 10:15 am
    Jan 22, 2010 at 8:39 am
  • were "cmd" is a command with its arguments to pass them to the shell and run it, i.e. or Does anybody knows any library to help me to avoid the use of the main quotes, and brackets? I would to use ...
    Joan MillerJoan Miller
    Jan 28, 2010 at 6:20 pm
    Feb 5, 2010 at 4:23 pm
  • Hi folks, I am a newbie to python, and I would be grateful if someone could point out the mistake in my program. Basically, I have a huge text file similar to the format below: AAAAAGACTCGAGTGCGCGGA ...
    EvilweaselEvilweasel
    Jan 28, 2010 at 3:07 pm
    Feb 3, 2010 at 3:03 pm
  • I thought I'd put a page break, chr(12), character in a txt file I wrote to skip to the top of the page. It doesn't work. Comments?
    W. eWatsonW. eWatson
    Jan 15, 2010 at 6:42 pm
    Jan 17, 2010 at 2:39 pm
  • In the python help for itertools, the following function is provided: def consume(iterator, n): "Advance the iterator n-steps ahead. If n is none, consume entirely." ...
    Muhammad AlkarouriMuhammad Alkarouri
    Jan 22, 2010 at 2:13 pm
    Jan 24, 2010 at 11:21 pm
  • Hi; I need to do something like the following: pat = re.compile('edit[0-9]*:[0-9]*') check = form.getfirst(pat) (to check things like 'edit0:1') How do I do this? TIA, beno -- The Logos has come to ...
    Victor SuberviVictor Subervi
    Jan 6, 2010 at 4:49 pm
    Jan 8, 2010 at 8:01 pm
  • Hypo Nt: def each_with_index(seq): index = 0 result = [] for item in seq: result.append([item, index]) index += 1 return result My Pythonic sequencing skills are obviously feeble. Can anything think ...
    PhlipPhlip
    Jan 5, 2010 at 7:58 pm
    Jan 7, 2010 at 1:37 pm
  • I put together a page about significant whitespace (and the lack thereof). You're invited to check it out: http://stromberg.dnsalias.org/~dstromberg/significant-whitespace.html
    Dan StrombergDan Stromberg
    Jan 1, 2010 at 10:02 pm
    Jan 5, 2010 at 1:58 am
  • Hi I am not an expert in programming and using Python for its simplicity I have 2 versions of python installed on my computer (windos xp) to begin the transition from version 2.4 to 2.6 or 3. ...
    LuisLuis
    Jan 14, 2010 at 11:21 am
    Jan 22, 2010 at 5:15 pm
  • Hello, I am acessing an Excel file by means of Win 32 COM technology. For a given cell, I am able to read its formula. I want to make a map of how cells reference one another, how different sheets ...
    VsolerVsoler
    Jan 5, 2010 at 6:12 pm
    Jan 15, 2010 at 7:23 am
  • (My apologies if this question shows up twice. I posted it quite a while ago, and it's yet to show up.) This is no doubt a beginner's question, but I've searched for the answer for quite a while, to ...
    Jive DadsonJive Dadson
    Jan 18, 2010 at 12:07 am
    Jan 18, 2010 at 12:28 pm
  • Maybe there's a more elegant way to do this. I want to express the result of datetime.datetime.now() in fractional hours. Here's one way. dt=datetime.datetime.now() xtup = dt.timetuple() h = ...
    W. eWatsonW. eWatson
    Jan 10, 2010 at 5:28 pm
    Jan 12, 2010 at 7:51 pm
  • I'm going to be starting some new Python projects in Python 2.6, but am concerned that at least three of the libraries I will be using--pycrypto, paramiko and feedparser--are not currently supported ...
    Kevin WalzerKevin Walzer
    Jan 27, 2010 at 3:23 pm
    Jan 28, 2010 at 6:06 pm
  • I have a series of subclasses that inherit methods from a base class, but I'd like them to have their own individual docstrings. The obvious solution (other than copy-and-paste) is this: class ...
    Steven D'ApranoSteven D'Aprano
    Jan 16, 2010 at 5:55 pm
    Jan 22, 2010 at 5:13 am
  • Yesterday I stumbled across some old code in a project I was working on. It does something like this: mystring = '\n'.join( [ line for line in lines if <some conditions depending on line ] ) where ...
    Gerald BrittonGerald Britton
    Jan 19, 2010 at 3:30 pm
    Jan 20, 2010 at 11:05 am
  • Hi there, I have an array x=[1,2,3] Is there an operator which I can use to get the result [1,1,1,2,2,2,3,3,3] ? I tried x*3, which resulted in [1,2,3,1,2,3,1,2,3] I also tried [[b,b,b] for b in x] ...
    SebastianSebastian
    Jan 11, 2010 at 6:21 am
    Jan 18, 2010 at 12:04 am
  • I just profiled one of my Python scripts and discovered that 99% of the time was spent in {built-in method sub} What is this function and is there a way to optimize it? Thanks, Jeremy
    JeremyJeremy
    Jan 11, 2010 at 7:20 pm
    Jan 12, 2010 at 12:46 am
  • Dear all, for a python program running on Win XP that is used to produce invoices I need to be able to have the printer print a page with just plain text, but positioned (almost) exactly at ...
    KvSKvS
    Jan 4, 2010 at 11:50 pm
    Jan 6, 2010 at 5:56 pm
  • Sikuli is the coolest Python project I have ever seen in my ten year hobbyist career. An MIT oepn source project, Sikuli uses Python to automate GUI tasks (in any GUI or GUI baed app that runs the ...
    RonRon
    Jan 25, 2010 at 3:18 am
    Jan 27, 2010 at 8:45 am
  • Greetings list I can code in Python (strong beginner), and would like to read more books and/or online resources. Could someone please point out any good books, websites, tutorials etc to help me get ...
    Stuart Murray-SmithStuart Murray-Smith
    Jan 5, 2010 at 2:15 pm
    Jan 9, 2010 at 7:19 pm
  • I have a daemon on a Linux system that supports a number of Windows clients. Among the functions is to send e-mails, which is sufficiently complicated that I fork() a separate process which gets ...
    CassiopeCassiope
    Jan 2, 2010 at 11:21 pm
    Jan 6, 2010 at 4:29 pm
  • I have a simple question to which I could not find an answer. What is the total maximal size of list including size of its elements? I do not like to look into python source. Here is a code example: ...
    Alexander MoibenkoAlexander Moibenko
    Jan 25, 2010 at 7:05 pm
    Jan 28, 2010 at 11:54 am
  • Hello everyone, I have two lists of IP addresses: hostips = [ 'a', 'b', 'c', 'd', 'e' ] thread_results = [ 'd', 'b', 'c' ] I need to sort thread_results in the same order as hostips. (Obviously, ...
    MkMk
    Jan 11, 2010 at 5:29 pm
    Jan 21, 2010 at 6:08 am
  • Hello Everyone, I am not sure if I have posted this question in a correct board. Can anyone please teach me: What is a list compression in Python? Would you mind give me some list compression ...
    KitKit
    Jan 18, 2010 at 4:07 pm
    Jan 20, 2010 at 7:13 pm
  • I just saw the thread for medians, and it reminded me of a problem that I need to solve. We are writing some Python software for sailing, and we need to detect when we've departed from the median ...
    Steve HowellSteve Howell
    Jan 23, 2010 at 12:09 am
    Jan 25, 2010 at 6:36 pm
  • Hello people, I have 5 directories corresponding 5 different urls .I want to download images from those urls and place them in the respective directories.I have to extract the contents and download ...
    Aditya shuklaAditya shukla
    Jan 6, 2010 at 4:26 am
    Jan 13, 2010 at 5:09 pm
  • I have a class of let's say empty bottle which can have a mix of two items. I want to create let's say 30 of these objects which will have names based on the 2 attributes (apple juice, beer, grape ...
    NavNav
    Jan 4, 2010 at 9:22 pm
    Jan 5, 2010 at 6:03 am
  • Is there any way to change the name of the function in an error message? In the example below I'd like the error to refer to bar(), for example (the motivation is related function decorators - I'd ...
    Andrew cookeAndrew cooke
    Jan 29, 2010 at 1:30 pm
    Feb 1, 2010 at 9:25 pm
  • I need a small utility to count the lines of Python code in a directory, traversing subdirectories and ignoring comments and docstrings. I am sure there is already something doing that, what do you ...
    Michele SimionatoMichele Simionato
    Jan 21, 2010 at 6:51 am
    Jan 23, 2010 at 11:05 am
  • Hi; The following code works fine. I would like you to suggest something more simple and elegant: sql = 'select p.ID from %sPackages p join %sCategoriesPackages c where c.CategoryID=%s;' % (store, ...
    Victor SuberviVictor Subervi
    Jan 9, 2010 at 1:23 pm
    Jan 20, 2010 at 3:24 pm
  • Referring to <url: http://tinyurl.com/programmingbookP3 Due to especially Steven D'Aprano's comments I've replaced "hopeless" with "very hard" in paragraph 1 of section 1.1 -- I know he'll disagree ...
    Alf P. SteinbachAlf P. Steinbach
    Jan 13, 2010 at 2:41 pm
    Jan 14, 2010 at 4:12 pm
  • Hi guys, I've got a problem with my program, in that the code just takes too long to run. Here's what I'm doing. If anyone has any tips, they'd be much appreciated! So, say I have a list of lists ...
    ElsaElsa
    Jan 28, 2010 at 11:52 pm
    Feb 2, 2010 at 1:12 am
  • Hi. Im very new with python. I have got some answer on my issue to use interop or COM ''plugins'' to access MS Word through python but i don't even know what those two ''plugins'' are so I cannot use ...
    3lvss08093lvss0809
    Jan 9, 2010 at 3:12 pm
    Jan 31, 2010 at 2:24 am
  • Hi. I'm trying to figure out how to force URLencoding in my Python 2.4.3 environment receiving data an input argument but I'm really at a loss here. What am I doing wrong? #!/usr/bin/env python ...
    JoãoJoão
    Jan 11, 2010 at 2:00 pm
    Jan 18, 2010 at 8:50 pm
  • This py [1,2,3] + (4,5) Traceback (most recent call last): File "<stdin ", line 1, in <module TypeError: can only concatenate list (not "tuple") to list -- Gabriel Genellina
    Gabriel GenellinaGabriel Genellina
    Jan 4, 2010 at 7:51 am
    Jan 5, 2010 at 3:01 am
  • Hi There seems to be several strategies to enhance the old ini-style config files with real python code, for example: 1) the documentation tool sphinx uses a python file conf.py that is exefile(d) , ...
    PeterPeter
    Jan 7, 2010 at 4:10 pm
    Jan 19, 2010 at 9:22 pm
  • Hi all, I am using Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41). I ran into this issue yesterday and wanted to check to see if this is a python bug. It seems that there is an inconsistency ...
    GizliGizli
    Jan 16, 2010 at 11:35 pm
    Jan 17, 2010 at 7:34 pm
Group Navigation
period‹ prev | Jan 2010 | next ›
Group Overview
grouppython-list @
categoriespython
discussions445
posts3,288
users550
websitepython.org

550 users for January 2010

Alf P. Steinbach: 140 posts Steve Holden: 123 posts Steven D'Aprano: 103 posts MRAB: 75 posts Terry Reedy: 63 posts Gabriel Genellina: 59 posts Peter Otten: 58 posts Chris Rebert: 53 posts Victor Subervi: 53 posts Aahz: 52 posts R0g: 52 posts Steve Howell: 52 posts Stefan Behnel: 51 posts Steven D'Aprano: 48 posts Ben Finney: 47 posts Paul Rubin: 45 posts Arnaud Delobelle: 44 posts Jean-Michel Pichavant: 39 posts Nobody: 37 posts Phlip: 37 posts
show more
Archives