FAQ

Search Discussions

472 discussions - 3,456 posts

  • Ok, just looking for a sanity check here, or maybe something I'm missing. I have a class Test, for example: class Test: def __init__(self, param1, param2, param3): self.param1 = param1 self.param2 = ...
    TT
    Feb 8, 2010 at 1:05 am
    Feb 23, 2010 at 6:24 pm
  • Hi all, a company that works with my company writes a lot of of their code in Python (lucky jerks). I've seen their code and it basically looks like this: """Function that does stuff""" def ...
    Andreas WaldenburgerAndreas Waldenburger
    Feb 24, 2010 at 8:23 pm
    Mar 12, 2010 at 1:49 am
  • Interesting talk on Python vs. Ruby and how he would like Python to have just a bit more syntactic flexibility. http://blog.extracheese.org/2010/02/python-vs-ruby-a-battle-to-the-death.html -- ...
    Casey HawthorneCasey Hawthorne
    Feb 16, 2010 at 6:38 pm
    Feb 23, 2010 at 7:09 pm
  • Hello, I am sitting here for quite some time, but usually keep silent ;-) I use Python since 2003 both "professionally" and for my hobby projects and love it a much. I notice however, that ...
    Vladimir IgnatovVladimir Ignatov
    Feb 3, 2010 at 11:10 am
    Mar 15, 2010 at 1:41 pm
  • That will be superb -- Passion is my style An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-list/attachments/20100222/f9a67813/attachment.html
    AON LAZIOAON LAZIO
    Feb 22, 2010 at 9:56 pm
    Feb 26, 2010 at 7:28 pm
  • Hello, I need to generate passwords and I think that pseudo-random generator is not good enough, frankly. So I wrote this function: import struct def gen_rand_string(): fileobj = ...
    MkMk
    Feb 23, 2010 at 2:36 pm
    Mar 3, 2010 at 3:15 pm
  • I just spent about 1-1/2 hours tracking down a bug. An innocuous little script, let's call it buggy.py, only 10 lines long, and whose output should have been, at most two lines, was quickly dumping ...
    KjKj
    Feb 2, 2010 at 2:34 am
    Feb 5, 2010 at 9:48 pm
  • To all, I am running an EDI translator, and doing stress tests. When processing a test with a (relatively) big EDI file(s) on windowsXP I get a crash: 'sorry for the inconvenience' etc (so no clues ...
    HjebbersHjebbers
    Feb 11, 2010 at 2:32 pm
    Feb 15, 2010 at 11:39 am
  • Hello, I've asked this question at stackoverflow a few weeks ago, and to make it clear: this should NOT be a copy of the stackoverflow-thread "hidden features of Python". I want to design a poster ...
    JulianJulian
    Feb 4, 2010 at 11:03 pm
    Feb 11, 2010 at 1:34 pm
  • *Sorry by this message off topic, but this is too important* Fascism is coming fastly to Internet because is the only communication way that governements (managed by the bank and multinationals) ...
    Joan MillerJoan Miller
    Feb 23, 2010 at 10:54 am
    Feb 27, 2010 at 8:50 pm
  • hello people, i have been reading posts on this group for quite some time now and many, if not all (actually not all!), seem quite interesting. i plan to build an application, a network based ...
    Simn_stvSimn_stv
    Feb 25, 2010 at 10:26 am
    Mar 4, 2010 at 3:29 pm
  • This has to be a stupid question, but :) I have some generators that do stuff, then start yielding results. On occasion, I don't want them to yield anything ever-- they're only really "generators" ...
    Stephen HansenStephen Hansen
    Feb 18, 2010 at 10:25 pm
    Feb 24, 2010 at 11:36 pm
  • I am pleased to announce the first public release of obfuscate 0.2.2a. http://pypi.python.org/pypi/obfuscate/0.2.2a obfuscate is a pure-Python module providing classical encryption algorithms ...
    Steven D'ApranoSteven D'Aprano
    Feb 8, 2010 at 11:46 pm
    Feb 12, 2010 at 3:39 pm
  • I have been using Python for several years now and have never run into memory errors? until now. My Python program now consumes over 2 GB of memory and then I get a MemoryError. I know I am reading ...
    JeremyJeremy
    Feb 11, 2010 at 11:39 pm
    Feb 14, 2010 at 7:04 pm
  • I'm pleased to announce DreamPie 1.0 - a new graphical interactive Python shell! Some highlights: * Has whatever you would expect from a graphical Python shell - attribute completion, tooltips which ...
    Noam Yorav-RaphaelNoam Yorav-Raphael
    Feb 21, 2010 at 9:42 am
    Mar 22, 2010 at 11:17 pm
  • Last night I copied a program from folder A to folder B. It inspects the contents of files in a folder. When I ran it in B, it gave the results for A! Out of frustration I changed the name in A, and ...
    W. eWatsonW. eWatson
    Feb 22, 2010 at 3:22 pm
    Feb 25, 2010 at 5:44 am
  • In the beginning, Python had some types which were "frozen", and some which weren't. Now, there's a trend towards having both "frozen" and "unfrozen" versions of built-in types. We now have "frozen" ...
    John NagleJohn Nagle
    Feb 16, 2010 at 8:15 pm
    Feb 24, 2010 at 6:31 am
  • Hello, I am writing a program that analyzes files of different formats. I would like to use a function for each format. Obviously, functions can be mapped to file formats. E.g. like this: if ...
    Klaus NeunerKlaus Neuner
    Feb 8, 2010 at 10:57 am
    Feb 10, 2010 at 2:49 pm
  • Out of curiosity I tried this and it actually worked as expected: x=[] foo=x.append def f(self): return self.x [] [1] At first I thought "hehe, always fun to play around with python. Might be useful ...
    Michael RudolfMichael Rudolf
    Feb 28, 2010 at 12:38 pm
    Mar 21, 2010 at 11:28 pm
  • s = f.readline() if 'mystring' in s: print 'foundit' if 'mystring' not in s: print 'not found' if 'mystring' in s: print 'processing' this generates output: not found processing so, it doesn't find ...
    QuinQuin
    Feb 9, 2010 at 9:00 pm
    Feb 10, 2010 at 9:57 pm
  • I have a web-page where each row in a grid has edit/delete buttons to enable the user to maintain a selected record on another page. The buttons are in the form of a link with href='/item_edit?id3', ...
    Alan Harris-ReidAlan Harris-Reid
    Feb 3, 2010 at 6:01 pm
    Feb 5, 2010 at 3:29 am
  • Hi everyone, What is the simplest way to access the attributes of a function from inside it, other than using its explicit name? In a function like f below: def f(*args): f.args = args print args is ...
    Muhammad AlkarouriMuhammad Alkarouri
    Feb 10, 2010 at 1:59 pm
    Feb 14, 2010 at 9:32 pm
  • Can someone explain to me what python is doing here? Python 3.1.1 (r311:74480, Feb 3 2010, 13:36:47) [GCC 4.3.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. ...
    Terrence ColeTerrence Cole
    Feb 11, 2010 at 12:44 am
    Feb 27, 2010 at 8:46 pm
  • Hi, I am a fresh man with python. I know there is regular expressions in Python. What I need is that given a particular regular expression, output all the matches. For example, given ?[1|2|3]{2}? as ...
    Hzhuo1Hzhuo1
    Feb 6, 2010 at 7:36 pm
    Feb 8, 2010 at 10:19 am
  • This is a short complaint on admin abuse on #python irc channel on freenode.net. Here's a log: 2010-02-02 (12:11:57 PM) The topic for #python is: NO LOL | http://pound-python.org/ ...
    Xah LeeXah Lee
    Feb 2, 2010 at 8:40 pm
    Feb 8, 2010 at 5:23 am
  • 24

    which

    if isinstance(cmd, str): self.cmd = cmd.replace(r'${ADDR}',ip) else: self.cmd = cmd or self.cmd = cmd if isinstance(cmd, str): self.cmd = cmd.replace(r'${ADDR}',ip)
    MkMk
    Feb 5, 2010 at 2:21 pm
    Feb 6, 2010 at 9:33 am
  • Hi, This morning I am working though Building Skills in Python and was having problems with string.strip. Then I found the input file I was using was in DOS format and I thought it be best to convert ...
    @ Rocteur CC@ Rocteur CC
    Feb 27, 2010 at 9:36 am
    Mar 12, 2010 at 2:13 pm
  • Hi, I have two dicts n={'a', 'm', 'p'} v={1,3,7} and I'd like to have a=1 m=3 p=7 that is, creating some variables. How can I do this?
    VsolerVsoler
    Feb 23, 2010 at 8:53 pm
    Feb 28, 2010 at 7:22 am
  • Hi, What is the best way with python to get a list of all windows services. As a start I would be glad to receive only the service names. However it would be nicer if I could get all the properties ...
    News123News123
    Feb 16, 2010 at 12:04 am
    Feb 17, 2010 at 2:29 pm
  • Does Python provide a way to format a string according to a 'picture' format? For example, if I have a string '123456789' and want it formatted like '(123)-45-(678)[9]', is there a module or function ...
    PythonPython
    Feb 10, 2010 at 4:45 am
    Feb 10, 2010 at 9:55 pm
  • Pythonistas: Yes, calling os.path.walk() and os.path.join() all the time on raw strings is fun, but I seem to recall from my Ruby days a class called Pathname, which presented an object that behaved ...
    PhlipPhlip
    Feb 3, 2010 at 10:47 pm
    Mar 16, 2010 at 5:00 pm
  • Hello! I am newbie mastering test driven development. I can't clarify myself which mock library to use. There are number of them and which one do you prefer? Two libraries that attracted my attention ...
    LacrimaLacrima
    Feb 15, 2010 at 4:15 pm
    Mar 3, 2010 at 8:47 pm
  • I have lots of data that I currently store in dictionaries. However, the memory requirements are becoming a problem. I am considering using a database of some sorts instead, but I have never used ...
    JeremyJeremy
    Feb 26, 2010 at 3:58 pm
    Feb 27, 2010 at 2:21 am
  • Some people have mathphobia. I'm developing a wicked case of Unicodephobia. I have read a *ton* of stuff on Unicode. It doesn't even seem all that hard. Or so I think. Then I start writing code, and ...
    KjKj
    Feb 10, 2010 at 7:09 pm
    Feb 13, 2010 at 5:48 am
  • Hello How can I do something similar to pure virtual functions in C++ ? Let us consider this: class C1: # Pure virtual def cb(self, param1, param2): """ This is a callback @param param1: ... @param ...
    LallousLallous
    Feb 20, 2010 at 4:12 pm
    Feb 25, 2010 at 8:32 pm
  • Hello, I recently read about augmented assignments and that (with l1, l2 being lists) l1.extend(l2) is more efficient than l1 = l1 + l2 because unnecessary copy operations can be avoided. Now my ...
    MarwieMarwie
    Feb 21, 2010 at 12:55 am
    Feb 22, 2010 at 5:15 am
  • I know there's a performance penalty for running Python on a multicore CPU, but how bad is it? I've read the key paper ("www.dabeaz.com/python/GIL.pdf"), of course. It would be adequate if the GIL ...
    John NagleJohn Nagle
    Feb 2, 2010 at 11:02 pm
    Feb 21, 2010 at 10:39 pm
  • I have a script, which runs as a Windows service under the LocalSystem account, that I wish to have execute some commands. Specifically, the program will call plink.exe to create a reverse SSH ...
    TT
    Feb 7, 2010 at 7:02 pm
    Feb 13, 2010 at 6:36 am
  • Hello everyone, OK so I have this: def print_internal_date(filename): f = open(filename + 'c', "rb") data = f.read(8) mtime = struct.unpack("<i", data[4:]) return time.asctime(time.gmtime(mtime[0])) ...
    MkMk
    Feb 17, 2010 at 5:38 pm
    Feb 18, 2010 at 1:34 pm
  • Dear group: I am developing a program using Python 2.5.4 in windows 32 OS. The amount of data it works with is huge. I have managed to keep memory footprint low, but have found that, independent of ...
    Echavarria Gregory, Maria AngelicaEchavarria Gregory, Maria Angelica
    Feb 13, 2010 at 12:21 am
    Feb 15, 2010 at 3:39 am
  • Given 'n' circles and the co-ordinates of their center, and the radius of all being equal i.e. 'one', How can I take out the intersection of their area. hope the picture makes it clear ...
    Shashwat AnandShashwat Anand
    Feb 4, 2010 at 10:39 am
    Feb 5, 2010 at 8:49 am
  • Hey all, I've been working on a program that accesses my school's password protected website and downloads directory names. I'm using mechanize. Recently, the program has been unable to open the ...
    MattBMattB
    Feb 19, 2010 at 9:48 pm
    Feb 25, 2010 at 11:58 am
  • What's the correct way to measure small periods of elapsed time. I've always used time.clock() in the past: start = time.clock() [stuff being timed] stop = time.clock() delta = stop-start However on ...
    Grant EdwardsGrant Edwards
    Feb 9, 2010 at 4:10 pm
    Feb 24, 2010 at 5:32 pm
  • I am looping through a list and creating a regular dictionary. From that dict, I create an ordered dict. I can't think of a way to build the ordered dict while going through the original loop. Is ...
    BryanBryan
    Feb 22, 2010 at 4:32 pm
    Feb 22, 2010 at 11:34 pm
  • Hello, i am trying to develop an application to teach programming to young kids in a similar way as Logo did in the past. I would like to use an embedded Python as underlying language but this raises ...
    LucaLuca
    Feb 25, 2010 at 3:26 pm
    Feb 26, 2010 at 9:30 pm
  • Hello everyone, I'm getting an exception (on socket) handled in a program I'm trying to debug. I have trouble locating where exactly that happens. In such situation turning exception handling off ...
    MkMk
    Feb 11, 2010 at 4:17 pm
    Feb 12, 2010 at 1:53 pm
  • Just trying to delve into the CPython source code. Pleasant surprise: while e.g. the gcc compiler is written in K&R C (1975 style C), CPython seems to be written in almost modern C (1989 and on). ...
    Alf P. SteinbachAlf P. Steinbach
    Feb 6, 2010 at 8:31 pm
    Feb 7, 2010 at 11:55 pm
  • [1, 2] [1, 2] Whoah! Are python lists only for literals? Nope: [{}, {}] [{'x': 1}, {}] So it looks like variables in a list are stored as object references. This seems to confirm that: ...
    Michael PardeeMichael Pardee
    Feb 21, 2010 at 3:25 am
    Feb 26, 2010 at 8:44 pm
  • I think I remember, early in my learning of Python, coming across the commandment "THOU SHALT NOT USE TRIPLE-QUOTES TO COMMENT-OUT LINES OF CODE", or something to that effect. But now I can't find ...
    KjKj
    Feb 24, 2010 at 6:18 pm
    Feb 26, 2010 at 11:52 am
  • I've successfully compiled several small python programs on Win XP into executables using py2exe. A program goes from a name like snowball.py to snowball. A dir in the command prompt window finds ...
    W. eWatsonW. eWatson
    Feb 19, 2010 at 11:20 am
    Feb 21, 2010 at 12:56 am
Group Navigation
period‹ prev | Feb 2010 | next ›
Group Overview
grouppython-list @
categoriespython
discussions472
posts3,456
users580
websitepython.org

580 users for February 2010

Alf P. Steinbach: 114 posts Steve Holden: 109 posts Steven D'Aprano: 109 posts Aahz: 82 posts Mk: 81 posts Steven D'Aprano: 73 posts MRAB: 72 posts Jean-Michel Pichavant: 69 posts Terry Reedy: 59 posts Paul Rubin: 57 posts Stephen Hansen: 57 posts Jonathan Gardner: 55 posts Arnaud Delobelle: 54 posts Gabriel Genellina: 53 posts Chris Rebert: 50 posts John Bokma: 50 posts Diez B. Roggisch: 47 posts Robert Kern: 46 posts Bruno Desthuilliers: 44 posts Ben Finney: 40 posts
show more
Archives