Search Discussions
-
I'm coaching a group of biologists on basic Python scripting. One of my charges mentioned that he had come across the advice never to use loops beginning with "while True". Of course, that's one way ...
Kj
Oct 10, 2009 at 8:15 pm
Oct 21, 2009 at 9:52 pm -
I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 (I can hear many of you shouting "don't - start with 2.6"), but as far as I ...
Alan Harris-Reid
Oct 25, 2009 at 11:52 pm
Nov 8, 2009 at 2:08 am -
[Cross-posted comp.programming and comp.lang.python] Hi. I may finally have found the perfect language for a practically oriented introductory book on programming, namely Python. C++ was way too ...
Alf P. Steinbach
Oct 28, 2009 at 6:52 am
Nov 3, 2009 at 12:38 am -
Traceback (most recent call last): File "<stdin ", line 1, in <module TypeError: sum() can't sum strings [use ''.join(seq) instead] Of course it is not a good way to join strings, but it should work, ...
Alan G Isaac
Oct 16, 2009 at 3:39 pm
Oct 27, 2009 at 9:12 pm -
I would assume that putting scripts into a folder with the aim of re- using pieces of them would be called a package, but since this is an "anti-pattern" according to Guido, apparently I'm ...
Bukzor
Oct 3, 2009 at 1:14 am
Oct 20, 2009 at 12:45 am -
This is a bit off topic except that many Python programmers seem to be allergic to typing SQL. RESOLVED: Using ORMs leads lazy programmers to make bad database designs. It's better to carefully ...
Aaron Watters
Oct 5, 2009 at 2:25 pm
Jan 6, 2010 at 2:41 am -
All I wanted to do is split a binary number into two lists, a list of blocks of consecutive ones and another list of blocks of consecutive zeroes. But no, you can't do that. ['', '', '1', '', '', '', ...
Mensanator
Oct 16, 2009 at 1:18 am
Oct 26, 2009 at 10:52 pm -
Thanks to everyone who helped with my query on reversing integers. I have one more simple problem I'm having trouble solving. I want to check a number for palindromic behavior (reading the same ...
Benjamin Middaugh
Oct 18, 2009 at 7:13 pm
Oct 22, 2009 at 5:05 pm -
I have the following files, which are in the directory 'test'. The parent directory of 'test' is in $PYTHONPATH. I have 'from A import A' and 'from B import B' in '__init__.py', because I want to use ...
Peng Yu
Oct 31, 2009 at 4:07 pm
Nov 1, 2009 at 11:02 pm -
If I understand things correctly, the set class uses hash() universally to calculate hash values for its elements. Is there a standard way to have set use a different function? Say I've got a ...
Austin Bingham
Oct 15, 2009 at 11:24 am
Oct 17, 2009 at 12:55 am -
Hi, py.folk! I need your help to understand how http://www.spoj.pl/problems/INOUTEST/ can be passed in Python. I see two guys who managed to get accepted: http://www.spoj.pl/ranks/INOUTEST/lang=PYTH ...
N00m
Oct 3, 2009 at 1:54 pm
Oct 10, 2009 at 11:51 am -
Challenge: to come up with a sorting task that cannot be achieved by passing to the sort method (or sorted function) suitable values for its key and reverse parameters, but instead *require* giving a ...
Kj
Oct 1, 2009 at 5:08 pm
Oct 7, 2009 at 5:15 pm -
hello, * this is not a troll * which kind of help you have with your favorite editor ? personnally, I find emacs very nice, in the current state of my knowledge, when I need to reindent the code. you ...
OdarR
Oct 7, 2009 at 4:07 pm
Oct 27, 2009 at 10:37 am -
hello, I want to handle datetime vars in a general way, so I use the default time-format, so I can use the standard cinversion procedures. Time format is the time difference since 1-1-1970. So how do ...
Stef Mientki
Oct 5, 2009 at 11:54 pm
Oct 12, 2009 at 6:34 pm -
Hi; I have the following archaic code that worked just fine for another site. It is called with the following url: http://13gems.com/stxresort/cart/getpic1.py?id=1&x=1 #!/usr/local/bin/python import ...
Victor Subervi
Oct 6, 2009 at 7:19 pm
Oct 8, 2009 at 6:06 pm -
Hello everyone, print hosts hosts = [ s.strip() for s in hosts if s is not '' and s is not None and s is not '\n' ] print hosts ['9.156.44.227\n', '9.156.46.34 \n', '\n'] ['9.156.44.227', ...
Mk
Oct 29, 2009 at 3:12 pm
Nov 3, 2009 at 3:04 pm -
I'm looking for code that will calculate the running median of a sequence, efficiently. (I'm trying to subtract the running median from a signal to correct for gradual drift). My naive attempt ...
Janto Dreijer
Oct 13, 2009 at 3:22 pm
Oct 26, 2009 at 3:28 pm -
A trivial one, this is the first time I have to deal with Unicode. I am trying to parse a string s='''48? 13' 16.80" N'''. I know the charset is "iso-8859-1". To get the degrees I did [u'48\xc2\xb0', ...
George Trojan
Oct 19, 2009 at 7:07 pm
Oct 28, 2009 at 4:41 pm -
23
Frameworks
Hi I have been searching through the vast array of python frameworks http://wiki.python.org/moin/WebFrameworks and its quite astounding the choice available. I am looking at using a web framework for ...Flebber
Oct 18, 2009 at 11:01 pm
Oct 24, 2009 at 8:16 am -
All, I've got a strange one.. I'm trying to create a class object inside another class object by using the code template below (note.. this isn't the exact code.. I'm having difficulty reproducing it ...
Horos11
Oct 4, 2009 at 3:32 am
Oct 6, 2009 at 11:42 pm -
Dear all, I have a question concerning the output of the id() function. In particular since is should: "" Return the identity of an object. This is guaranteed to be unique among simultaneously ...
Raffaele ponzini
Oct 14, 2009 at 10:46 am
Oct 17, 2009 at 10:29 pm -
This is not a request for help but a request for comments: Consider the following code and note that 1)The initializer uses the dictionary style of arguments 2)The check loop executes before all of ...
Tim Johnson
Oct 30, 2009 at 2:16 am
Nov 4, 2009 at 11:50 pm -
hello... if anyone know..please help me ! i really want to know...i was searched in google lot of time. but can't found clear soultion. and also because of my lack of python knowledge. i want to use ...
Elca
Oct 25, 2009 at 12:35 am
Oct 26, 2009 at 6:57 am -
Hello As my Master's dissertation I chose Cpython optimization. That's why i'd like to ask what are your suggestions what can be optimized. Well, I know that quite a lot. I've downloaded the source ...
Qrees
Oct 21, 2009 at 5:28 pm
Nov 6, 2009 at 5:33 pm -
hello I'm trying to convert 2 c++ functions in python they come from wpkg client https://wpkg.svn.sourceforge.net/svnroot/wpkg/wpkg-client/Sources/Components/XmlSettings.cpp they are CString ...
Toff
Oct 17, 2009 at 4:34 pm
Oct 21, 2009 at 3:50 pm -
Hi All; I'm new to Python and moving from C, which is probably a big source of my confusion. I'm struggling with something right now though and I hope you all can help. I have a global configuration ...
Mattofak
Oct 29, 2009 at 12:50 am
Nov 5, 2009 at 2:45 pm -
Hello! I use sqlite3 module for my sqlite database. I am trying to substitute table name in sql query. That's ok That's ok too Traceback (most recent call last): File "<string ", line 1, in <fragment ...
Lacrima
Oct 30, 2009 at 12:10 pm
Nov 3, 2009 at 1:19 pm -
Can I use a pyd compiled on linux in a Windows distribution? Or must I recompile it for windows users?
Bakes
Oct 29, 2009 at 4:44 pm
Nov 1, 2009 at 12:43 am -
19
umlauts
Hi all this has been bugging me for a long time and I do not seem to be able to understand what to do. I always have problems when dealing input text that contains umlauts. Consider the following: In ...Arian Kuschki
Oct 17, 2009 at 1:54 pm
Oct 18, 2009 at 1:41 am -
Hi. Or, to whomever this concerns... ;-) I thought it would be prudent to install 3.1.1 for Windows from scratch, so I uninstalled everything (CPython, ActivePython), and then installed Python 3.1.1. ...
Alf P. Steinbach
Oct 28, 2009 at 10:18 pm
Oct 29, 2009 at 3:46 pm -
16
import bug
I'm running into an ugly bug, which, IMHO, is really a bug in the design of Python's module import scheme. Consider the following directory structure: ham `-- spam.py ...with the following very ...Kj
Oct 31, 2009 at 3:12 pm
Nov 4, 2009 at 10:28 am -
How can one check that a Python script is lexically correct? As my Python apps grow in complexity and execution, I'm finding it more often the situation in which a program dies after a lengthy (i.e. ...
Kj
Oct 29, 2009 at 8:48 pm
Nov 3, 2009 at 12:53 pm -
I need to write a Python script that will call some command line programs (using os.system). I will have many such calls, but I want to control when the calls are made. I won't know in advance how ...
Jeremy
Oct 15, 2009 at 7:42 pm
Oct 23, 2009 at 1:17 pm -
Hi I thought that file objects were supposed to be garbage-collected and automatically closed once they go out of scope, at least that's what I've been told by more merited Python programmers. I'm ...
Arve Knudsen
Oct 19, 2009 at 11:45 am
Oct 20, 2009 at 7:21 pm -
hello, By writing the following unicode string (I hope it can be send on this mailing list) B?cken to a file fh.write ( line ) I get the following error: UnicodeEncodeError: 'ascii' codec can't ...
Stef Mientki
Oct 15, 2009 at 11:43 pm
Oct 19, 2009 at 2:02 pm -
Hi; Okay, here's the code: #! /usr/bin/python import cgitb; cgitb.enable() import MySQLdb import cgi import sys,os sys.path.append(os.getcwd()) from login import login def pic(): user, passwd, db, ...
Victor Subervi
Oct 16, 2009 at 7:23 pm
Oct 18, 2009 at 10:27 pm -
Hi I know that in python, we can do the same with regexps or *.split()*, but thats longer and less practical method than *scanf()*. I also found that ( http://code.activestate.com/recipes/502213/ ), ...
Ryniek90
Oct 3, 2009 at 10:06 pm
Oct 13, 2009 at 5:58 pm -
Hi group, I am trying to use a weak reference to a bound method: class MyClass(object): def myfunc(self): pass o = MyClass() print o.myfunc import weakref r = weakref.ref(o.myfunc) print r() This is ...
Ole Streicher
Oct 2, 2009 at 8:54 am
Oct 3, 2009 at 9:37 pm -
Hello, I've been studying the official tutorial, so far it's been fun, but today I ran into a problem with the write(). So, I open the file pw and write "hello" and read: f = open("pw", "r+") ...
Zeynel
Oct 31, 2009 at 1:10 pm
Nov 1, 2009 at 11:29 am -
I was just working with a generator for a tree that I wanted to skip the first result (root node.) And it occurs to me, why do we need to do: import sys from itertools import islice my_iter = ...
Eloff
Oct 16, 2009 at 1:29 am
Oct 27, 2009 at 7:58 am -
Hi! I'm looking at the 'threading' module and see that other than the 'thread' module it doesn't have a simple function to start a new thread. Instead, you first have to instantiate a threading ...
Ulrich Eckhardt
Oct 8, 2009 at 7:17 am
Oct 10, 2009 at 11:19 pm -
I'm trying to write a few methods that normalize Windows file paths. I've gotten it to work in 99% of the cases, but it seems like my code still chokes on '\x'. I've pasted my code below, can someone ...
Dan Guido
Oct 21, 2009 at 6:13 pm
Oct 22, 2009 at 2:35 am -
Hi, The following code does not run because range() does not accept a big number. Is there a way to make the code work. I'm wondering if there is a way to write a for-loop in python similar to that ...
Peng Yu
Oct 13, 2009 at 9:17 pm
Oct 16, 2009 at 5:42 am -
Good day all! I've just inherited a large amount of python code. After spending some time pour through the code, I've noticed that the original developer (who is no longer w/ the company) constantly ...
Ryan
Oct 6, 2009 at 5:56 pm
Oct 8, 2009 at 8:20 pm -
Hi, I am trying to run a python script and got this error. Googling the problem suggested that I install the 'py25-hashlib'. the following does not work for me 'sudo port install py25-hashlib' , ...
User7304
Oct 29, 2009 at 3:13 pm
Oct 30, 2009 at 8:37 am -
Greetings, all! I would like to add unicode support to my dbf project. The dbf header has a one-byte field to hold the encoding of the file. For example, \x03 is code-page 437 MS-DOS. My google-fu is ...
Ethan Furman
Oct 22, 2009 at 8:28 pm
Oct 28, 2009 at 4:59 am -
I have been following this group for quite some time and I figured (after searching enough on google --and on this group-- and not finding anything useful) I could pose this question here. Can anyone ...
Inaf
Oct 9, 2009 at 11:50 pm
Oct 17, 2009 at 7:29 am -
I currently have a function that uses a list internally but then returns the list items as separate return values as follows: if len(result)==1: return result[0] if len(result)==2: return result[0], ...
Dr. Phillip M. Feldman
Oct 8, 2009 at 4:41 pm
Oct 9, 2009 at 6:36 am
Group Overview
group | python-list |
categories | python |
discussions | 545 |
posts | 3,332 |
users | 655 |
website | python.org |
655 users for October 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)