Search Discussions
-
I'm looking for some help in finding a term, it's not Python-specific but does apply to some Python code. This is an anti-pattern to avoid. The idea is that creating a resource ought to be the same ...
Steven D'Aprano
May 8, 2013 at 8:52 am
May 13, 2013 at 1:15 pm -
Hi, this could be seen as an extravagant subject but that is not my original purpose. I still don't know if I want to become a programmer or not. At this moment I'm just inspecting the environment ...
Citizen Kant
May 11, 2013 at 8:03 pm
May 19, 2013 at 5:46 pm -
Not sure if this is the right place to talk about this. Even less sure if I can move this discussion to tkinter list, so here I am... I know this may sound a silly question because no one can see the ...
Beinan Li
May 18, 2013 at 2:03 pm
Jun 15, 2013 at 1:26 pm -
Hi, I'm having a hard time wrapping my head around short-circuit logic that's used by Python, coming from a C/C++ background; so I don't understand why the following condition is written this way! if ...
Ahmed Abdulshafy
May 26, 2013 at 11:11 am
Jun 1, 2013 at 7:23 am -
According to CIO.com, Python programmers make only $83,000 per year, while Perl programmers make $93,000 per year. http://www.cio.com/slideshow/detail/97819?source=ifwartcio#slide10 ...
Ignoramus16992
May 5, 2013 at 5:11 pm
May 8, 2013 at 10:43 am -
Planning to start a python online chronicle.What you want to see in it. :)
DRJ Reddy
May 25, 2013 at 3:19 am
Jun 12, 2013 at 8:50 pm -
This is the code that although correct becaus it works with englisg(standARD ASCII letters) it wont with Greek: if( log ): name = log # print specific client header info cur.execute('''SELECT hits, ...
Νίκος Γκρ33κ
May 26, 2013 at 4:36 pm
May 30, 2013 at 5:28 pm -
i need to write a code which can sort the list in order of 'n' without use builtin functions can anyone help me how to do?
Lokeshkoppaka
May 24, 2013 at 8:04 am
May 26, 2013 at 4:28 am -
Is there a way to format integers with thousands separator (digit grouping) like the format specifier of str.format()? I'm currently using the following: Number = 12,345 'x' is unsigned integer so ...
Carlos Nepomuceno
May 21, 2013 at 5:17 am
May 24, 2013 at 9:07 pm -
Currently, I keep Last.fm artist data caches to avoid unnecessary API calls and have been naming the files using the artist name. However, artist names can have characters that are not allowed in ...
Andrew Berg
May 7, 2013 at 7:58 pm
May 28, 2013 at 4:03 pm -
Couldn't you check ten websites which are your responsibility, instead of asking this list? client websites just chhecked. Good. No. Wait. Why are you uninstalling python 2.6? Because you have too ...
Fábio Santos
May 31, 2013 at 10:03 pm
Jun 4, 2013 at 2:32 pm -
This is my first script where I want to use the python threading module. I have a large dataset which is a list of dict this can be as much as 200 dictionaries in the list. The final goal is a ...
Jurgens de Bruin
May 18, 2013 at 8:58 am
Jun 3, 2013 at 1:47 am -
Are there Python 'preprocessor directives'? I'd like to have something like '#ifdef' to mix code from Python 2 and 3 in a single file. Is that possible? How?
Carlos Nepomuceno
May 28, 2013 at 7:46 pm
Jun 12, 2013 at 8:42 pm -
Hi, list. I hope this is not a duplicate of older question. If so, drop me a link is enough. I've used Python here and there, just for the sweet libraries though. For the core language, I have mixed ...
Ma Xiaojun
May 29, 2013 at 6:13 pm
May 30, 2013 at 11:30 pm -
From an int one can use to_bytes to get its individual bytes, but how can one reconstruct the int from the sequence of bytes? Thanks in advance. M. K. Shen
Mok-Kong Shen
May 27, 2013 at 2:45 pm
Jun 14, 2013 at 5:27 am -
I need to write numbers into a file upto 50mb and it should be fast can any one help me how to do that? i had written the following code. ...
Lokeshkoppaka
May 17, 2013 at 3:20 am
May 20, 2013 at 10:34 am -
title = "Guess my number game:" print title.title() raw_input("Press any key to continue..") import random tries = 0 number = random.randrange(99) + 1 guess = int(raw_input("Guess my number! Secret - ...
Ryankoch38
May 3, 2013 at 5:18 pm
May 7, 2013 at 1:29 pm -
Where can I find all error codes and messages that Python throws (actual codes and messages from exceptions raised by stdlib)? I've already found the module 'errno' and got a dictionary ...
Carlos Nepomuceno
May 26, 2013 at 11:13 pm
May 29, 2013 at 6:45 am -
My, it's been a long time since I've seen these: http://pu.inf.uni-tuebingen.de/users/klaeren/epigrams.html They pre-date the Zen of Python by at least a decade, and quite frankly I think many of ...
Steven D'Aprano
May 13, 2013 at 9:20 am
May 30, 2013 at 10:55 pm -
Hi all I am trying to emulate a SQL check constraint in Python. Quoting from the PostgreSQL docs, "A check constraint is the most generic constraint type. It allows you to specify that the value in a ...
Frank Millman
May 20, 2013 at 7:05 am
May 21, 2013 at 9:00 am -
I seem to stumble upon a situation where "!=" operator misbehaves in python2.x. Not sure if it's my misunderstanding or a bug in python implementation. Here's a demo code to reproduce the behavior - ...
Mr. Joe
May 12, 2013 at 11:23 pm
May 15, 2013 at 2:41 pm -
Apropos to any of the myriad unicode threads that have been going on recently: http://xkcd.com/1209/
Roy Smith
May 8, 2013 at 1:19 pm
May 15, 2013 at 11:57 pm -
I was using python from over an year and half.Suddenly from yesterday i'm unable to run it. The error is as follows Traceback (most recent call last): File "C:\Python27\lib\site.py", line 563, in ...
Rama29065
May 5, 2013 at 1:43 pm
May 6, 2013 at 10:33 am -
18
User Input
Hi, I'm having trouble oh how prompt the user to enter a file name and how to set up conditions. For example, if there's no file name input by the user, a default is returnedEternaltheft
May 30, 2013 at 11:33 am
May 30, 2013 at 3:09 pm -
What is the easiest way to reorder a sequence pseudo-randomly? That is, for a sequence 1,2,3,4 to produce an arbitrary ordering (eg 2,1,4,3) that is different each time. I'm writing a simulation and ...
Peter Brooks
May 24, 2013 at 8:14 am
Jun 12, 2013 at 1:14 pm -
Suppose I have a deck of cards, and I shuffle them import random cards = [] decks = 6 cards = list(range(13 * 4 * decks)) random.shuffle(cards) So now I have an array of cards. I would like to cut ...
RVic
May 26, 2013 at 5:52 pm
Jun 2, 2013 at 5:57 am -
What's the best Red Black Tree implementation for Python with an opensource license? I started out looking at http://newcenturycomputers.net/projects/rbtree.htmlbecause it was pretty high in Google ...
Dan Stromberg
May 1, 2013 at 11:11 pm
May 12, 2013 at 6:15 pm -
I am trying to backup database on CentOS linux server,I'm getting error when running the following script. anyone can help? #!/usr/bin/env python import ConfigParser import os import time config = ...
MMZ
May 6, 2013 at 7:01 pm
May 7, 2013 at 7:11 pm -
Dear all, I would appreciate if someone could write a simple python code for the purpose below: I have five text files each of 10 columns by 10 rows as follows: file_one = 'C:/test/1.txt' file_two = ...
Keira Wilson
May 22, 2013 at 4:13 pm
May 24, 2013 at 1:19 am -
Hello this is the following snippet that is causing me the error i mention in the Subject: try: cur.execute( '''SELECT url, hits FROM counters ORDER BY hits DESC''' ) data = cur.fetchall() for row in ...
Νίκος Γκρ33κ
May 26, 2013 at 8:08 am
May 28, 2013 at 6:01 am -
Hello, I am writing a program that gets its parameters from a combination of config file (using configparser) and command line arguments (using argparse). Now I would also like the program to be able ...
Henry Leyh
May 15, 2013 at 6:34 am
May 16, 2013 at 7:29 am -
Checkout the following code: sample2 = [x+y for x in range(1,10) for y in range(1,10) if x!=y] output=[] output=[x for x in sample2 if x not in output] the output I get is 3 4 5 6 7 8 9 10 3 5 6 7 8 ...
RAHUL RAJ
May 9, 2013 at 6:36 am
May 12, 2013 at 6:02 am -
Code : ----- def mergeSort(alist): print("Splitting ",alist) if len(alist) 1: mid = len(alist)//2 lefthalf = alist[:mid] righthalf = alist[mid:] mergeSort(lefthalf) mergeSort(righthalf) i=0 j=0 k=0 ...
Bhk755
May 30, 2013 at 9:48 am
Jun 1, 2013 at 5:43 pm -
I would like to use easy_install, but can't figure out how to install it. I have 64-bit Python 2.7.5 on Windows 7. Following the instructions on https://pypi.python.org/pypi/setuptools, it says ...
Ray
May 28, 2013 at 1:32 am
May 29, 2013 at 2:11 am -
I'm not sure if this'll interest anybody, but I expect that I'm going to get some mutual recursion in my simulation, so I needed to see how python handled it. Unfortunately, it falls over once it ...
Peter Brooks
May 26, 2013 at 11:49 am
May 27, 2013 at 7:37 am -
Hi, I'm just starting out with Python and to practice I am trying to write a script that can have a simple conversation with the user. When I run the below code, it always ends up printing response ...
C. N. Desrosiers
May 22, 2013 at 6:23 am
May 25, 2013 at 10:11 pm -
Hi, I have a task to calculate total distortion of a harmonics, of a signal that i imported from oscilloscope as numpy array. I had no problem drawing its spectrum, and time domain graph, but cant ...
Anti Log
May 19, 2013 at 10:52 am
May 23, 2013 at 11:44 am -
Quit the course and go study someplace else... I wouldn't want to be in any course where people use VB and PHP to build GUIs! ChrisA
Chris Angelico
May 1, 2013 at 4:37 am
May 13, 2013 at 8:10 am -
FooEntry is a class. How would you describe a list of these in a docstring? "A list of FooEntries" "A list of FooEntrys" "A list of FooEntry's" "A list of FooEntry instances" The first one certainly ...
Roy Smith
May 8, 2013 at 8:20 pm
May 9, 2013 at 5:44 pm -
anyone?
Visphatesjava
May 16, 2013 at 6:17 pm
May 20, 2013 at 12:27 am -
After reading How do you split a list into evenly sized chunks in Python?<http://stackoverflow.com/questions/312443/how-do-you-split-a-list-into-evenly-sized-chunks-in-python and seeing this kind of ...
Ricardo Azpeitia Pimentel
May 1, 2013 at 6:26 am
May 2, 2013 at 2:02 pm -
Hi everybody, I am new to the group (and relatively new to Python) so I am sorry if this issues has been discussed (although searching for topics in the group I couldn't find a solution to my ...
Luca Cerone
May 24, 2013 at 2:04 pm
Aug 5, 2013 at 5:54 pm -
Hi all, I'm trying to come up with more project ideas for intermediate learners, somewhat along the lines of http://bit.ly/intermediate-python-projects . So here's a question for people who remember ...
Ned Batchelder
May 19, 2013 at 11:30 am
May 26, 2013 at 4:28 am -
Hi guys, I'm working on this long file, where i have to keep reading and storing different excerpts of text (data) in different variables (list). Once done that i want to store in dicts the data i ...
Rlelis
May 8, 2013 at 11:47 pm
May 10, 2013 at 12:54 pm -
I have some data I am working with that is not being interpreted as a string requiring base64 encoding when sent to the ldif module for output. The base64 string parsed is ZGV0XDMzMTB3YmJccGc= and ...
Joseph L. Casale
May 24, 2013 at 9:00 pm
May 28, 2013 at 7:45 am -
Hey guys, I'm learning Python and I'm experimenting with different projects -- I like learning by doing. I'm wondering if you can help me here: http://i.imgur.com/KgvSKWk.jpg What this is is a ...
Logan C Graham
May 24, 2013 at 5:32 pm
May 28, 2013 at 6:40 am -
hi, How to run a python script twice randomly in a day? Actually I want to run my script randomly in a day and twice only. Please help me.. how is it possible. Thanks
Avnesh Shakya
May 20, 2013 at 3:54 am
May 22, 2013 at 3:00 am -
#!/usr/bin/python3 # coding=utf-8 import cgitb; cgitb.enable() import cgi, os, sys from http import cookies # initialize cookie cookie = cookies.SimpleCookie( os.environ.get('HTTP_COOKIE') ) ...
Νίκος Γκρ33κ
May 30, 2013 at 12:25 pm
May 31, 2013 at 11:46 pm -
Hello all, again. Instead of revising like I'm meant to be, I've been delving into a bit of Python and I've come up with this code: class ClassWithProperty: @property def property(self): pass ...
Joshua Landau
May 29, 2013 at 11:48 am
May 29, 2013 at 3:17 pm -
Hey, everyone! I'm very new to Python and have only been using it for a couple of days, but have some experience in programming (albeit mostly statistical programming in SAS or R) so I'm hoping ...
Bryan Britten
May 27, 2013 at 8:47 pm
May 28, 2013 at 5:52 pm
Group Overview
group | python-list |
categories | python |
discussions | 222 |
posts | 1,935 |
users | 298 |
website | python.org |
298 users for May 2013
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)