Search Discussions
-
Hi all, When writing a long expresion, one usually would like to break it into multiple lines. Currently, you may use a '\' to do so, but it looks a little awkward (more like machine-oriented thing). ...
Yingjie Lan
Aug 10, 2011 at 4:42 am
Sep 4, 2011 at 6:08 pm -
With surprising regularity, I see program postings (eg. on StackOverflow) from inexperienced Python users accidentally re-assigning built-in names. For example, they'll innocently call some variable, ...
Gerrat Rickert
Aug 15, 2011 at 9:52 pm
Aug 31, 2011 at 9:57 pm -
Follow these simply rules to become an accepted member of the Python community. ------------------------------------------------------------ 1. Bash rantingrick and Xah Lee every chance you get. 2. ...
Rantingrick
Aug 14, 2011 at 5:57 am
Aug 17, 2011 at 10:48 pm -
i have heard that function invocation in python is expensive, but make lots of functions are a good design habit in many other languages, so is there any principle when writing python function? for ...
Smith jack
Aug 23, 2011 at 11:59 am
Aug 29, 2011 at 10:17 pm -
45
List spam
I really like this list as part of my learning tools but the amount of spam that I've been getting from it is CRAZY. Doesn't anything get scanned before it sent to the list? Jason ..? <((((?Jason Staudenmayer
Aug 18, 2011 at 12:58 pm
Aug 20, 2011 at 5:48 pm -
Hi all, I am completely new to Python, but I'm confronted with a problem I can't solve. This is my question: I'm running a PC with XP Pro32, which acts as a file server/print server/FTP server and ...
Fokke Nauta
Aug 30, 2011 at 8:00 pm
Sep 8, 2011 at 2:10 pm -
Hi Folks, I was arguing with a guy who was sure that incrementing a variable i with "i += 1" is faster than "i = i + 1". I couldn't tell if he was right or wrong so I did a little benchmark with the ...
Laurent
Aug 21, 2011 at 4:52 pm
Aug 22, 2011 at 5:22 pm -
hi list, what is the best way to check if a given list (lets call it l1) is totally contained in a second list (l2)? for example: l1 = [1,2], l2 = [1,2,3,4,5] - l1 is contained in l2 l1 = [1,2,2,], ...
Johannes
Aug 15, 2011 at 11:26 pm
Aug 20, 2011 at 4:06 pm -
Hi Python users, I have been using try...except statements in the situations where I can expect a certain type of errors might occur. But sometimes I don't exactly know the possible error types, or ...
Yingjie Lin
Aug 19, 2011 at 7:09 pm
Sep 10, 2011 at 10:17 am -
My program does not need a prompt, it just needs to wait for any key to be pressed before it continues. This is in Windows. char=0 while not char: char=msvcrt.getch() That doesn't delay anything ...
John Doe
Aug 8, 2011 at 12:04 am
Aug 22, 2011 at 2:02 am -
I?m new to Python, and I love it. The philosophy of the language (and of the community as a whole) is beautiful to me. But one of the things that bugs me is the requirement that all class methods ...
T. Goodchild
Aug 31, 2011 at 2:35 pm
Sep 7, 2011 at 11:01 pm -
I have a Python (2.6.x) script on Linux that loops through many directories and does processing for each. That processing includes several "os.system" calls for each directory (some to other Python ...
Russ P.
Aug 29, 2011 at 1:15 am
Sep 11, 2011 at 5:08 am -
Hi everyone! Longtime lurker, hardly an expert, but I've been using Python for various projects since 2007 and love it. I'm looking for either (A) suggestions on how to do a very common operation ...
Gc
Aug 3, 2011 at 1:45 am
Aug 18, 2011 at 1:13 pm -
Hello, I'd like to write a python (2.6/2.7) script which connects to database, fetches hundreds of thousands of rows, concat them (basically: create XML) and then put the result into another table. ...
Przemyslaw Bak
Aug 10, 2011 at 11:17 am
Aug 16, 2011 at 9:38 am -
As I understand it, Python exclusively late-binds names; when you define a function, nothing is ever pre-bound. This allows a huge amount of flexibility (letting you "reach into" someone else's ...
Chris Angelico
Aug 2, 2011 at 4:55 pm
Aug 4, 2011 at 7:49 pm -
if a list L is composed with tuple consists of two elements, that is L = [(a1, b1), (a2, b2) ... (an, bn)] is there any simple way to divide this list into two separate lists , such that L1 = [a1, ...
Smith jack
Aug 6, 2011 at 5:07 pm
Aug 7, 2011 at 5:11 pm -
Hi, i am sorry if this doesn't quite match the subject of the list. If someone takes offense please point me to where this question should go. Anyway, i have a problem using regular expressions. I ...
Matt Funk
Aug 18, 2011 at 7:49 pm
Aug 22, 2011 at 1:59 pm -
I'm writing a Scheme interpreter and I need to be able to create and return a Python function from a string. This is a port of another Scheme interpreter I wrote in Scheme. What I'm trying to do ...
Jack Trades
Aug 29, 2011 at 2:41 pm
Aug 31, 2011 at 2:25 pm -
I am trying to hardlink all files in a directory structure using os.link. This works fine for files, but the directory also contains sub- directories (which themselves contain files and ...
Loial
Aug 2, 2011 at 9:32 am
Aug 8, 2011 at 7:07 am -
In what order are the addresses returned by socket.gethostbyname_ex()? We know that gethostbyname() is indeterministic but hope that gethostbyname_ex() has a specified order. Best regards, Tomas
Tomas Lidén
Aug 22, 2011 at 6:37 am
Aug 22, 2011 at 10:46 pm -
I'm looking for good ways to ensure that attributes are only writable such that they retain the characteristics the class requires. My particular case is a class attribute which is initialised as a ...
John O'Hagan
Aug 7, 2011 at 3:35 pm
Aug 11, 2011 at 8:15 am -
See All details on http://hotelandtourism9.blogspot.com/2011/08/indian-hotels-wall-st-effect.html . See All details on http://hotelandtourism9.blogspot.com/2011/08/indian-hotels-wall-st-effect.html . ...
Sajjad Ahmad
Aug 19, 2011 at 6:38 pm
Aug 20, 2011 at 2:59 pm -
Is it possible to put a doc string on a class attribute? Something like this class Test (object): '''classx''' fred = 10 '''attribute''' print Test.__doc__ print Test.fred.__doc__ This code produces ...
Nick
Aug 8, 2011 at 12:37 pm
Aug 11, 2011 at 12:59 am -
Twice in a couple of weeks, I have locked up my PC by running a Python 2.5 script that tries to create a list that is insanely too big. In the first case, I (stupidly) did something like: mylist = ...
Steven D'Aprano
Aug 31, 2011 at 12:33 pm
Sep 15, 2011 at 7:27 pm -
Dear All, I have some complicated loops of the following form for c in configurations: # loop 1 while nothing_bad_happened: # loop 2 while step1_did_not_work: # loop 3 for substeps in step1 # loop 4a ...
Daniel
Aug 31, 2011 at 3:51 pm
Sep 2, 2011 at 1:04 am -
(This may be a shortened double post) I have a development version of a library in c:\dev\XmlDB\xmldb After testing the setup script I also have c:\python27\lib\site-packages\xmldb Now I'm continuing ...
Josh English
Aug 27, 2011 at 4:56 pm
Aug 28, 2011 at 5:20 am -
Hello, I am looking for the Python Windows Extensions to see if they can be installed on a Mac.THanks.
Johnny.venter
Aug 19, 2011 at 8:02 pm
Aug 23, 2011 at 1:40 pm -
How would you convert a list of strings into a list of variables using the same name of the strings? So, ["red", "one", "maple"] into [red, one, maple] Thanks for any help!
Noydb
Aug 18, 2011 at 2:57 pm
Aug 19, 2011 at 2:32 pm -
Hi all, Apologies I'm sure this has been asked many times, but I'm trying to figure out the most efficient way to do a complex sort on very large files. I've read the recipe at [1] and understand ...
Aliman
Aug 1, 2011 at 3:33 pm
Aug 9, 2011 at 10:20 pm -
Hey all, I have been trying to get my head around how to do something, but i am missing how to pull it off. I am reading a packet from a radio over a serial port. i have " two bytes containing the ...
Nephish
Aug 4, 2011 at 6:26 pm
Aug 5, 2011 at 4:01 pm -
Hi, i've created a twisted server application and i want that the server send me a message when someone stops or kills the process. I want to override reactor.stop(), but do this way send me message ...
Andrea Di Mario
Aug 1, 2011 at 9:56 am
Aug 4, 2011 at 3:47 am -
# Get Fibonacci Value # Fibonacci(N) = Fibonacci(N-1) + Fibonacci(N-2) # # n = 900 is OK # n = 1000 is ERROR , Why # # What Wrong? # cache = [] def fibo( n ): try: if cache[n] != -1: return cache[n] ...
Jc
Aug 1, 2011 at 9:11 am
Aug 2, 2011 at 2:40 pm -
I am trying to write an algorithms library in Python. Most of the functions will accept functions as parameters. For instance, there is a function called any: def any(source, predicate): for item in ...
Travis Parks
Aug 28, 2011 at 9:20 pm
Aug 29, 2011 at 11:36 pm -
Is there an equivelent for the AWK RS in Python? as in RS='\n\n' will seperate a file at two blank line intervals -- maus . . ... NO CARRIER
Greymaus
Aug 26, 2011 at 6:39 pm
Aug 28, 2011 at 10:03 am -
Folks, What might be a good replacement for the shelve module, but one that can handle a few gigs of data. I'm doing some calculations on daily stock prices and the result is a nested list like: ...
Forafo San
Aug 19, 2011 at 3:31 pm
Aug 21, 2011 at 12:54 am -
Hi Python users, I have two lists: li1 = ['a', 'b'] li2 = ['1', '2'] and I wish to obtain a list like this li3 = ['a1', 'a2', 'b1', 'b2'] Is there a handy and efficient function to do this, ...
Yingjie Lin
Aug 17, 2011 at 8:22 pm
Aug 18, 2011 at 9:51 pm -
11
PyWhich
Hey c.l.p., I wrote a little python script that finds the file that a python module came from. Does anyone see anything wrong with this script? #!/usr/bin/python import sys if __name__ == '__main__': ...Billy Mays
Aug 4, 2011 at 12:43 pm
Aug 5, 2011 at 2:56 pm -
The following is intended as a helpful small extension to the xrange() range() discussion brought up this past weekend by Billy Mays... With Python2 you basically have two ways to get a range of ...
Harrismh777
Aug 2, 2011 at 7:12 am
Aug 4, 2011 at 9:56 am -
I was a little disappointed the other day when I realized that closures were read-only. I like to use closures quite a bit. Can someone explain why this limitation exists? Secondly, since I can cheat ...
Travis Parks
Aug 31, 2011 at 4:45 pm
Sep 5, 2011 at 2:23 pm -
I'm looking for a good IDE -- easy to setup, easy to use -- for Python. Any suggestions? I use Eclipse for other projects and have no problem with using it for Python, except that I can't get PyDev ...
Dave Boland
Aug 26, 2011 at 2:18 pm
Aug 31, 2011 at 4:53 am -
Hi all, I'm wondering what advice you have about formatting if statements with long conditions (I always format my code to <80 colums) Here's an example taken from something I'm writing at the moment ...
Arnaud Delobelle
Aug 27, 2011 at 7:08 am
Aug 27, 2011 at 9:25 pm -
I have a class like this: class MySeq(): def __init__(self, *seq, c): self.__c = c self.__pc = sorted(set([i % __c for i in seq])) self.order = ([[self.__pc.index(i % __c), i // __c] for i in seq]) ...
John O'Hagan
Aug 22, 2011 at 5:04 am
Aug 24, 2011 at 11:09 am -
I suspect that learning how to integrate python with wordperfect will end up being much more work than learning wordperfect macros. Just my two cents. -- John Gordon A is for Amy, who fell down the ...
John Gordon
Aug 18, 2011 at 4:51 pm
Aug 19, 2011 at 11:59 pm -
Anyone know of a Python application running as a Windows service in production? I'm planning a network monitoring application that runs as a service and reports back to the central server. Sort of a ...
Snorble
Aug 16, 2011 at 4:32 am
Aug 19, 2011 at 5:21 am -
Hello all Ive had what I think is a great idea for pure-python templates (I can almost hear the groans, bear with me...) For the impatient, proof of concept is at http://pastie.org/2379978 ...
Paul Wray
Aug 16, 2011 at 11:33 am
Aug 17, 2011 at 1:10 am -
*Please* forgive me for asking a Java question in a Python forum. My only excuse for this no-no is that a Python forum is more likely than a Java one to have among its readers those who have had to ...
Kj
Aug 12, 2011 at 5:02 pm
Aug 15, 2011 at 4:16 pm -
Hello, I need a generator to create the cellname in a excell (using pyuno) document to assign value to the correct cell. The following code does this but do you have some optimizations on it, for ...
Karim
Aug 2, 2011 at 11:45 am
Aug 2, 2011 at 2:19 pm -
I am writing a simple algorithms library that I want to work for both Python 2.7 and 3.x. I am writing some functions like distinct, which work with dictionaries under the hood. The problem I ran ...
Travis Parks
Aug 31, 2011 at 1:43 am
Sep 2, 2011 at 8:29 pm -
Hi, Say I have a very big string with a pattern like: akakksssk3dhdhdhdbddb3dkdkdkddk3dmdmdmd3dkdkdkdk3asnsn..... I want to split the sting into separate parts on the "3" and process each part ...
Goldtech
Aug 12, 2011 at 2:03 am
Aug 28, 2011 at 7:52 pm
Group Overview
group | python-list |
categories | python |
discussions | 341 |
posts | 2,059 |
users | 442 |
website | python.org |
442 users for August 2011
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)