Search Discussions

222 discussions - 1,935 posts

  • 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'ApranoSteven 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 KantCitizen 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 LiBeinan 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 AbdulshafyAhmed 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 ...
    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 ReddyDRJ 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κΝίκος Γκρ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?
    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 NepomucenoCarlos 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 BergAndrew 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 SantosFá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 BruinJurgens 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 NepomucenoCarlos 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 XiaojunMa 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 ShenMok-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. ...
    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 - ...
    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 NepomucenoCarlos 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'ApranoSteven 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 MillmanFrank 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. JoeMr. 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 SmithRoy 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 ...
    May 5, 2013 at 1:43 pm
    May 6, 2013 at 10:33 am
  • 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 returned
    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 BrooksPeter 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 ...
    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 StrombergDan 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 = ...
    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 WilsonKeira 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κΝίκος Γκρ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 LeyhHenry 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 ...
    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 ...
    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 ...
    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 BrooksPeter 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. DesrosiersC. 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 LogAnti 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 AngelicoChris 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 SmithRoy Smith
    May 8, 2013 at 8:20 pm
    May 9, 2013 at 5:44 pm
  • anyone?
    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 PimentelRicardo 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 CeroneLuca 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 BatchelderNed 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 ...
    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. CasaleJoseph 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 GrahamLogan 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 ShakyaAvnesh 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κΝίκος Γκρ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 LandauJoshua 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 BrittenBryan Britten
    May 27, 2013 at 8:47 pm
    May 28, 2013 at 5:52 pm
Group Navigation
period‹ prev | May 2013 | next ›
Group Overview
grouppython-list @

298 users for May 2013

Chris Angelico: 234 posts Carlos Nepomuceno: 115 posts Steven D'Aprano: 113 posts Roy Smith: 76 posts Fábio Santos: 69 posts Dave Angel: 57 posts Mark Lawrence: 48 posts Terry Jan Reedy: 41 posts Rusi: 39 posts Cameron Simpson: 34 posts Ian Kelly: 30 posts MRAB: 27 posts Andrew Berg: 25 posts Νίκος Γκρ33κ: 24 posts Grant Edwards: 22 posts Mark Janssen: 21 posts Neil Cerutti: 21 posts Dan Stromberg: 20 posts Ned Batchelder: 18 posts Michael Torrie: 17 posts
show more