FAQ

Search Discussions

227 discussions - 1,414 posts

  • I have spent some time searching for a bug in my code, it was due to different work of "is" with () and []: True False (Python 2.7.2+ (default, Oct 4 2011, 20:03:08) [GCC 4.6.1] ) Is this what it ...
    DmitreyDmitrey
    Apr 20, 2012 at 7:10 pm
    May 1, 2012 at 10:49 am
  • Greetings, I'm going to give a "Python Gotcha's" talk at work. If you have an interesting/common "Gotcha" (warts/dark corners ...) please share. (Note that I want over ...
    Miki TebekaMiki Tebeka
    Apr 4, 2012 at 10:34 pm
    Apr 19, 2012 at 1:11 pm
  • hi guys, sorry am feeling a bit prolifit lately. today's show, is: ?Fuck Python? http://xahlee.org/comp/fuck_python.html ------------------------------------ Fuck Python By Xah Lee, 2012-04-08 fuck ...
    Xah LeeXah Lee
    Apr 8, 2012 at 11:11 am
    Nov 12, 2012 at 10:48 pm
  • Hi, Notice cross-post, I hope you bear over with me for doing that (and I imagine that some of you also like python in the matlab-group like myself)... ------------------------------------------ ...
    SomeoneSomeone
    Apr 29, 2012 at 10:17 pm
    May 4, 2012 at 1:36 pm
  • I'm sorry, I don't see how this is a code block. Where is the code in the block, and how can you pass it to another object to execute it? -- Steven From kiuhnm03.4t.yahoo.it Fri Apr 27 17:01:03 2012 ...
    Steven D'ApranoSteven D'Aprano
    Apr 27, 2012 at 2:09 pm
    May 4, 2012 at 4:53 pm
  • I am new to python and only have read the Byte of Python ebook, but want to move to the web. I am tired of being a CMS tweaker and after I tried python, ruby and php, the python language makes more ...
    BiofobicoBiofobico
    Apr 11, 2012 at 8:11 pm
    Apr 20, 2012 at 9:21 am
  • Let's say I have a function which takes a list of words. I might write the docstring for it something like: def foo(words): "Foo-ify words (which must be a list)" What if I want words to be the more ...
    Roy SmithRoy Smith
    Apr 19, 2012 at 12:21 pm
    Apr 21, 2012 at 8:10 am
  • Ok, this is my dillema, not only am I new to this programming buisness, before the last few days, I did not even know what python was, and besides opening up the internet or word documents, that is ...
    SomeoneSomeone
    Apr 21, 2012 at 5:28 pm
    Apr 23, 2012 at 10:27 am
  • I have a multi-threaded CPython program, which has up to four threads. One thread is simply a wait loop monitoring the other three and waiting for them to finish, so it can give them more work to ...
    John NagleJohn Nagle
    Apr 27, 2012 at 6:54 pm
    Apr 29, 2012 at 7:19 pm
  • Learn Technical Writing from Unix Man in 10 Days Quote from man apt-get: remove remove is identical to install except that packages are removed instead of installed. Translation: kicking kicking is ...
    Xah LeeXah Lee
    Apr 28, 2012 at 9:55 pm
    Apr 30, 2012 at 6:03 am
  • hi all, can I somehow overload operators like "= ", "- " or something like that? (I'm searching for appropriate overload for logical implication "if a then b") Thank you in advance, D.
    DmitreyDmitrey
    Apr 19, 2012 at 7:28 pm
    Apr 20, 2012 at 9:52 pm
  • John Carmack glorifying functional programing in 3k words http://www.altdevblogaday.com/2012/04/26/functional-programming-in-c/ where was he ten years ago? O, and btw, i heard that Common Lispers ...
    Xah LeeXah Lee
    Apr 27, 2012 at 2:11 am
    May 3, 2012 at 8:06 am
  • On a *nix box this is a reasonable bit of Python : cmd = "ssh -o StrictHostKeyChecking=no -i %s %s@%s '%s' %s" % (key, user, dns, "echo CONNECTION READY", tmp_file) result = os.system(cmd) ... on a ...
    Richard SheaRichard Shea
    Apr 18, 2012 at 1:35 pm
    Apr 20, 2012 at 6:27 pm
  • Hi, I've got a server process written in C++ running on Unix machine. On the same box I'd like to run multiple Python scripts that will communicate with this server. Can you please suggest what would ...
    KenkKenk
    Apr 29, 2012 at 12:45 am
    Mar 23, 2013 at 10:07 am
  • I'm not seriously suggesting this as a language addition, just an interesting idea to simplify some code I'm writing now: x = [a for a in iterable while a] which equates to: x = [] for a in ...
    Roy SmithRoy Smith
    Apr 26, 2012 at 5:02 pm
    Apr 27, 2012 at 1:14 pm
  • One of the biggest nuisances for programmers, just beneath date/time APIs in the pantheon of annoyances, is that we are constantly dealing with escaping/encoding/formatting issues. I wrote this ...
    Steve HowellSteve Howell
    Apr 6, 2012 at 1:56 am
    May 23, 2012 at 6:19 pm
  • Can you explain why there is a difference between the following two statements? [1] None Best regards, Jan Sipke
    Jan SipkeJan Sipke
    Apr 20, 2012 at 8:03 pm
    Apr 25, 2012 at 6:44 pm
  • Hi, So I am trying to get the number of casualties in a text. After 'death toll' in the text the number I need is presented as you can see from the variable called text. Here is my code I'm pretty ...
    SaniaSania
    Apr 19, 2012 at 6:11 am
    Apr 19, 2012 at 8:58 pm
  • Hi All, I'm pleased to announce the release of xlrd 0.7.4. This release features the following changes: - Fixed a bug where xlrd was silently truncating long text formula results - Avoid parsing ...
    Chris WithersChris Withers
    Apr 3, 2012 at 7:04 am
    Apr 7, 2012 at 2:27 am
  • Hi, I would like to automate some simple tasks I'm doing by hand. Given a text file foobar.fo: 073 1.819 085 2.132 100 2.456 115 2.789 I need to create the directories 073, 085, 100, 115, and copy in ...
    DeltaquattroDeltaquattro
    Apr 30, 2012 at 11:24 pm
    Jun 12, 2012 at 8:57 pm
  • Hello! I have this problem with my script exiting randomly with Linux OS status code -9 (most often) or -15 (also sometimes, but much more rarely). As far as I understand -9 corresponds to Bad file ...
    JanisJanis
    Apr 9, 2012 at 10:01 am
    Apr 10, 2012 at 10:42 am
  • Hi all For a while now I have been using Google Groups to read this group, but on the odd occasion when I want to post a message, I use Outlook Express, as I know that some people reject all messages ...
    Frank MillmanFrank Millman
    Apr 30, 2012 at 6:20 am
    Jun 9, 2012 at 3:27 am
  • http://porn-extreme.2304310.n4.nabble.com/ http://porn-extreme.2304310.n4.nabble.com/ -- View this message in context: http://python.6.n6.nabble.com/AMPUTEE-INCEST-MIDGET-2012-tp4708963p4864079.html ...
    Jimmy970Jimmy970
    Apr 12, 2012 at 8:45 pm
    May 20, 2012 at 6:29 am
  • G'day, I want to extend an embedded interpreter so that calls to print() are automagically sent to a C++ gui (windows exe) via a callback function in the DLL. Then I'll be able to do this ...
    Peter FaulksPeter Faulks
    Apr 26, 2012 at 5:57 pm
    Apr 28, 2012 at 6:56 pm
  • Hi all, here's a problem I don't know how to solve. I'm using Python 2.7.2. I'm doing some stuff in Python which means I have cause to call functions that take a while to return. Since I often want ...
    RotwangRotwang
    Apr 20, 2012 at 3:57 pm
    Apr 21, 2012 at 2:15 pm
  • I came across this case while debugging some Python code that contained an error stemming from the use of multiline strings as comments. The code contained a very long list of objects, and I had ...
    Jordan PerrJordan Perr
    Apr 19, 2012 at 2:07 am
    Apr 19, 2012 at 12:39 pm
  • A little more context would help. The quadruple-toothpick idiom predates Python. It's a little hard on the fingers and eyes at first, but it's pretty expressive--most people will clearly see that you ...
    Steve HowellSteve Howell
    Apr 15, 2012 at 9:13 pm
    Apr 17, 2012 at 7:40 am
  • This is so common in Python that it is hardly worth sneezing about. map(f, iterable) filter(f, iterable) functools.wraps(f, args) --- Sometimes it is a bit hidden. @deco def f(): pass is equivalent ...
    Terry ReedyTerry Reedy
    Apr 9, 2012 at 8:34 pm
    Apr 13, 2012 at 1:23 pm
  • I can connect to an IMAP server using Python 2.6: steve at runes:~$ python2.6 Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" ...
    Steven D'ApranoSteven D'Aprano
    Apr 5, 2012 at 4:49 am
    Apr 7, 2012 at 2:35 am
  • Hello, I am new to python (or to any programming language). My first post on this list, so please go easy. Apologies if its a FAQ. Here is what I have -------------------------------- #! /usr/bin/env ...
    YagYag
    Apr 5, 2012 at 4:50 pm
    Apr 5, 2012 at 6:17 pm
  • Is there an other way to do this? What to decode hex '0xC0A8' and return signed short int. (-16216,) Above works just wondering if there is cleaner way without writing a function. Bill
    PythonPython
    Apr 27, 2012 at 6:42 pm
    Apr 28, 2012 at 2:06 pm
  • I need to use global var across files/modules: # file_1.py a = 0 def funct_1() : a = 1 # a is global print(a) # file_2.py from file_1 import * def main() : funct_1() a = 2 # a is local, it's not ...
    MamboknaveMamboknave
    Apr 22, 2012 at 7:39 pm
    Apr 25, 2012 at 8:13 am
  • HI. is there a way to convert the graphical output of a pygame application to a mpeg file or better an animated gif? i mean, not using an external capture program... bye
    SuperpolloSuperpollo
    Apr 16, 2012 at 9:34 am
    Apr 18, 2012 at 6:48 am
  • I wrote about a straightforward way to program D. E. Knuth in Python, and received an excellent communcation about programming Deterministic Finite Automata (Finite State Machines) in Python. The ...
    Antti J YlikoskiAntti J Ylikoski
    Apr 11, 2012 at 1:03 pm
    Apr 16, 2012 at 7:53 pm
  • Hi, I would like to automate the following task under Linux. I need to create a set of directories such as 075 095 100 125 The directory names may be read from a text file foobar, which also contains ...
    DeltaquattroDeltaquattro
    Apr 30, 2012 at 3:19 pm
    May 8, 2012 at 4:50 am
  • I'm just learning Python. The python doc about mutable and hashable is confusing to me. In my understanding, there is no directly relation between mutable and hashable in Python. Any class with ...
    LaymanzhengLaymanzheng
    Apr 28, 2012 at 6:09 pm
    Apr 29, 2012 at 10:09 am
  • i have download file (gpg4win-2.1.0.exe from http://www.gpg4win.org/download.html) when i run : Type "help", "copyright", "credits" or "license" for 'd41d8cd98f00b204e9800998ecf8427e' it is not = ...
    Contro opinionContro opinion
    Apr 19, 2012 at 1:31 am
    Apr 19, 2012 at 8:16 am
  • Hello, I wrote a `Connection` class that can be found at [1]. A `Connection` object has a method `put_bytes(data)` which returns a "future" [2]. The data will be sent asynchronously by a thread ...
    Stefan SchwarzerStefan Schwarzer
    Apr 14, 2012 at 10:22 pm
    Apr 16, 2012 at 10:54 pm
  • I've found myself using a Python gotcha as a feature. I've got a budding mail filter program which keeps rule state in a little class instance. Slightly paraphrased: class RuleState(object): def ...
    Cameron SimpsonCameron Simpson
    Apr 12, 2012 at 9:35 am
    Apr 12, 2012 at 10:51 pm
  • Okay, I've been trying for days to figure this out, posting on forums, Googling, whatever. I have yet to find a solution that has worked for me. (I'm using Python 3.2.2, Ubuntu 11.04.) Everything ...
    BunslowBunslow
    Apr 6, 2012 at 6:57 am
    Apr 7, 2012 at 6:08 am
  • Hello, First of all..I am very new to python with no background in development area! :) Ok, here is my problem.....I have opened a file and I need to check each line of that file. I have done it with ...
    Nibin V MNibin V M
    Apr 15, 2012 at 9:15 am
    Apr 17, 2012 at 2:47 pm
  • Hello, I'm coming from PHP background ant totally new to Python, I just started using scrapy, but has some generic question in python. 1. How can I write the following code in easier way in Python ? ...
    Mahmoud Abdel-FattahMahmoud Abdel-Fattah
    Apr 14, 2012 at 10:16 pm
    Apr 16, 2012 at 9:51 am
  • I using Python 3.2 and have a dictionary whose values are lists I would like to zip into a list of tuples. If I explicitly write: [(1, 1, 1), (2, 2, 2)] I get exactly what I want. On the other hand, ...
    TkpmepTkpmep
    Apr 12, 2012 at 4:28 pm
    Apr 14, 2012 at 9:35 pm
  • How may I get a fresh Python shell with Idle 3.2 ? I have to run the same modules several times with all variables cleared. Thanks, franck
    Franck DitterFranck Ditter
    Apr 8, 2012 at 6:09 pm
    Apr 10, 2012 at 11:29 pm
  • hi, please, what am i doing wrong here? the docs say http://docs.python.org/release/3.1.3/library/stdtypes.html#comparisons "in general, __lt__() and __eq__() are sufficient, if you want the ...
    Andrew cookeAndrew cooke
    Apr 7, 2012 at 12:23 pm
    Apr 9, 2012 at 4:21 pm
  • the escaping could be removed by use of the following: In Python 3, however, the only way I can see to achieve the same result is to convert into a byte stream and then back: This seems very ugly ...
    Nicholas ColeNicholas Cole
    Apr 6, 2012 at 5:52 pm
    Apr 7, 2012 at 3:59 pm
  • When I use os.system() function, script waits for termination of the windows that is opened by os.system() to continue thus throwing errors and etc. How can i tell Python to let it go and keep on ...
    Yigit TurgutYigit Turgut
    Apr 19, 2012 at 6:09 pm
    Apr 20, 2012 at 6:10 pm
  • I have a function 'f' and a list 'l'. I want a dictionary where the keys are evaluations of 'f(thing from l)' and the values are lists of stuff from 'l' that matches. So for instance, if 'f = lambda ...
    Evan DriscollEvan Driscoll
    Apr 14, 2012 at 3:33 am
    Apr 16, 2012 at 10:04 pm
  • win7HomePremium: Greetings, 1) I installed portablePython(pP) here: C:\Users\vmars\Python3 ?Does that look ok? 2) I would like to try pyWin, but it won't let me install because there is no pP3.2 in ...
    Vmars316Vmars316
    Apr 14, 2012 at 6:25 pm
    Apr 15, 2012 at 5:29 pm
  • Is there a simple way to deep merge two dicts? I'm looking for Perl's Hash::Merge (http://search.cpan.org/~dmuey/Hash-Merge-0.12/Merge.pm) in Python.
    Roy SmithRoy Smith
    Apr 12, 2012 at 5:41 pm
    Apr 14, 2012 at 4:58 am
Group Navigation
period‹ prev | Apr 2012 | next ›
Group Overview
grouppython-list @
categoriespython
discussions227
posts1,414
users353
websitepython.org

353 users for April 2012

Chris Angelico: 117 posts Steven D'Aprano: 64 posts Terry Reedy: 55 posts Ian Kelly: 41 posts Adam Skutt: 29 posts Roy Smith: 27 posts John Nagle: 23 posts Steve Howell: 22 posts Dave Angel: 21 posts Rusi: 21 posts Cameron Simpson: 19 posts Mark Lawrence: 19 posts MRAB: 18 posts Devin Jeanpierre: 17 posts Paul Rubin: 16 posts Peter Otten: 16 posts Jean-Michel Pichavant: 14 posts Chris Rebert: 13 posts Jon Clements: 13 posts Temia Eszteri: 13 posts
show more
Archives