FAQ

Search Discussions

801 discussions - 4,640 posts

  • Hello, What is the Pythonic way of implementing getters and setters. I've heard people say the use of accessors is not Pythonic. But why? And what is the alternative? I refrain from using them ...
    MystilleefMystilleef
    Jul 10, 2006 at 12:19 pm
    Jul 21, 2006 at 2:57 pm
  • I found that I was repeating the same couple of lines over and over in a function and decided to split those lines into a nested function after copying one too many minor changes all over. The only ...
    Josiah MansonJosiah Manson
    Jul 22, 2006 at 12:05 am
    Aug 11, 2006 at 2:03 pm
  • I just moved to another company that's mainly a Java/.NET shop. I was happy to find out that there's a movement from the grassroot to try to convince the boss to use a dynamic language for our ...
    RayRay
    Jul 24, 2006 at 10:41 am
    Aug 18, 2006 at 4:53 pm
  • Which is better? lst = [1,2,3,4,5] while lst: lst.pop() OR while len(lst) 0: lst.pop()
    PTYPTY
    Jul 17, 2006 at 3:56 pm
    Jul 25, 2006 at 10:48 pm
  • Hi, I'm looking for an algo that would convert a list such as: I'm using python to prototype the algo: this will move to C in an embedded system where an int has 16 bits - I do not wish to use any ...
    Philippe MartinPhilippe Martin
    Jul 30, 2006 at 8:41 pm
    Aug 3, 2006 at 8:55 am
  • Okay, once-upon-a-time I tried to start programming by learning C. At the time I was younger and didn't really understand all that C had to offer. I eventually moved over to Microsoft's Visual Basic. ...
    NoahmdNoahmd
    Jul 30, 2006 at 11:21 pm
    Aug 8, 2006 at 2:37 pm
  • Hi all, Is there a way that the program that created and started a thread also stops it. (My usage is a time-out). E.g. thread = threading.Thread(target=Loop.testLoop) thread.start() # This thread is ...
    HansHans
    Jul 22, 2006 at 12:47 pm
    Aug 4, 2006 at 3:23 pm
  • Hi, I am interested in re-writing my website in Python vs PHP but have a few questions. Here are my specs, please advise as to which configuration would be best: 1.Dell Poweredge Server, w/IIS, ...
    NorthbandNorthband
    Jul 31, 2006 at 3:58 pm
    Aug 6, 2006 at 11:00 am
  • it seems that range() can be really slow: the following program will run, and the last line shows how long it ran for: import time startTime = time.time() a = 1.0 for i in range(0, 30000): if i in ...
    SummercoolnessSummercoolness
    Jul 18, 2006 at 2:41 am
    Jul 25, 2006 at 8:10 pm
  • At first I was going to post the following: <!-- beginning of my original post -- I just discovered the inspect module, which contains the isfunction and ismethod functions. For some reason, I used ...
    DanielxDanielx
    Jul 18, 2006 at 5:13 am
    Aug 3, 2006 at 1:58 am
  • Hi, The following might be documented somewhere, but it hit me unexpectedly and I couldn't exactly find this in the manual either. Problem is, that I cannot use augmented assignment operators in a ...
    Tim N. van der LeeuwTim N. van der Leeuw
    Jul 4, 2006 at 12:07 pm
    Jul 10, 2006 at 3:05 pm
  • Hi, I just started learning Python. I went through most of the tutorial at python.org. But I noticed something weird. I'm not talking about the __private hack. Let's say the class is defined as: ...
    Steve JoblessSteve Jobless
    Jul 25, 2006 at 2:49 am
    Aug 2, 2006 at 5:42 pm
  • Alright, based a on discussion on this mailing list, I've started to wonder, why use threads vs processes. So, If I have a system that has a large area of shared memory, which would be better? I've ...
    Carl J. Van ArsdallCarl J. Van Arsdall
    Jul 26, 2006 at 5:54 pm
    Jul 28, 2006 at 10:05 pm
  • I do the following. First create lists x,y,z. Then add an element to x using the augumented assignment operator. This causes all the other lists to be changed also. But if I use the assignment ...
    NagyNagy
    Jul 8, 2006 at 3:14 am
    Jul 20, 2006 at 7:24 pm
  • I have a problem. I'm writing a simulation program with a number of mechanical components represented as objects. When I create instances of objects, I need to reference (link) each object to the ...
    DavehoweyDavehowey
    Jul 19, 2006 at 3:30 pm
    Jul 28, 2006 at 7:31 am
  • I am comparing Python to a few other scripting languages, and used a simple anagrams program as a sample. I was surprised ast a few python features that did not work as I would expect/wish; which ...
    Gregory GuthrieGregory Guthrie
    Jul 9, 2006 at 5:19 pm
    Jul 11, 2006 at 1:25 pm
  • As my first attempt to loop through every pixel of an image, I used for thisY in range(0, thisHeight): for thisX in range(0, thisWidth): #Actions here for Pixel thisX, thisY But it takes 450-1000 ...
    ChaosChaos
    Jul 28, 2006 at 1:19 am
    Aug 5, 2006 at 11:13 pm
  • Hi, I have some basic doubts about thread. I have a list which has items in it which need to be downloaded from the internet. Let's say list is: list_items[] which has 100 items in it. I have a ...
    Ritesh Raj SarrafRitesh Raj Sarraf
    Jul 27, 2006 at 11:07 am
    Aug 6, 2006 at 2:26 pm
  • Hi All, Not being able to figure out how are partial classes coded in Python. Example: Suppose I have a code generator which generates part of a business class, where as the custome part is to be ...
    SanjaySanjay
    Jul 19, 2006 at 6:10 am
    Jul 20, 2006 at 8:42 am
  • For the purpose of finding someone's age I was looking for a way to find how the difference in years between two dates, so I could do something like: age = (date.today() - born).year but that didn't ...
    ThebjornThebjorn
    Jul 26, 2006 at 10:33 am
    Jul 29, 2006 at 7:57 am
  • http://www.oluyede.org/blog/2006/07/05/europython-day-2/ and the Py3.0 PEPs, I think the people working on Py3.0 are doing a good job, I am not expert enough (so I don't post this on the Py3.0 ...
    BearophileHUGSBearophileHUGS
    Jul 5, 2006 at 1:58 pm
    Jul 17, 2006 at 11:35 am
  • I want to learn python. I plan to buy a book. I always find printed material more convenient than reading on-line tutorials. I don't know PERL or any other scripting language. I only know some BASH ...
    IOANNIS MANOLOUDISIOANNIS MANOLOUDIS
    Jul 9, 2006 at 12:41 am
    Jul 12, 2006 at 5:10 pm
  • Hello, I am using some very large dictionaries with keys that are long strings (urls). For a large dictionary these keys start to take up a significant amount of memory. I do not need access to these ...
    KdotskyKdotsky
    Jul 12, 2006 at 3:56 pm
    Jul 13, 2006 at 1:52 pm
  • I'm developing a webIDE for python and I've 2 questions regarding it. 1. How can i disable some of the modules without deleting. e.g I wish to disable "os" module. 2. How can i force user code to ...
    IapainIapain
    Jul 10, 2006 at 8:23 pm
    Jul 12, 2006 at 7:20 am
  • Hey there. I was wondering whether Python had any support out-of-the-box for database functionality, or database-like functionality. For instance a lot of shared hosts have Python installed, but not ...
    Alex BiddleAlex Biddle
    Jul 3, 2006 at 12:41 pm
    Jul 6, 2006 at 1:31 am
  • Hello I'm thinking of using Python to build the prototype for a business web appplication. The development and test machine is XP, while ultimate deployment will be on a shared Unix web host. What ...
    Vincent DelporteVincent Delporte
    Jul 28, 2006 at 6:06 am
    Jul 29, 2006 at 10:46 pm
  • I would appreciate it if somebody could tell me where I went wrong in the following snipet: When I run I get no result cnt = 0 p=[] reader = csv.reader(file("f:\webserver\inp.txt"), dialect="excel", ...
    RomanRoman
    Jul 4, 2006 at 2:01 pm
    Jul 5, 2006 at 6:12 pm
  • I'm a net admin for about 20 unix servers, and I need to frequently telnet on to them and configure them. It is a tiring job to open a xterm and telnet, username, password to each server. Can I do it ...
    ValpaValpa
    Jul 2, 2006 at 4:31 am
    Jul 3, 2006 at 5:10 pm
  • Is it possible to have a static variable in Python - a local variable in a function that retains its value. For example, suppose I have: def set_bit (bit_index, bit_value): static bits = [0, 0, 0, 0, ...
    Michael YanowitzMichael Yanowitz
    Jul 31, 2006 at 7:21 pm
    Aug 8, 2006 at 6:00 am
  • I've got some strings to split. They are main words, but some words are inside a pair of brackets and should be considered as one unit. I prefer to use re.split, but haven't written a working one ...
    Qiangning HongQiangning Hong
    Jul 26, 2006 at 8:04 pm
    Jul 28, 2006 at 3:30 am
  • lo there, i have a simple app that connects to a socket to get info from a server i looks like this serverhost = 'xxx.xxx.xxx.xxx' serverport = 9520 aeris_sockobj = socket.socket(socket.AF_INET, ...
    NephishNephish
    Jul 16, 2006 at 7:55 pm
    Jul 20, 2006 at 9:36 am
  • I want to make a function that does the following. I will call it thefunc for short. '||Char ' I tried the following def thefunc(s): s = "||" + s + " " The problem is that if I look at the string ...
    GreenflameGreenflame
    Jul 10, 2006 at 3:49 am
    Jul 11, 2006 at 8:49 am
  • hi... update. i'm getting back html, and i'm getting strings like " foo &nbsp;" which is valid HTML as the '&nbsp;' is a space. i need a way of stripping/removing the '&nbsp;' from the string the ...
    BruceBruce
    Jul 4, 2006 at 1:27 am
    Jul 4, 2006 at 4:37 pm
  • does x.sort(cmp = lambda x,y : cmp(random.random(),0.5)) pick a random shuffle of x with uniform distribution ? Intuitively, assuming list.sort() does a minimal number of comparisons to achieve the ...
    Boris BorcicBoris Borcic
    Jul 21, 2006 at 11:11 am
    Jul 26, 2006 at 8:23 am
  • Is there a Python packaging that is specifically for embedded systems? ie, very small and configurable so the user gets to select what modules to install? For Linux-based embedded systems in ...
    JackJack
    Jul 14, 2006 at 5:19 pm
    Jul 17, 2006 at 8:33 pm
  • I thought I had 'got' globals but this one seems strange. I want my example function 'doIt' to use and optionally modify a module variable 'gname', so I declare 'global gname' in the function, but ...
    MeridianMeridian
    Jul 6, 2006 at 10:50 am
    Jul 9, 2006 at 12:13 pm
  • This has been bothering me for a while. Just want to find out if it just me or perhaps others have thought of this too: Why shouldn't the keyset of a dictionary be represented as a set instead of a ...
    VatamaneVatamane
    Jul 1, 2006 at 8:01 pm
    Jul 4, 2006 at 7:36 am
  • Hi list, Is there a more elagant way of doing this? # logflags is an array of logicals test=True for x in logflags: test = test and x print test -- Thanks,
    John HenryJohn Henry
    Jul 12, 2006 at 6:14 pm
    Aug 7, 2006 at 6:38 am
  • Hello, I have the need to write the equivalent of Python class methods in C++. Chuck Allison proposes the following (http://www.artima.com/cppsource/simple.html): #include <iostream using namespace ...
    AlainpointAlainpoint
    Jul 27, 2006 at 3:35 pm
    Jul 31, 2006 at 10:54 am
  • Hi all, I have been searching for a keyboard and mouse tracker on linux. I've read solutions (watch at sourceforge) which look at /proc/interrupts to check keyboard or mouse activity. I also read one ...
    DfaberDfaber
    Jul 17, 2006 at 7:12 pm
    Jul 24, 2006 at 12:34 am
  • Hey there, i have been learning python for the past few months, but i can seem to get what exactly a lamda is for. What would i use a lamda for that i could not or would not use a def for ? Is there ...
    NephishNephish
    Jul 18, 2006 at 12:22 am
    Jul 21, 2006 at 1:03 pm
  • Hi, Could anyone explain me how the python string "?" is mapped to the binary code "\xe9" in my python interpreter ? "?" is not present in the 7-bit ASCII table that is the default encoding, right ? ...
    Sébastien BoisgéraultSébastien Boisgérault
    Jul 13, 2006 at 10:26 am
    Jul 17, 2006 at 2:07 pm
  • I have this code: type1 = [0] type2 = [0] type3 = [0] map = {0:type1, 1:type1, 2:type3, 3:type1, 4:type2} # the real map is longer than this def increment(value): map[value][0] += 1 increment(1) ...
    Thomas NelsonThomas Nelson
    Jul 7, 2006 at 4:18 pm
    Jul 8, 2006 at 9:37 am
  • Basically I am trying to find a high performance web server. Since Python is installed on all of the servers, It'll be great if the web server is written in Python as well. Otherwise, I will have to ...
    JackJack
    Jul 6, 2006 at 4:36 pm
    Jul 8, 2006 at 6:16 am
  • Hi, I am trying to work out why I get UnboundLocalError when accessing an int from a function where the int is at the global scope, without explicitly declaring it as global but not when accessing a ...
    PaddyPaddy
    Jul 9, 2006 at 7:07 am
    Jul 27, 2006 at 6:00 am
  • I am using an optparse to get command line options, and then pass them to an instance of another class: # Class that uses optparse.OptionParser foo = Parse_Option() # Class that does the real work ...
    TT
    Jul 21, 2006 at 2:51 pm
    Jul 24, 2006 at 9:14 am
  • Hi all, In a framework I've written to test out website, I use something like the following to add functionality at various points: #----------------------------------- def do_work(callable, data): ...
    AntAnt
    Jul 11, 2006 at 1:45 pm
    Jul 11, 2006 at 8:15 pm
  • Hi, I have a text file called a.txt: # comments [('recId', 3), ('parse', {'pos': u'np', 'gen': u'm'})] [('recId', 5), ('parse', {'pos': u'np', 'gen': u'm'})] [('recId', 7 ), ('parse', {'pos': u'np', ...
    MansteyManstey
    Jul 6, 2006 at 10:34 am
    Jul 10, 2006 at 4:19 pm
  • Dearest mail manipulating macaques and perambulating python prestidigitators, I have been blessed by the grace of Google and so am working full-time on improving Mailman's web UI: ...
    EmfEmf
    Jul 4, 2006 at 7:44 pm
    Jul 7, 2006 at 4:02 am
  • Hello! I have got a Python "Device" Object which has got a attribute (list) called children which my contain several other "Device" objects. I implemented it this way in order to achieve a kind of ...
    Fabian SteinerFabian Steiner
    Jul 17, 2006 at 4:27 pm
    Jul 20, 2006 at 12:27 pm
Group Navigation
period‹ prev | Jul 2006 | next ›
Group Overview
grouppython-list @
categoriespython
discussions801
posts4,640
users945
websitepython.org

945 users for July 2006

Bruno Desthuilliers: 170 posts Fredrik Lundh: 125 posts Simon Forman: 115 posts John Machin: 105 posts Paul McGuire: 80 posts Steve Holden: 68 posts Antoon Pardon: 63 posts Vatamane: 62 posts Bruno Desthuilliers: 60 posts Gerhard Fiedler: 60 posts Marc 'BlackJack' Rintsch: 60 posts Diez B. Roggisch: 58 posts Bruce: 57 posts Grant Edwards: 45 posts Peter Otten: 42 posts John Salerno: 40 posts Alex Martelli: 38 posts BearophileHUGS: 37 posts Stefan Behnel: 37 posts Marshall: 36 posts
show more
Archives