FAQ

Search Discussions

841 discussions - 4,018 posts

  • Python provides a quite good and feature-complete exception handling mechanism for its programmers. This is good. But exceptions, like any complex construct, are difficult to use correctly, ...
    ElibenEliben
    Aug 19, 2008 at 5:19 pm
    Aug 27, 2008 at 4:52 pm
  • I know one benchmark doesn't mean much but it's still disappointing to see Python as one of the slowest languages in the test: ...
    JackJack
    Aug 7, 2008 at 12:05 am
    Aug 11, 2008 at 5:17 pm
  • Hey, I'm a Java/Java EE developer and I'm playing with Python these days. I like the Python language so much and I like its communities and the Django framework. My friends are about to open a ...
    Hussein BHussein B
    Aug 13, 2008 at 11:14 am
    Aug 19, 2008 at 6:58 pm
  • Okay, so lets say you have a list: funList = [1,2,3,4,5] and you do: for x in funList: print x this will print 1-5 But I am wondering is there a way to something like this: funString = "string string ...
    AlexnbAlexnb
    Aug 17, 2008 at 6:22 pm
    Aug 18, 2008 at 8:02 pm
  • Sometimes it seems that barely a day goes by without some newbie, or not- so-newbie, getting confused by the behaviour of functions with mutable default arguments. No sooner does one thread finally, ...
    Steven D'ApranoSteven D'Aprano
    Aug 22, 2008 at 2:42 pm
    Aug 24, 2008 at 12:40 am
  • I have a list that starts with zeros, has sporadic data, and then has good data. I define the point at which the data turns good to be the first index with a non-zero entry that is followed by at ...
    TkpmepTkpmep
    Aug 26, 2008 at 9:49 pm
    Aug 29, 2008 at 4:49 pm
  • Hello, Any suggestions on a good python equivalent for the following C code: while (loopCondition) { if (condition1) goto next; if (condition2) goto next; if (condition3) goto next; stmt1; stmt2; ...
    Kurien MathewKurien Mathew
    Aug 16, 2008 at 9:20 pm
    Aug 18, 2008 at 4:57 pm
  • The other night I surveyed a site for astronomical use by measuring the altitude (0-90 degrees above the horizon) and az (azimuth, 0 degrees north clockwise around the site to 360 degrees, almost ...
    W. eWatsonW. eWatson
    Aug 22, 2008 at 11:12 pm
    Aug 26, 2008 at 1:43 pm
  • Hello, I tried to load a 6.8G large dictionary on a server that has 128G of memory. I got a memory error. I used Python 2.5.2. How can I load my data? SImon
    Simon StroblSimon Strobl
    Aug 1, 2008 at 7:46 am
    Aug 6, 2008 at 8:20 am
  • Hi there, I need to extract data from text files (~4 GB) on this data some operations are performed like avg, max, min, group etc. The result is formated and written in some other text files (some ...
    MarkMark
    Aug 31, 2008 at 1:15 pm
    Sep 2, 2008 at 5:50 pm
  • I'm stumped. I'm calling a method that has keyword args, but not setting them, and yet one of them starts off with data?! The class definition begins like so: class BattleIntentionAction( ...
    JasperJasper
    Aug 18, 2008 at 8:32 am
    Aug 21, 2008 at 5:49 am
  • Hi, I'd like to be able to use a nested class (C1) from another sibling nested class (C3). This looks very similar to the nested scopes of functions except that it does not work. class A(object): ...
    Cousson, BenoitCousson, Benoit
    Aug 12, 2008 at 9:29 am
    Aug 14, 2008 at 7:27 am
  • kevin The standard output of the system command 'whoami' is my login name. Yet the value of the 'foo' object is '0,' not 'kevin.' How can I get the value of 'kevin' associated with foo? -- Kevin ...
    Kevin WalzerKevin Walzer
    Aug 7, 2008 at 1:07 am
    Aug 14, 2008 at 6:41 am
  • Are there some date and time comparison functions that would compare, say, Is 10/05/05 later than 09/22/02? (or 02/09/22 format, yy/mm/dd) Is 02/11/07 the same as 02/11/07? Is 14:05:18 after ...
    W. eWatsonW. eWatson
    Aug 24, 2008 at 5:08 pm
    Aug 30, 2008 at 8:57 pm
  • when I use 20 for ,"SystemError: too many statically nested blocks" When I use 100 for ,"IndentationError: too many levels of indentation" How to handle these errors? An HTML attachment was ...
    Patrol SunPatrol Sun
    Aug 16, 2008 at 5:00 am
    Aug 18, 2008 at 4:01 pm
  • hello guys i just ran into this when comparing negative numbers, they start returning False from -6 down, but only when comparing with 'is' True False True i read that 'is' compares if they are ...
    Ariel ledesmaAriel ledesma
    Aug 14, 2008 at 8:18 pm
    Aug 15, 2008 at 10:14 pm
  • Hi, I want to manage and control access to several important attributes in a class and override the behaviour of some of them in various subclasses. Below is a stripped version of how I've ...
    David MossDavid Moss
    Aug 22, 2008 at 4:18 pm
    Aug 26, 2008 at 1:09 pm
  • Just heard about Psycho. I've often wondered why someone doesn't make something that does exactly what Psycho does - keen. Silly question: It's correct, is it not, that Psycho doesn't actually modify ...
    David C. UllrichDavid C. Ullrich
    Aug 5, 2008 at 6:28 pm
    Aug 23, 2008 at 5:22 pm
  • I am creating a program that requires some data that must be kept up to date. What I plan is to put this data up on a web-site then have the program periodically pull the data off the web-site. My ...
    FettFett
    Aug 28, 2008 at 9:51 pm
    Sep 3, 2008 at 10:10 am
  • anyone know how I would find out how many rows are in a csv file? I can't find a method which does this on csv.reader. Thanks in advance
    SimonPalmerSimonPalmer
    Aug 27, 2008 at 11:16 am
    Aug 28, 2008 at 12:48 am
  • I'm just reading PEP 3107 (function annotations) and wonder why exceptions are not mentioned there. I think it would be helpful if one could specify which exceptions can be raised by a function, ...
    Christoph ZwerschkeChristoph Zwerschke
    Aug 9, 2008 at 4:08 pm
    Aug 18, 2008 at 12:10 am
  • I wish to replace several characters in my string to only one. Example, "-", "." and "/" to nothing "" I did like that: my_string = my_string.replace("-", "").replace(".", "").replace("/", ...
    GjhamesGjhames
    Aug 13, 2008 at 4:39 pm
    Aug 14, 2008 at 3:25 pm
  • I am very new to Python (I started learning it just yesterday), but I have encountered a problem. I want to make a simple script that calculates the n-th root of a given number (e.g. 4th root of ...
    CNiallCNiall
    Aug 3, 2008 at 2:02 pm
    Aug 7, 2008 at 3:17 pm
  • Is there a way to view all the modules I have available for import from within Python? Like writing in the interpreter: import.modules Also, is there anything like Cpan for Python?
    SsecorpSsecorp
    Aug 28, 2008 at 4:21 am
    Sep 10, 2008 at 9:57 pm
  • if i want to make a string downcase, is upper().swapcase() the onyl choice? there is no downer() ?
    SsecorpSsecorp
    Aug 27, 2008 at 2:16 pm
    Aug 30, 2008 at 12:04 am
  • Hi all, I am not altogether experienced in Python, but I haven't been able to find a good example of the syntax that I'm looking for in any tutorial that I've seen. Hope somebody can point me in the ...
    BrandonBrandon
    Aug 11, 2008 at 7:27 am
    Aug 15, 2008 at 2:26 am
  • Hi all, I have an interesting problem that I'm hoping can be solved with metaprogramming, but I don't know how far Python supports code generation (and I don't know if I'm taking the correct approach ...
    WilsonWilson
    Aug 4, 2008 at 9:48 am
    Aug 8, 2008 at 2:19 pm
  • x=[1,2,3] and x=[1,2,3,] are exactly the same, right? I'm generating some python data, and it's less error prone to not treat the last element specially, but I want to be sure I'm generating an ...
    MhMh
    Aug 28, 2008 at 11:19 pm
    Aug 30, 2008 at 3:17 pm
  • Hi, I'm familiar with static method concept, but what is the class method? how it does differ from static method? when to use it? -- class M: def method(cls, x): pass method = classmethod(method) -- ...
    Hussein BHussein B
    Aug 24, 2008 at 8:32 am
    Aug 27, 2008 at 10:09 am
  • Hello, I want to be able to do something like this: Employee = Struct(name, salary) And then: john = Employee('john doe', 34000) print john.salary Basically, Employee = Struct(name, salary) should be ...
    ElibenEliben
    Aug 13, 2008 at 4:43 pm
    Aug 21, 2008 at 5:17 am
  • Hi I was wondering if there is anyway with XML RPC to send a string of text from the server to the client with out calling return thus breaking my loop for example def somefunc(): for action, files ...
    AndrewAndrew
    Aug 25, 2008 at 11:37 pm
    Aug 27, 2008 at 1:07 am
  • Are dictionaries the same as hashtables?
    CnbCnb
    Aug 26, 2008 at 7:32 am
    Aug 26, 2008 at 6:30 pm
  • Hi, Is the following code is ok. who to call all method. It is working but the call to m() without a reference to self seems strange Thanks for your help class CustomMethod: def method1(self): .... ...
    MadumaMaduma
    Aug 19, 2008 at 2:18 pm
    Aug 21, 2008 at 12:25 am
  • This is similar to my last post, but a little different. Here is what I would like to do. Lets say I have a text file. The contents look like this, only there is A LOT of the same thing. () A ...
    AlexnbAlexnb
    Aug 18, 2008 at 8:40 pm
    Aug 20, 2008 at 6:24 am
  • Hi, how can I combine some dynamically generated html code (using python) with the output of a urllib.openurl() call? I have tried to use the StringIO() class with .write functions, but it did not ...
    AnartzAnartz
    Aug 11, 2008 at 1:15 pm
    Aug 12, 2008 at 5:21 am
  • Hi, This is a little bit strange post, but I'm curious... I learned Python from its tutorial step by step, and practicing writing small scripts. I haven't seen a Python program before knowing Python. ...
    Iu2Iu2
    Aug 4, 2008 at 7:06 pm
    Aug 6, 2008 at 5:34 am
  • ... print elem.text ... Traceback (most recent call last): File "<stdin ", line 1, in <module File "<string ", line 64, in __iter__ UnicodeEncodeError: 'ascii' codec can't encode characters in ...
    George SakkisGeorge Sakkis
    Aug 20, 2008 at 10:36 pm
    Aug 27, 2008 at 3:00 pm
  • Hey, Well, as you all know by now, I'm learning Python :) One thing that is annoying my is the OOP in Python. Consider this code in Java: -- public class Car { private int speed; private String ...
    Hussein BHussein B
    Aug 21, 2008 at 12:21 pm
    Aug 26, 2008 at 10:29 am
  • I am trying to figure out how to test if two numbers are of the same sign (both positive or both negative). I have tried abs(x) / x == abs(y) / y but that fails when one of the numbers is 0. I'm sure ...
    JohnewingJohnewing
    Aug 20, 2008 at 9:38 pm
    Aug 21, 2008 at 8:54 am
  • How do I determine the order of definition of class attributes? For example, if I have a class class Test(object): y = 11 x = 22 How do I tell that y was defined before x? Thanks, -a
    Andrew LentvorskiAndrew Lentvorski
    Aug 1, 2008 at 11:23 pm
    Aug 16, 2008 at 2:47 am
  • Decided to try to install PIL on my Mac (OS X.5). I know nothing about installing programs on Linux, nothing about building C programs, nothing about installing libraries, nothing about "fink", ...
    David C. UllrichDavid C. Ullrich
    Aug 1, 2008 at 6:46 pm
    Aug 13, 2008 at 8:27 am
  • Hello, I need to synchronize the access to a couple of hundred-thousand files[1]. It seems to me that creating one lock object for each of the files is a waste of resources, but I cannot use a global ...
    Nikolaus RathNikolaus Rath
    Aug 4, 2008 at 1:30 pm
    Aug 7, 2008 at 9:24 am
  • I'm writing Python as if it were strongly typed, never recycling a name to hold a type other than the original type. Is this good software engineering practice, or am I missing something Pythonic?
    MartinRinehartMartinRinehart
    Aug 1, 2008 at 3:31 pm
    Aug 4, 2008 at 2:02 pm
  • Hello, I am new to Python and have one simple question to which I cannot find a satisfactory solution. I want to read text line-by-line from a text file, but want to ignore only the first line. I ...
    Youngjin MichaelYoungjin Michael
    Aug 28, 2008 at 4:11 am
    Aug 30, 2008 at 11:36 am
  • Recently had a need to us a multimap container in C++. I now need to write equivalent Python code. How does Python handle this? k['1'] = 'Tom' k['1'] = 'Bob' k['1'] = 'Joe' ... Same key, but ...
    BradBrad
    Aug 27, 2008 at 1:35 pm
    Aug 28, 2008 at 7:28 pm
  • how is Queue intended to be used? I found the following code in python manual, but I don't understand how to stop consumers after all items have been produced. I tried different approaches but all of ...
    Alexandru MosoiAlexandru Mosoi
    Aug 27, 2008 at 9:45 am
    Aug 28, 2008 at 2:19 am
  • Hi, Wouldn't it be nicer to have 'in' return values (or keys) for both arrays and dictionaries. Arrays and Dictionaries looked so similar in Python until I learned this difference. Thanks, ++imanshu
    ++imanshu++imanshu
    Aug 26, 2008 at 12:49 am
    Aug 27, 2008 at 12:53 am
  • In article <mailman.2119.1219612653.922.python-list at python.org , "Hendrik van Rooyen" wrote: Reminds me of that great old song from "Saturday Night Hacker": Oh, oh, oh, oh. Flaying alive, flaying ...
    Roy SmithRoy Smith
    Aug 24, 2008 at 9:40 pm
    Aug 26, 2008 at 8:32 pm
  • Hi All, Quick question, I can't seem to find the answer online (well, at the moment I think the answer is a simple "no" but I would like to confirm). Consider the following hash: h = { "1" : "a\r", ...
    Simon MullisSimon Mullis
    Aug 25, 2008 at 12:52 pm
    Aug 26, 2008 at 6:11 am
  • Hi Guys, I'm new to Python (mostly) and I'm wanting to use it for a new project I'm faced with. I have a machine (PLC) that is dumping its test results into a fixed-length text file. I need to pull ...
    StaceyStacey
    Aug 13, 2008 at 9:04 pm
    Aug 15, 2008 at 12:13 pm
Group Navigation
period‹ prev | Aug 2008 | next ›
Group Overview
grouppython-list @
categoriespython
discussions841
posts4,018
users908
websitepython.org

908 users for August 2008

Fredrik Lundh: 182 posts Gabriel Genellina: 90 posts Diez B. Roggisch: 89 posts Terry Reedy: 88 posts Castironpi: 85 posts John Machin: 80 posts Bruno Desthuilliers: 79 posts Steven D'Aprano: 77 posts BearophileHUGS: 43 posts Edwin Madari: 40 posts Peter Otten: 40 posts Mike B: 38 posts Paul Boddie: 37 posts W. eWatson: 35 posts Wojtek Walczak: 35 posts Bruno Desthuilliers: 34 posts Christian Heimes: 34 posts Carl Banks: 33 posts Alex23: 32 posts Timothy Grant: 29 posts
show more
Archives