FAQ

Search Discussions

270 discussions - 1,442 posts

  • Does anyone have (or know of) accurate totals and percentages on how Python is used? I'm particularly interested in the following groupings: - new development vs. stable code-bases - categories (web, ...
    Eric SnowEric Snow
    Feb 11, 2012 at 9:02 pm
    Feb 26, 2012 at 10:32 pm
  • I get sick and tired of doing this!!! if maxlength == UNLIMITED: allow_passage() elif len(string) maxlength: deny_passage() What Python needs is some constant that can be compared to ANY numeric type ...
    Rick JohnsonRick Johnson
    Feb 24, 2012 at 1:37 pm
    Feb 27, 2012 at 12:25 pm
  • The book I'm reading about using Tkinter only does this when creating the top-level window: app = Application() app.mainloop() and of course the Application class has subclassed the tkinter.Frame ...
    John SalernoJohn Salerno
    Feb 29, 2012 at 5:06 am
    Mar 5, 2012 at 7:45 pm
  • New Science Discovery: Perl Idiots Remain Idiots After A Decade! A excerpt from the new book ?Modern Perl?, just published, chapter 4 on ?Operators?. Quote: ?The associativity of an operator governs ...
    Xah LeeXah Lee
    Feb 29, 2012 at 8:09 am
    Mar 12, 2012 at 8:20 pm
  • -60.950000000000045 That's wrong. Proof http://www.wolframalpha.com/input/?i00.00-1041.00-555.74%2B530.74-794.95 -60.95 aka (-(1219/20)) Is there a reason Python math is only approximated? - Or is ...
    Alec TaylorAlec Taylor
    Feb 22, 2012 at 6:13 pm
    Feb 28, 2012 at 5:56 pm
  • First of all: I don't have any first hand experience of smartphones but now that my trusted old GSM phone is getting old I decided I am in for an up-grade. It struck me it might be nice to get ...
    Martin SchöönMartin Schöön
    Feb 15, 2012 at 8:58 pm
    Feb 27, 2012 at 1:44 pm
  • Hi all, I've been trying for a few days (only a little bit at a time) to come up with a way of implementing a frozendict that doesn't suck. I'm gradually converging to a solution, but I can't help ...
    Evan DriscollEvan Driscoll
    Feb 9, 2012 at 1:23 am
    Feb 13, 2012 at 9:15 pm
  • PIL, PyCrypto and many other modules require a C compiler and linker. Unfortunately neither install on my computer, with a PATH with the following: C:\Program Files (x86)\Microsoft Visual Studio ...
    Alec TaylorAlec Taylor
    Feb 5, 2012 at 2:40 pm
    Aug 22, 2012 at 6:39 pm
  • Hi I am new to python language. On my first day, somebody told me that if any python script file is opened with any editor except python editor, the file is corrupted. Some spacing or indentation is ...
    Manish SharmaManish Sharma
    Feb 23, 2012 at 10:13 pm
    Feb 25, 2012 at 2:36 am
  • I feel like the design of sum() is inconsistent with other language features of python. Often python doesn't require a specific type, only that the type implement certain methods. Given a class that ...
    Buck GolemonBuck Golemon
    Feb 23, 2012 at 9:19 pm
    Feb 24, 2012 at 9:58 pm
  • So suppose I want to modify the sys.path on the fly before running some code which imports from one of the modules added. at run time I do sys.path.extend(paths_to_add) but it still doesn't work and ...
    Andrea CrottiAndrea Crotti
    Feb 1, 2012 at 4:15 pm
    Feb 10, 2012 at 8:58 pm
  • I am learning python and maybe this is obvious but I have not been able to see a solution. What I would like to do is to be able to execute a function within the namespace I would have obtained with ...
    OliveOlive
    Feb 1, 2012 at 5:11 pm
    Feb 2, 2012 at 12:34 am
  • Sarge, a cross-platform library which wraps the subprocess module in the standard library, has been released. What does it do? ---------------- Sarge tries to make interfacing with external programs ...
    Vinay SajipVinay Sajip
    Feb 10, 2012 at 7:28 pm
    Feb 17, 2012 at 5:29 pm
  • How do you round down ALWAYS to nearest 100? Like, if I have number 3268, I want that rounded down to 3200. I'm doing my rounding like But, how to round DOWN?
    NoydbNoydb
    Feb 10, 2012 at 12:30 am
    Feb 11, 2012 at 10:26 am
  • In Python textbooks that I have read, it is usually not mentioned that we can very easily program Common LISP-style closures with Python. It is done as follows: ------------------------------------- ...
    Antti J YlikoskiAntti J Ylikoski
    Feb 4, 2012 at 12:27 am
    Feb 10, 2012 at 7:55 am
  • Hello experts, I am having trouble accessing the content of my list. my list content has 2-pair value with the exception of one which has single value. here is an example? ['a', 1, 'b', 1, 'c', 3, ...
    Sammy DansoSammy Danso
    Feb 7, 2012 at 12:27 pm
    Feb 8, 2012 at 1:50 am
  • This week I was slightly surprised by a behaviour that I've not considered before. I've long used for i, x in enumerate(seq): # do stuff as a standard looping-with-index construct. In Python for ...
    Alex WillmerAlex Willmer
    Feb 24, 2012 at 12:30 am
    Feb 29, 2012 at 12:18 am
  • Hi! What is the best way to iterate thru a huge list having the 1st element a different process? I.e.: process1(mylist[0]) for el in mylist[1:]: process2(el) This way mylist is almost duplicated, ...
    Paulo da SilvaPaulo da Silva
    Feb 1, 2012 at 1:39 am
    Feb 2, 2012 at 7:38 am
  • Has it been considered to add shell features to python, such that it can be used as a default shell, as a replacement for bash, etc. I'm sure everyone would agree that doing this would make the ...
    SherjilOzairSherjilOzair
    Feb 18, 2012 at 6:58 pm
    Feb 22, 2012 at 10:15 pm
  • This is only peripherally a Python problem, but in case anyone has any good ideas I'm going to ask it. I have a routine to calculate an approximation of Lambert's W function, and then apply a ...
    Steven D'ApranoSteven D'Aprano
    Feb 12, 2012 at 6:41 am
    Feb 21, 2012 at 2:21 am
  • I'm looking at a way of cycling around a sequence i.e. starting at some given location in the middle of a sequence and running to the end before coming back to the beginning and running to the start ...
    Mark LawrenceMark Lawrence
    Feb 8, 2012 at 1:10 am
    Feb 9, 2012 at 10:34 am
  • Hi, I have this working function: def as_xml(self): out = etree.Element("or") for k in sorted(self.keys()): out.append(etree.Element("hostname", attrib={'op': '=', 'value': random.choice(self[k])})) ...
    Matej CeplMatej Cepl
    Feb 6, 2012 at 1:27 am
    Feb 7, 2012 at 3:11 pm
  • Hi all I seem to have a recurring battle with circular imports, and I am trying to nail it once and for all. Let me say at the outset that I don't think I can get rid of circular imports altogether. ...
    Frank MillmanFrank Millman
    Feb 26, 2012 at 10:42 am
    Feb 28, 2012 at 5:58 pm
  • Hi, Could someone please tell me what the following sorting algorithm is called? Let an array contain the elements a_1, a_2, ..., a_N. Then: for i = 1 to N-1: for j = i+1 to N: if a_j < a_i then ...
    Jabba LaciJabba Laci
    Feb 14, 2012 at 3:01 pm
    Feb 14, 2012 at 8:59 pm
  • Hello, I've been looking for something similar to CoffeeScript, but for python. Does anyone know of such project? So far I haven't found any attempt to do this, so I took few regular expressions and ...
    Michal HantlMichal Hantl
    Feb 2, 2012 at 2:09 pm
    Feb 7, 2012 at 3:52 am
  • I'm trying to compute the total CPU load of an external process and it's children. (so I cannot use resource.getrusage) For the load of the process I can just grab it from /proc/X/stat. How do I get ...
    Mihai BadoiuMihai Badoiu
    Feb 28, 2012 at 6:33 pm
    Feb 29, 2012 at 6:09 pm
  • Hi, I'm implementing Python 3 extension using the Python C API. I am familiar with defining new types, implementing get/set for attributes, etc. I'm wondering, is there any mean to implement ...
    Mateusz LoskotMateusz Loskot
    Feb 9, 2012 at 11:43 am
    Feb 13, 2012 at 11:57 am
  • c = [1, 2, 3, 4, 5] class TEST(): c = [5, 2, 3, 4, 5] def add( self ): c[0] = 15 a = TEST() a.add() print( c, a.c, TEST.c ) result : [15, 2, 3, 4, 5] [5, 2, 3, 4, 5] [5, 2, 3, 4, 5] why a.add() do ...
    XixiliguoXixiliguo
    Feb 24, 2012 at 5:55 am
    Feb 28, 2012 at 2:06 pm
  • I want to download content asynchronously. This would be straightforward to do threaded or across processes, but difficult asynchronously so people seem to rely on external libraries (twisted / ...
    PlumoPlumo
    Feb 23, 2012 at 6:58 am
    Feb 25, 2012 at 9:44 pm
  • Hi folks, often times in science one expresses a value (say 1.03789291) and its error (say 0.00089) in a short way by parentheses like so: 1.0379(9) One can vary things a bit, but let's take the ...
    Daniel FetchinsonDaniel Fetchinson
    Feb 16, 2012 at 12:18 am
    Feb 17, 2012 at 12:13 pm
  • It's a rare occurrence, but sometimes my script will terminate and I get this: Traceback (most recent call last): File "C:\path\to\script\script.py", line 992, in <module That's it. And the line ...
    Andrew BergAndrew Berg
    Feb 3, 2012 at 8:14 pm
    Feb 15, 2012 at 9:41 pm
  • Guide to: Learning Python Decorators New Book http://tinyurl.com/python-decorartor
    SajuptpmSajuptpm
    Feb 9, 2012 at 5:56 pm
    Feb 12, 2012 at 11:48 am
  • Hello. I am admittedly a Python novice, and ran into some trouble trying to write a program that will pull multiple excel files all into one file, with each file on a different sheet. I am confident ...
    SMac2347SMac2347
    Feb 7, 2012 at 6:14 pm
    Feb 9, 2012 at 9:07 pm
  • We're pleased to announce the immediate availability of release candidates for Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3 . The main impetus for these releases is fixing a security issue in Python's hash ...
    Benjamin PetersonBenjamin Peterson
    Feb 25, 2012 at 5:56 pm
    Feb 27, 2012 at 9:30 pm
  • hello, I have a python script using only the standard libraries. Currently I use a Windows VM to generate exe's, which is cumbersome. Has anyone had success generating exe's from within Linux? Richard
    PlumoPlumo
    Feb 22, 2012 at 12:12 pm
    Feb 26, 2012 at 11:57 am
  • $ cd /usr/bin $ ls -l python* -rwxr-xr-x 2 root root 9496 Oct 27 02:42 python lrwxrwxrwx 1 root root 6 Oct 29 19:34 python2 - python -rwxr-xr-x 2 root root 9496 Oct 27 02:42 python2.7 $ diff -s ...
    HoneyMonsterHoneyMonster
    Feb 23, 2012 at 7:11 pm
    Feb 24, 2012 at 5:22 pm
  • Hi, I want to log time taken to complete database requests inside a method/ function using decorator . is it possible ???? I think, i have to inject log code inside the method/fuctions or modify it. ...
    SajuptpmSajuptpm
    Feb 10, 2012 at 12:30 pm
    Feb 11, 2012 at 7:53 am
  • Hello there is it possible to have multiple namespaces within a single python module? I have a small app which is in three or four .py files. For various reasons I would like to (perhaps optionally) ...
    JknJkn
    Feb 9, 2012 at 6:32 pm
    Feb 10, 2012 at 4:28 pm
  • I am quite new to Python (2.7 on Linux), and have built a few modules using wxPython/wxGlade for GUI elements and Psycopg2 for database access. I adhere mostly to the PEP8 guidelines, and use Pylint ...
    HoneyMonsterHoneyMonster
    Feb 8, 2012 at 5:15 pm
    Feb 9, 2012 at 9:57 pm
  • What is the cost of calling primes(n) below ? I'm mainly interested in knowing if the call to append is O(1), even amortized. Do lists in Python 3 behave like ArrayList in Java (if the capacity is ...
    Franck DitterFranck Ditter
    Feb 15, 2012 at 6:20 pm
    Feb 16, 2012 at 12:41 am
  • Hey Pythonistas, Consider the regular expression "$*". Compilation fails with the exception, "sre_constants.error: nothing to repeat". Consider the regular expression "(?=$)*". As far as I know it is ...
    Devin JeanpierreDevin Jeanpierre
    Feb 14, 2012 at 4:38 am
    Feb 15, 2012 at 1:43 pm
  • How do you format a number to print with commas? Some quick searching, i came up with: '2,348,721' I'm a perpetual novice, so just looking for better, slicker, more proper, pythonic ways to do this. ...
    NoydbNoydb
    Feb 9, 2012 at 8:08 pm
    Feb 10, 2012 at 3:06 am
  • Below is some pretty simple code and the resulting output. Sometimes the code runs through but sometimes it just freezes for no apparent reason. The output pasted is where it just got frozen on me. ...
    Eric FrederichEric Frederich
    Feb 23, 2012 at 5:59 pm
    Feb 28, 2012 at 6:12 pm
  • Hi All, I'm pleased to announce the release of xlrd 0.7.2. This release, like the xlwt release, is long overdue and has been over 2.5 years in the making! The highlights: - All messaging and debug ...
    Chris WithersChris Withers
    Feb 21, 2012 at 9:17 am
    Feb 23, 2012 at 5:28 pm
  • Hi, I am getting more and more discouraged from using XSLT for a transformation from one XML scheme to another one. Does anybody could share any experience with porting moderately complicated XSLT ...
    Matej CeplMatej Cepl
    Feb 13, 2012 at 11:20 am
    Feb 17, 2012 at 9:11 pm
  • Hey folks, I looked all through the list of mailing lists on the mail.python.orgserver and this seems to be the only one that might apply to me other than maybe the German list which did not seem to ...
    Alan McKayAlan McKay
    Feb 15, 2012 at 9:51 pm
    Feb 16, 2012 at 4:29 pm
  • I have the following very simplified situation from atexit import register def goodbye(): print("saying goodbye") def main(): while True: var = raw_input("read something") if __name__ == '__main__': ...
    Andrea CrottiAndrea Crotti
    Feb 15, 2012 at 1:12 pm
    Feb 15, 2012 at 9:31 pm
  • how to tell a method is class method or static method or instance method?
    Zheng LiZheng Li
    Feb 13, 2012 at 6:59 am
    Feb 15, 2012 at 6:31 pm
  • I'd like to read in a stream of data which looks like this: the device sends out a byte-string of 11 bytes roughly every second: B0B0B0B0B03131B0B50D8A B0B0B0B0B03131B0B50D8A B0B0B031B63131B0310D8A ...
    Jean DupontJean Dupont
    Feb 6, 2012 at 9:40 pm
    Feb 7, 2012 at 5:44 pm
  • I hope you are aware that this is about the slowest possible algorithm (well, the slowest one that doesn't do anything unnecessary). Since none of this is required when parsing or generating XHTML, I ...
    Stefan BehnelStefan Behnel
    Feb 1, 2012 at 8:26 am
    Feb 2, 2012 at 12:40 pm
Group Navigation
period‹ prev | Feb 2012 | next ›
Group Overview
grouppython-list @
categoriespython
discussions270
posts1,442
users349
websitepython.org

349 users for February 2012

Steven D'Aprano: 78 posts Terry Reedy: 57 posts Chris Angelico: 50 posts Ian Kelly: 43 posts Rick Johnson: 42 posts Peter Otten: 39 posts Chris Rebert: 35 posts Mark Lawrence: 32 posts Arnaud Delobelle: 31 posts Dave Angel: 30 posts Andrea Crotti: 23 posts 88888 Dihedral: 22 posts Andrew Berg: 22 posts Ethan Furman: 18 posts MRAB: 18 posts Roy Smith: 18 posts Ben Finney: 17 posts Devin Jeanpierre: 17 posts Vinay Sajip: 16 posts Michael Torrie: 15 posts
show more
Archives