FAQ

Search Discussions

287 discussions - 1,587 posts

  • Hello, I have started to code random stuff in Python only recently, still lots to learn. So please bear with me if my question sounds like rant. I have been coding in many other languages, most of ...
    PassidayPassiday
    Sep 24, 2011 at 5:31 pm
    Oct 21, 2011 at 9:56 am
  • I'm trying to generate a sequence of equally-spaced numbers between a lower and upper limit. Given arbitrary limits, what is the best way to generate a list of equally spaced floats with the least ...
    Steven D'ApranoSteven D'Aprano
    Sep 24, 2011 at 1:53 pm
    Sep 26, 2011 at 12:58 am
  • During some recent research, and re-familiarization with Python, I came across documentation that suggests that programming using functions, and programming using objects were somehow opposing ...
    William GillWilliam Gill
    Sep 3, 2011 at 4:15 pm
    Sep 6, 2011 at 12:30 am
  • I have a Python script which I would like to test without a tty attached to the process. I could run it as a cron job, but is there an easier way? I am running Linux. -- Steven
    Steven D'ApranoSteven D'Aprano
    Sep 29, 2011 at 9:21 am
    Oct 4, 2011 at 12:08 am
  • Hi guys. I'm strugglin with some homework stuff and am hoping you can help me out here. This is the code: small_words = ('into', 'the', 'a', 'of', 'at', 'in', 'for', 'on') def book_title(title): """ ...
    TigerstyleTigerstyle
    Sep 10, 2011 at 11:20 am
    Sep 12, 2011 at 4:29 am
  • Good evening, I have converted ODT to HTML using LibreOffice Writer, because I want to convert from HTML to Creole using python-creole. Unfortunately I get this error: "File "Convert to Creole.py", ...
    Alec TaylorAlec Taylor
    Sep 12, 2011 at 7:49 am
    Sep 13, 2011 at 6:13 pm
  • Hi there, when I have a python class X which overloads an operator, I can use that operator to do any operation for example with an integer y = X() + 123 however, say I want the "+" operator to be ...
    Henrik FaberHenrik Faber
    Sep 19, 2011 at 11:11 am
    Sep 21, 2011 at 7:11 pm
  • This is on windows with python 2.6. I can't seem to remove a possibility of a deadlock in one of my scripts at the moment. Its not a constant deadlock but it appears from time to time. The code is ...
    AtherunAtherun
    Sep 22, 2011 at 3:09 am
    Sep 24, 2011 at 6:00 am
  • i'm curious as to what can be done with (and handled better) by adjusting sys.setswitchinterval i've opened a question on SO for this, that people might find of interest: ...
    Matt JoinerMatt Joiner
    Sep 14, 2011 at 2:23 am
    Sep 15, 2011 at 8:39 am
  • Forking a thread to discuss threads.... ahem. Why is it that threads can't be killed? Do Python threads correspond to OS-provided threads (eg POSIX threads on Linux)? Every OS threading library I've ...
    Chris AngelicoChris Angelico
    Sep 17, 2011 at 9:35 pm
    Sep 21, 2011 at 9:25 am
  • Hi, I am musing on how to write portable Python3 code which would take advantage of the standard locale module. For instance, it would be very nice if we could say something like: # does not work! ...
    SsegvicSsegvic
    Sep 6, 2011 at 9:59 am
    Sep 12, 2011 at 12:45 pm
  • I'm learning python, and was playing with structuring packages. Basically I want to have a package called mypackage that defines a number of classes and functions. so I create: mypackage __init__.py ...
    Bclark76Bclark76
    Sep 7, 2011 at 3:56 pm
    Sep 10, 2011 at 2:04 pm
  • Hi there, What is the simplest way to check that you are at the beginning or at the end of an iterable? I'm using enumerate with Python 3.2 (see below) but I'm wondering if there would be a better ...
    LaurentLaurent
    Sep 7, 2011 at 9:35 pm
    Sep 9, 2011 at 11:30 am
  • curious question. suppose you have 300 different strings and they need all be replaced to say "aaa". is it faster to replace each one sequentially (i.e. replace first string to aaa, then do the 2nd, ...
    Xah LeeXah Lee
    Sep 28, 2011 at 9:28 am
    Sep 28, 2011 at 9:23 pm
  • Hi guys, i am writing a program to sum up the digits of a number 2**1000? Is there a way/formula to do it without expanding it?
    ZombieZombie
    Sep 16, 2011 at 7:21 pm
    Sep 18, 2011 at 2:10 pm
  • I have a function I want to run in a thread and return a value. It seems like the most obvious way to do this is to have my target function return the value, the Thread object stash that someplace, ...
    Roy SmithRoy Smith
    Sep 2, 2011 at 2:53 pm
    Sep 3, 2011 at 4:51 pm
  • How do I install Python 2.6.7 on Windows? The Python 2.6.6 page says "Python 2.6.6 has been replaced by a newer security-fix only source release of Python. Please download Python 2.6.7 instead." But ...
    WandererWanderer
    Sep 27, 2011 at 8:54 pm
    Sep 30, 2011 at 3:51 pm
  • While I asked this on the Django list as it happened to be with some Django testing code, this might be a more generic Python question so I'll ask here too. When performing unittest tests, I have a ...
    Tim ChaseTim Chase
    Sep 28, 2011 at 2:16 pm
    Sep 29, 2011 at 3:20 am
  • Hello, I am trying to deploy an app on google app engine using bottle, a micro-framework, similar to flask. I am running on ubuntu which comes with python 2.7 installed but GAE needs version 2.5, so ...
    JesramzJesramz
    Sep 23, 2011 at 12:36 am
    Sep 28, 2011 at 4:19 pm
  • When using a logger in a module and then using imp.reload to reload the module, logger messages are repeated in direct proportion to the number of times the modules was loaded. That is, on the first ...
    Andrew BergAndrew Berg
    Sep 22, 2011 at 1:53 am
    Sep 23, 2011 at 1:57 pm
  • Python's iterator protocol for an iterator 'items' allows combinations of explicit "next(items)" calls with the implicit calls of a "for item in items:" loop. There are at least three situations in ...
    Terry ReedyTerry Reedy
    Sep 10, 2011 at 7:36 pm
    Sep 12, 2011 at 8:51 pm
  • Obviously, this is a windows-based question. I know that Ctrl-Alt-Del is handled deep inside the OS, and I'm not trying to interrupt that. But is there some way to detect that a C-A-D has been ...
    DenDen
    Sep 1, 2011 at 3:52 pm
    Sep 3, 2011 at 7:49 am
  • Hello all: I'm curious if there are some good solutions for using Python in web applications. I'm not feeling particularly masochistic, so I do not want to develop this project in PHP; essentially ...
    Littlefield, TylerLittlefield, Tyler
    Sep 10, 2011 at 3:54 am
    Sep 15, 2011 at 1:42 pm
  • Hi, I have a small program where I want to do just a small regex operation. I want to see if value of a variable 'A' is present in an another variable 'B'. The below code works fine but as soon as ...
    Sagar NeveSagar Neve
    Sep 15, 2011 at 1:41 am
    Sep 15, 2011 at 9:38 am
  • Hi, I am getting dizzy on google. I am after a way of pointing a python routine to my website and have it create a tree, represented as a hierarchical HTML list in a webpage, of all the pages in that ...
    Simon CropperSimon Cropper
    Sep 8, 2011 at 12:26 pm
    Sep 9, 2011 at 10:29 am
  • Hello friends, An instance of my subclass doesn't invoke its superclass method, except when it is referenced directly. Here is what I mean: ... def log(self, module): ... return str('logged') ... ... ...
    Kayode OdeyemiKayode Odeyemi
    Sep 11, 2011 at 8:18 am
    Sep 13, 2011 at 7:53 pm
  • I have a label into which I am going to put content of different sizes. I would like to know how high I need to make the label so that I can size the window so it can stay the same for the different ...
    Bart KastermansBart Kastermans
    Sep 3, 2011 at 10:15 pm
    Sep 7, 2011 at 12:33 am
  • Hello, I have a neat Python project I'd like to share. It does real-time motion tracking, using the Python bindings to the OpenCV library: http://derek.simkowiak.net/motion-tracking-with-python/ ...
    Derek SimkowiakDerek Simkowiak
    Sep 30, 2011 at 2:16 am
    Sep 30, 2011 at 6:48 pm
  • In the following code, ... p=2*a ... t=p+i ... i=t ... 45 Python gives an answer as 45. But i am getting 30 when i execute manually. Is there any different multiplication pattern in python? Thank yu.
    SakthiSakthi
    Sep 27, 2011 at 5:21 pm
    Sep 28, 2011 at 7:31 am
  • The topic says it all: Why is shutil named shutil? What does it stand for? This is just a mild curiosity of mine. The shutil module for reference: ...
    Fletcher JohnsonFletcher Johnson
    Sep 24, 2011 at 3:36 am
    Sep 26, 2011 at 4:18 am
  • I'm curious about what people's opinions are about using mixins in Python. I really like, for example, the way that class based views were implemented in Django 1.3 using mixins. It makes everything ...
    MattMatt
    Sep 22, 2011 at 9:14 pm
    Sep 25, 2011 at 12:31 am
  • I have been testing my Python application on the just-released developer preview of Windows 8 and have noted an error: the application does not create an app folder in the user's "application data" ...
    Kevin WalzerKevin Walzer
    Sep 17, 2011 at 6:01 pm
    Sep 20, 2011 at 12:40 pm
  • I'm having a small question about optionparse. Normaly optionparser will format the help text according to the console's width. I just wondered if there is any way to insert a line breakk into an ...
    Gelonida NGelonida N
    Sep 10, 2011 at 8:43 pm
    Sep 11, 2011 at 8:22 pm
  • Hi, I'm having trouble creating objects that in turn can have custom objects as variables. The code looks like this: --------------------------------------------- class A: sub = dict() def ...
    Kristofer TengströmKristofer Tengström
    Sep 5, 2011 at 6:47 am
    Sep 8, 2011 at 10:53 am
  • hi all: As we know , 1.1 * 1.1 is 1.21 . But in python ,I got following : 1.2100000000000002 why python get wrong result? Who can tell me where's the 0.0000000000000002 from?
    XyzXyz
    Sep 6, 2011 at 5:57 am
    Sep 8, 2011 at 12:37 am
  • It seems unreasonably hard to write simple one-line unix command line filters in python: eg: ls | python -c "<something print x.upper()" to get at sys.stdin or similar needs an import, which makes a ...
    Jon RedgraveJon Redgrave
    Sep 5, 2011 at 8:38 pm
    Sep 6, 2011 at 11:15 am
  • Hi, I am a applications developer - originally from Windows using primarily Visual Foxpro, although I am familiar with a variety of other xbase derivatives. I now use Linux / Ubuntu, and have been ...
    Simon CropperSimon Cropper
    Sep 5, 2011 at 5:18 am
    Oct 3, 2011 at 9:21 pm
  • Dear Group, I have two questions one on list manipulation and other on Python. (i) I have a file of lists. Now, the first digit starts with a number or index, like, [001, "Obama", "USA", "President"] ...
    Subhabrata BanerjeeSubhabrata Banerjee
    Sep 29, 2011 at 4:11 pm
    Sep 30, 2011 at 6:43 am
  • In python 2.6.4 I have a fairly complex system running (copying and pasting it would be quite difficult). At its core there are builders that inherit from threading.Thread. I have some builders that ...
    AtherunAtherun
    Sep 27, 2011 at 1:07 am
    Sep 28, 2011 at 10:14 am
  • I'm wondering if there's a way in python to cause __init__ to return a class other than the one initially specified. My use case is that I'd like to have a superclass that's capable of generating an ...
    Matthew PounsettMatthew Pounsett
    Sep 15, 2011 at 5:20 am
    Sep 18, 2011 at 8:19 pm
  • I'm interested to know the opinion of Turkish users of the re or regex module. When the re module performs a case-insensitive match, it matches 'I' with 'i'. In Turkish, however, it should match 'I' ...
    MRABMRAB
    Sep 15, 2011 at 1:02 pm
    Sep 16, 2011 at 12:12 pm
  • I have the following regexp which fails to compile. Can somebody explain why? Traceback (most recent call last): File "<stdin ", line 1, in <module File "/usr/lib/python2.6/re.py", line 190, in ...
    Ovidiu DeacOvidiu Deac
    Sep 30, 2011 at 9:10 am
    Oct 11, 2011 at 8:26 am
  • The library is called RunningCalcs and is useful for running several calculations on a single iterable of values. https://bitbucket.org/taleinat/runningcalcs/ ...
    Tal EinatTal Einat
    Sep 26, 2011 at 11:23 am
    Sep 28, 2011 at 11:01 pm
  • I don't understand why some environment variables are not visible from Python. [steve at wow-wow ~]$ echo $LINES $COLUMNS $TERM 30 140 xterm [steve at wow-wow ~]$ python2.6 Python 2.6.6 (r266:84292, ...
    Steven D'ApranoSteven D'Aprano
    Sep 22, 2011 at 6:12 am
    Sep 22, 2011 at 4:51 pm
  • I have been a desktop Linux user for better than eleven years, as a hobby. Back when we still did most of our computing on desktops I even set up a rudimentary server setup in my home. Nothing fancy ...
    Tim HansonTim Hanson
    Sep 13, 2011 at 8:25 pm
    Sep 14, 2011 at 1:44 am
  • Hello friends, How do we carry out the command "*cd ..*" in python? My problem is : I have a set of folders say m=1,2,3,4. In each of these folders, I have subfolders with common name say ...
    Kaustubh joshiKaustubh joshi
    Sep 9, 2011 at 12:07 pm
    Sep 10, 2011 at 11:50 pm
  • Hello together, let me be honest with you, I am a poor programmer who can only do Perl. I tried to code a program in Perl, but found that another guy already finished this job in Python. Unlucky for ...
    OliverOliver
    Sep 9, 2011 at 5:47 am
    Sep 9, 2011 at 5:31 pm
  • I've been tasked with converting some programs from Perl - Python, and am (as will soon be obvious) new to the language. A few archive/google searches were inconclusive on a consensus approach, which ...
    Sahil TandonSahil Tandon
    Sep 1, 2011 at 4:56 am
    Sep 2, 2011 at 7:56 pm
  • Hi, Why doesn't python threads show an associated PID? On spawning python threads using the threading module I can only see the main thread's pid on using top or ps unix command, no subprocesses are ...
    GeorgeGeorge
    Sep 1, 2011 at 9:14 pm
    Sep 2, 2011 at 2:28 am
  • I remember that 'class' is sugar for type(....). I don't remember if 'def' is sugar for something besides lambda. Any clues for me? Heck, I'll even be grateful for outright answers! ~Ethan~
    Ethan FurmanEthan Furman
    Sep 28, 2011 at 9:26 pm
    Sep 29, 2011 at 6:21 am
Group Navigation
period‹ prev | Sep 2011 | next ›
Group Overview
grouppython-list @
categoriespython
discussions287
posts1,587
users368
websitepython.org

368 users for September 2011

Chris Angelico: 87 posts Steven D'Aprano: 85 posts Terry Reedy: 56 posts Rantingrick: 35 posts Ian Kelly: 34 posts Ben Finney: 30 posts Chris Rebert: 30 posts MRAB: 28 posts Peter Otten: 26 posts Arnaud Delobelle: 25 posts Roy Smith: 22 posts Thomas Jollans: 21 posts Prasad, Ramit: 20 posts Alec Taylor: 19 posts Kayode Odeyemi: 18 posts Nobody: 18 posts 守株待兔: 18 posts Alex23: 16 posts Westley Martínez: 16 posts Gelonida N: 15 posts
show more
Archives