Search Discussions

444 discussions - 2,391 posts

  • Hi, I've a project with tabs and spaces mixed (yes I know it's bad). I edit each file to remove tabs, but it's so easy to make a mistake. Do you know a tools to compare the initial file with the ...
    Oct 31, 2010 at 12:02 pm
    Nov 10, 2010 at 4:41 am
  • In "The Zen of Python", one of the "maxims" is "flat is better than nested"? Why? Can anyone give me a concrete example that illustrates this point? TIA! ~kj PS: My question should not be construed ...
    Oct 25, 2010 at 10:07 am
    Nov 10, 2010 at 5:08 am
  • So, I'm messing around with pylint. Quite a lot of what it says is quite reasonable, makes sense to me, and all that. There's a few exceptions. One: I am a big, big, fan of idiomatic short names ...
    Oct 19, 2010 at 7:57 pm
    Oct 22, 2010 at 5:42 pm
  • So, I'm new to Python, though I've got a bit of experience in a few other languages. My overall impressions are pretty mixed, but overall positive; it's a reasonably expressive language which has a ...
    Oct 12, 2010 at 7:14 pm
    Oct 14, 2010 at 10:48 pm
  • I found two similar questions in the mailing list, but I didn't understand the explanations. I ran this code on Ubuntu 10.04 with Python 2.6.5. Why do the functions g and gggg behave differently? If ...
    Sean ChoiSean Choi
    Oct 21, 2010 at 9:36 pm
    Nov 9, 2010 at 9:14 pm
  • it may be assembler, too bad scheme libs are scattered around written in far too many different flavors of assembler... It warms my heart though to realize that Scheme's usual small size and ...
    Oct 13, 2010 at 9:09 pm
    Nov 27, 2010 at 4:51 pm
  • Hello. I have a class A that contains two classes B and C: class A: class B: self.x = 2 class C: Is there a way to access the x defined in B in class C? Thanks. -- F. Delente
    Oct 18, 2010 at 1:09 pm
    Oct 20, 2010 at 7:11 pm
  • plz can u convert this cpp file into python i need that badly as soon as possible... I am new to python. I just wanna learn it.... An HTML attachment was scrubbed... URL: ...
    Oct 6, 2010 at 3:54 am
    Oct 14, 2010 at 6:54 am
  • I was somewhat surprised to discover that Python 3 no longer allows an exception to be raised in an except clause (or rather that it reports it as a separate exception that occurred during the ...
    Steve HoldenSteve Holden
    Oct 24, 2010 at 5:01 am
    Nov 6, 2010 at 4:10 am
  • In <i9n9ed$q03$1 at reader1.panix.com gb345 <gb345 at invalid.com writes: Thank you all for your comments and suggestions. Here's where I am now. 1. I first implemented a GUI using wx, but later ...
    Oct 22, 2010 at 2:25 pm
    Oct 30, 2010 at 1:51 am
  • haha, I've read some of the comics before. It's truly remarkably funny, no matter the language of your choice... going well down the rabbit hole should convince one... :)
    Oct 27, 2010 at 6:00 pm
    Feb 9, 2011 at 8:02 pm
  • Hello all, So, I started learning python just recently. I got inspired by a project that related to the semantic web. I can see why this would be a language chosen for the applications that help to ...
    B. M. WhealtonB. M. Whealton
    Oct 5, 2010 at 2:31 am
    Oct 15, 2010 at 4:46 am
  • PEP 249 says about executemany(): Prepare a database operation (query or command) and then execute it against all parameter sequences or mappings found in the sequence seq_of_parameters. are there ...
    Roy SmithRoy Smith
    Oct 12, 2010 at 3:10 pm
    Oct 17, 2010 at 12:02 am
  • Dijkstra came to his conclusion after seeing the results of students using the programming language Mesa, which does support all 4 forms of interval.
    Oct 5, 2010 at 7:41 pm
    Oct 13, 2010 at 9:41 am
  • Hi there. I am used to some languages like C, but I am just a complete newbie with Python and, while writing some small snippets, I had encountered some problems, with which I would sincerely ...
    Rogério BritoRogério Brito
    Oct 7, 2010 at 11:10 pm
    Oct 11, 2010 at 4:55 pm
  • I'm building a turn based RPG game as a hobby. The design is becoming increasingly complicated and confusing, and I think I may have tendency to over-engineer simple things. Can anybody please check ...
    Oct 18, 2010 at 7:28 am
    Nov 15, 2010 at 10:52 pm
  • Hello all: I have a need to read .msg files exported from Outlook. Google search came out with a few very old posts about the topic but nothing really useful. The email module in Python is no help - ...
    John HenryJohn Henry
    Oct 10, 2010 at 9:51 pm
    Oct 22, 2010 at 4:55 pm
  • The short version of this question is: where can I find the algorithm used by the tuple class's __hash__ method? Now, for the long version of this question, I'm working with some complext Python ...
    Oct 6, 2010 at 6:58 pm
    Oct 10, 2010 at 8:57 pm
  • I am a beginner in Python and would ask for a help. I was searching for smaller version of code to calculate factorial . Found this one def fact(x): return x 1 and x * fact(x - 1) or 1 But I don't ...
    Oct 27, 2010 at 6:25 am
    Nov 1, 2010 at 4:41 pm
  • Two modules: x.py: class x(object): pass y.py: from x import x class y(x): pass Now from the python command line: ['__builtins__', '__doc__', '__file__', '__name__', '__package__', 'x', 'y'] I do not ...
    Oct 21, 2010 at 6:09 pm
    Oct 30, 2010 at 9:57 am
  • Here's an obscure bit of Python semantics which is close to being a bug: ... classvar = 1 ... ... def fn1(self) : ... print("fn1: classvar = %d" % (self.classvar,)) ... self.classvar = 2 ... ...
    John NagleJohn Nagle
    Oct 10, 2010 at 5:30 am
    Oct 15, 2010 at 11:50 pm
  • recently wrote a article based on a debate here. (can't find the original thread on Google at the moment) ? ?What's List Comprehension and Why is it Harmful?? ...
    Xah LeeXah Lee
    Oct 26, 2010 at 9:31 am
    Nov 22, 2010 at 7:19 am
  • It's clear but tedious to write: if 'monday" in days_off or "tuesday" in days_off: doSomething I currently am tending to write: if any([d for d in ['monday', 'tuesday'] if d in days_off]): ...
    Oct 28, 2010 at 4:16 pm
    Nov 1, 2010 at 1:38 am
  • Hi. I installed eclipse/pydev today. I created a pydev project and added python source files with utf-8 BOM. Eclipse/Pydev reports lexical error : Lexical error at line 1, column 1. Encountered: ...
    Oct 4, 2010 at 8:03 am
    Oct 31, 2010 at 9:26 pm
  • i've looked on the web and here but i didn't find an answer : here is my code zlib.decompress(""" x???=??H?s~???\??? ...
    Bussiere bussiereBussiere bussiere
    Oct 11, 2010 at 9:37 am
    Oct 16, 2010 at 2:13 pm
  • Hi everyone i need a hint regarding the following exercise question: "Write a program that generates all Pythagorean triples whose small sides are no larger than n. Try it with n <= 200." what is "n" ...
    Oct 21, 2010 at 10:51 am
    Oct 24, 2010 at 11:56 pm
  • I have been using generators for the first time and wanted to check for an empty result. Naively I assumed that generators would give appopriate boolean values. For example def xx(): l = [] for x in ...
    Oct 14, 2010 at 9:16 am
    Oct 15, 2010 at 4:12 pm
  • I've been reading about the Unicode today. I'm only vaguely understanding what it is and how it works. Please correct my understanding where it is lacking. Unicode is really just a database of ...
    Oct 19, 2010 at 7:02 pm
    Oct 26, 2010 at 5:07 pm
  • Hi all :) I've really been wondering about the following lately. The question is this: if there are no (real) private or protected members in Python, how can you be sure, when inheriting from another ...
    Oct 3, 2010 at 8:07 pm
    Oct 5, 2010 at 1:29 am
  • I've been playing a bit with Python3.2a2, and frankly its charset handling looks _less_ safe than in Python 2. The offender is bytes.__str__: str(b'foo') == "b'foo'". It's often not clear from ...
    Hallvard B FurusethHallvard B Furuseth
    Oct 7, 2010 at 9:33 pm
    Oct 12, 2010 at 3:48 pm
  • I am working with differential equations of the higher roots of negative one. (dividing enormous numbers into other enormous numbers to come out with very reasonable numbers). I am mixing this in to ...
    Bj RazBj Raz
    Oct 29, 2010 at 4:41 am
    Nov 24, 2010 at 9:02 am
  • I am loathe to duplicate programming in files that should just load a copy from a module. I tried all kinds of tricks to import a module from one level up. What's the secret? It works if I say: from ...
    Oct 31, 2010 at 3:06 pm
    Nov 4, 2010 at 2:48 am
  • Given the following.. #!/usr/bin/python import urllib2 import sys import time while 1: try: con = urllib2.urlopen("http://www.google.com") data = con.read() print "connected" #The loop doesn't exit ...
    Oct 5, 2010 at 2:38 am
    Oct 13, 2010 at 9:08 am
  • Following a suggestion from MRAB, I attempted to implement a frozendict class. My implementation took a lot more work than something this simple should take, and it still sucks. So I'm hoping someone ...
    Oct 7, 2010 at 9:39 pm
    Oct 10, 2010 at 12:54 am
  • The documentation of the sqlite module at http://docs.python.org/library/sqlite3.html says: "...allows accessing the database using a nonstandard variant of the SQL..." But if you see SQLite website ...
    Oct 2, 2010 at 8:06 pm
    Oct 4, 2010 at 9:04 pm
  • `all_ascii(L)` is a function that accepts a list of strings L, and returns True if all of those strings contain only ASCII chars, False otherwise. What's the fastest way to implement `all_ascii(L)`? ...
    Dun PealDun Peal
    Oct 17, 2010 at 7:59 pm
    Oct 29, 2010 at 8:57 pm
  • I'm considering a nested mapping class for the collections module and would like to solicit feedback from people here on comp.lang.python: ...
    Raymond HettingerRaymond Hettinger
    Oct 21, 2010 at 11:19 pm
    Oct 29, 2010 at 6:19 am
  • Not Hyp: def _scrunch(**dict): result = {} for key, value in dict.items(): if value is not None: result[key] = value return result That says "throw away every item in a dict if the Value is None". ...
    Oct 21, 2010 at 4:32 am
    Oct 22, 2010 at 6:38 pm
  • Hello, When transmitting via UDP to a PLC, I run into a strange problem where socket.sendto returns double the number of characters sent in the datagram. I thought this was an error and used ...
    Todd WalterTodd Walter
    Oct 20, 2010 at 8:20 pm
    Oct 22, 2010 at 5:41 pm
  • Which is better for a beginner to get started in Python with? Thanks! An HTML attachment was scrubbed... URL: ...
    Braden FaulknerBraden Faulkner
    Oct 27, 2010 at 12:16 am
    Oct 31, 2010 at 11:13 pm
  • I tried the following... #!/usr/bin/python class foo: def first(self): print "Chad " def last(self): print "A " x = foo() y = x.first() y.last() But when I ran it, I got the following... [cdalten at ...
    Oct 24, 2010 at 10:47 pm
    Oct 25, 2010 at 5:48 pm
  • I'm getting my Python environment set up on a new Snow Leopard machine, and I'd like to compile everything in 32 bit mode for the time being, because some of the extensions I need use APIs that ...
    Gregory EwingGregory Ewing
    Oct 13, 2010 at 12:29 am
    Oct 15, 2010 at 2:00 am
  • I have been programing in python for a while now and by in large love it. One thing I don't love though is that as far as I know iterators have no has_next type functionality. As a result if I want ...
    Kelson ZawackKelson Zawack
    Oct 21, 2010 at 11:08 am
    Oct 25, 2010 at 5:54 pm
  • Hello Everyone, I'm new in this group and I hope it is ok to directly ask a question. My short question: I'm searching for a nice way to merge a list of tuples with another tuple or list. Short ...
    Daniel WagnerDaniel Wagner
    Oct 20, 2010 at 12:16 am
    Oct 21, 2010 at 2:07 am
  • Since the new IDE from Jetbrains is out I was wondering if "you" are using it and what "you" think about it. I have to start learning Python for a project at work and I am looking around for options. ...
    Robert HRobert H
    Oct 13, 2010 at 9:36 pm
    Oct 19, 2010 at 6:12 pm
  • Hi, I am new to this group, please forgive me if this is a repeat question. I am a new Python programmer but experienced in C/Unix. I am converting a shell script to Python which essentially loops ...
    Roger DavisRoger Davis
    Oct 13, 2010 at 9:58 pm
    Oct 16, 2010 at 2:05 am
  • First off, greetings from a newbie! Here's the deal. I gained a passable knowledge of Python nearly ten years ago. Then I decided a career in the computer sciences wasn't for me, and I let it go. Now ...
    Craig McRobertsCraig McRoberts
    Oct 28, 2010 at 6:14 pm
    Oct 30, 2010 at 12:08 pm
  • Hi All I have made a tool for load testing of my company's web-server product. The tool is written using Python 3.1. The tool basically does a HTTP or HTTPS post, gets response and parses the ...
    Ashish VyasAshish Vyas
    Oct 12, 2010 at 12:40 pm
    Oct 14, 2010 at 12:32 pm
  • Hello, how i can save a binary file, i read in the manual in the IO area but doesn' t show how to save it. Here is the code what i am using: s = open('/home/hidura/test.jpeg', 'wb') ...
    Oct 5, 2010 at 9:11 pm
    Oct 10, 2010 at 4:46 am
  • hi I am trying to write a compare method which takes two strings and find how many characters have changed. def compare_strings(s1,s2): pass text1="goat milk" text2="cow milk" print ...
    Oct 9, 2010 at 8:44 am
    Oct 9, 2010 at 9:05 pm
Group Navigation
period‹ prev | Oct 2010 | next ›
Group Overview
grouppython-list @

535 users for October 2010

None: 127 posts Steven D'Aprano: 85 posts Chris Rebert: 72 posts Seebs: 63 posts Diez B. Roggisch: 46 posts MRAB: 45 posts Arnaud Delobelle: 44 posts Gregory Ewing: 38 posts John Nagle: 37 posts Kj: 35 posts Peter Otten: 33 posts Terry Reedy: 30 posts Ethan Furman: 27 posts Steve Holden: 27 posts Antoine Pitrou: 26 posts Ben Finney: 26 posts Grant Edwards: 26 posts Steven D'Aprano: 26 posts Dave Angel: 24 posts Jean-Michel Pichavant: 22 posts
show more