Search Discussions

841 discussions - 4,786 posts

  • Hi, I'm learning STL and I wrote some simple code to compare the efficiency of python and STL. //C++ #include <iostream #include <string #include <vector #include <set #include <algorithm using ...
    Licheng FangLicheng Fang
    Aug 21, 2006 at 6:52 am
    Aug 27, 2006 at 10:15 am
  • Hello! Does anyone know how to find the name of a python data type. Conside a dictionary: Banana = {} Then, how do i ask python for a string representing the name of the above dictionary (i.e. ...
    Aug 18, 2006 at 6:34 pm
    Sep 9, 2006 at 6:06 am
  • hi can we hide a python code ? if i want to write a commercial software can i hide my source code from users access ? we can conver it to pyc but this file can decompiled ... so ...!! do you have any ...
    Aug 10, 2006 at 11:34 pm
    Aug 24, 2006 at 1:54 pm
  • Where are they-who-hate-us-for-our-whitespace? Are "they" really that stupid/petty? Are "they" really out there at all? "They" almost sound like a mythical caste of tasteless heathens that "we" have ...
    Aug 7, 2006 at 9:43 pm
    Aug 10, 2006 at 4:49 pm
  • First, I don't intend this to be a flame war, please. Python and Ruby are the only two languages I'd willingly work in (at least amongst common languages), and TurboGears and Rails seem roughly ...
    Kenneth M McdonaldKenneth M Mcdonald
    Aug 27, 2006 at 8:07 pm
    Sep 1, 2006 at 11:02 am
  • Hello Everyone, Now, I'm working on a new web framework. I tried many test on the other programming languages. Then i decided to use python on my web framework project. Now i want to listen all of ...
    Aug 20, 2006 at 6:58 pm
    Sep 2, 2006 at 11:22 pm
  • I was browsing the Voidspace blog item on "Flattening Lists", and followed up on the use of sum to do the flattening. A solution was: [1, 2, 3, 4, 5, 6] I would not have thought of using sum in this ...
    Aug 18, 2006 at 6:47 am
    Aug 25, 2006 at 10:08 pm
  • Ok, I know it's been asked a million times, but I have a more specific question so hopefully this won't be just the same old post. I've tried a few different editors, and I really like UltraEdit, but ...
    John SalernoJohn Salerno
    Aug 19, 2006 at 1:20 am
    Aug 23, 2006 at 9:56 pm
  • hi, there. i have a problem writing a program which can obtain ip addresses of machines running in the same local network. say, there are 4 machines present in the network; [a], [b], [c] and [d] and ...
    Aug 24, 2006 at 2:47 am
    Sep 1, 2006 at 6:17 am
  • I understand the difference, but I'm just curious if anyone has any strong feelings toward using one over the other? I was reading that a disadvantage to the more general usage (i.e. env) is that it ...
    John SalernoJohn Salerno
    Aug 8, 2006 at 7:08 pm
    Aug 10, 2006 at 5:20 am
  • I'm new at Python and I need a little advice. Part of the script I'm trying to write needs to be aware of all the files of a certain extension in the script's path and all sub-directories. Can ...
    Aug 8, 2006 at 7:58 pm
    Aug 9, 2006 at 2:16 am
  • Hi, I want to write a small system that is transaction based. I want to split the GUI front end data entry away from the file handling and record keeping. Now it seems almost trivially easy using the ...
    H J van RooyenH J van Rooyen
    Aug 2, 2006 at 4:31 pm
    Aug 7, 2006 at 7:28 am
  • Hi all. I've been try to learn ruby for a few months but I'm about ready to give up. The available books either assume a programming background, or are out of date. Anyway, I think python may suit me ...
    Aug 1, 2006 at 7:02 pm
    Aug 3, 2006 at 4:16 pm
  • Since I haven't used Python at work, I am using Python 2.5 right now. However I wonder, how fast are you guys moving from version to version at work? As an illustration my ex-company just moved to ...
    Aug 29, 2006 at 3:13 am
    Sep 5, 2006 at 5:10 pm
  • I would like to generate every unique combination of numbers 1-5 in a 5 digit number and follow each combo with a newline. So i'm looking at generating combinations such as: (12345) , (12235), ...
    Aug 13, 2006 at 6:01 pm
    Aug 15, 2006 at 10:50 am
  • hi - Im quite new to python, wondering if anyone can help me understand something about inheritance here. In this trivial example, how could I modify the voice method of 'dog' to call the base class ...
    Aug 29, 2006 at 2:33 pm
    Aug 30, 2006 at 11:17 pm
  • Would it be considered good form to begin every method or function with a bunch of asserts checking to see if the parameters are of the correct type (in addition to seeing if they meet other kinds of ...
    Aug 24, 2006 at 7:56 pm
    Aug 29, 2006 at 9:46 am
  • If have a list from 1 to 100, what's the easiest, most elegant way to print them out, so that there are only n elements per line. So if n=5, the printed list would look like: 1 2 3 4 5 6 7 8 9 10 11 ...
    Aug 15, 2006 at 11:51 pm
    Aug 21, 2006 at 2:42 pm
  • Sometimes it is known in advance, that the time spent in a loop will be in order of minutes or even hours, so it makes sense to optimize each element in the loop to make it run faster. One of ...
    Claudio GrondiClaudio Grondi
    Aug 27, 2006 at 9:59 am
    Aug 30, 2006 at 5:40 am
  • Hi, I get path strings from a DB like: \\serverName\C:\FolderName1\FolderName2\example.exe I am writing a script that can give me access to that exe file. But problem is that string is not universal ...
    Aug 16, 2006 at 2:15 pm
    Aug 17, 2006 at 2:30 pm
  • Are there any major differences between these two? It seems they can both be used with TurboGears, and SQLAlchemy with Django. I'm just wondering what everyone's preference is, and why, and if there ...
    John SalernoJohn Salerno
    Aug 31, 2006 at 6:42 pm
    Sep 6, 2006 at 11:47 am
  • Hi, I need to read a large amount of data into a list. So I am trying to see if I'll have any memory problem. When I do x=range(2700*2700*3) I got the following message: Traceback (most recent call ...
    Yi XingYi Xing
    Aug 14, 2006 at 6:32 pm
    Aug 15, 2006 at 11:02 pm
  • I'm starting out with this: try: if int(text) 0: return True else: self.error_message() return False except ValueError: self.error_message() return False I rewrote it as this: try: int(text) except ...
    John SalernoJohn Salerno
    Aug 9, 2006 at 6:51 pm
    Aug 11, 2006 at 2:48 pm
  • def foo(thing): if thing: return thing + 1 else: return -1 def foo(thing): if thing: return thing + 1 return -1 Obviously both do the same thing. The first is possibly clearer, while the second is ...
    Aug 28, 2006 at 9:41 pm
    Sep 1, 2006 at 2:40 am
  • hi, all when a email body consist with multipart/alternative, i must know when the boundary ends to parse it, but the email lib have not provide some function to indicate the boundary end, how to ...
    Aug 29, 2006 at 7:41 am
    Aug 31, 2006 at 3:42 am
  • The results seem okay. Python is a dynamic language, object attributes (and methods, etc) are kept inside a dict, where you can add and remove them when you like. So using a dict is faster. You can ...
    Aug 25, 2006 at 12:15 pm
    Aug 29, 2006 at 7:07 am
  • Hi All, What do you find the best IDE for creating web applications in Python is? Preferably FOS IDE. Cheers
    Aug 14, 2006 at 7:50 am
    Aug 28, 2006 at 10:35 pm
  • Hi,everyone: Have you any ideas? Say whatever you know about this. thanks.
    Aug 19, 2006 at 11:18 am
    Aug 20, 2006 at 11:15 pm
  • how can I find its name, such as: 'foo' I'm writing a trace() decorator for the sake of practice, and am trying to print the name of the class that a traced method belongs to. This seems like it ...
    Kirk StrauserKirk Strauser
    Aug 1, 2006 at 3:22 pm
    Aug 3, 2006 at 4:52 pm
  • In C and C++ and Java, the 'for' statement is a shortcut to make very concise loops. In python, 'for' iterates over elements in a sequence. Is there a way to do this in python that's more concise ...
    Aug 31, 2006 at 6:48 pm
    Sep 9, 2006 at 4:28 am
  • Last year, i've posted a tutorial and commentary about Python and Perl's sort function. (http://xahlee.org/perl-python/sort_list.html) In that article, i discussed a technique known among juvenile ...
    Aug 27, 2006 at 10:51 pm
    Sep 8, 2006 at 10:56 am
  • Hi! The question of type checking/enforcing has bothered me for a while, and since this newsgroup has a wealth of competence subscribed to it, I figured this would be a great way of learning from the ...
    Joel HedlundJoel Hedlund
    Aug 31, 2006 at 11:12 pm
    Sep 3, 2006 at 5:52 pm
  • Hello, I experimented something very strange, a few days ago. I was debugging an application at a customer's site, and the problem turned out to be that time.clock() was going "backwards", that is it ...
    Giovanni BajoGiovanni Bajo
    Aug 25, 2006 at 4:13 pm
    Aug 30, 2006 at 2:43 pm
  • def simplecsdtoorc(filename): file = open(filename,"r") alllines = file.read_until("</CsInstruments ") pattern1 = re.compile("</") orcfilename = filename[-3:] + "orc" for line in alllines: if not ...
    Aug 27, 2006 at 9:35 pm
    Sep 5, 2006 at 4:24 pm
  • Hello, I am using the Python DB API for access to MySQL. But it is not platform-independent - I need a module not included in Python by default - python-mysql, and it uses a compiled binary ...
    Aug 28, 2006 at 7:01 am
    Aug 31, 2006 at 4:38 am
  • Hello Pythoneers: I need to pass a list of named arguments to a function in a given order, and make sure these named arguments are retrieved using keys() in the same order they were given. Example: ...
    Aug 29, 2006 at 12:01 pm
    Aug 29, 2006 at 8:35 pm
  • Hi, there. 'lines' is a large list of strings each of which is seperated by '\t' I wanna split each string into a list. For speed, using map() instead of 'for' loop. 'map(str.split, lines)' works ...
    Aug 21, 2006 at 1:50 pm
    Aug 28, 2006 at 7:37 am
  • The following code is pretty much straight out of section of the Python/C reference manual: #include <Python.h int main(void) { PyObject *l, *x; Py_Initialize(); l = PyList_New(3); x = ...
    Bill PursellBill Pursell
    Aug 16, 2006 at 7:00 pm
    Aug 17, 2006 at 6:41 pm
  • Hi all. I just installed Ubuntu and I'm learning how to use the bash shell. Aside from the normal commands you can use, I was wondering if it's possible to use Python from the terminal instead of the ...
    John SalernoJohn Salerno
    Aug 8, 2006 at 1:03 am
    Aug 16, 2006 at 8:08 am
  • Here's my new project: I want to write a little script that I can type at the terminal like this: $ scriptname package1 [package2, ...] where scriptname is my module name and any subsequent arguments ...
    John SalernoJohn Salerno
    Aug 13, 2006 at 9:27 pm
    Aug 14, 2006 at 7:03 pm
  • I suggest a new extension of the list comprehension syntax: [x for x in xs while cond(x)] which would be equivalent to list(itertools.takewhile(cond, xs)) + Since Python favors list comprehensions ...
    Aug 6, 2006 at 3:48 pm
    Sep 26, 2013 at 2:50 pm
  • I'm trying to create a cvs.reader object using a custom dialect. The docs are a little terse, but I gather that I am supposed to subclass cvs.Dialect: class dialect(csv.Dialect): pass Now, the docs ...
    Aug 30, 2006 at 8:31 pm
    Aug 31, 2006 at 9:44 pm
  • Hi, Trying to open a file for writing that is already open for writing should result in an exception. It's all too easy to accidentally open a shelve for writing twice and this can lead to hard to ...
    Amir MichailAmir Michail
    Aug 27, 2006 at 7:44 am
    Aug 28, 2006 at 8:23 am
  • I'm so confused by the keyword "is" and "==" equal sign, it seems they could be exchanged in some contexts, but not in others, what's the difference between them in terms of comparation? thanks... ...
    Aug 15, 2006 at 6:58 am
    Aug 16, 2006 at 3:15 pm
  • lets say you want a generic numerical algorithom like sum Ruby def sum lst lst.inject(0){|total,current| total*current} end Java // i dont know if there is a numeric super class for numbers class ...
    Aug 25, 2006 at 7:05 pm
    Sep 1, 2006 at 3:56 pm
  • Hi folks, I have accomplished to make a python program that make some image manipulation to bmp files. I now want to provide this program as a web service. A user can visit a site and through a web ...
    Aug 26, 2006 at 11:07 am
    Aug 30, 2006 at 3:00 pm
  • I am trying to filter a column in a list of all html tags. To do that, I have setup the following statement. row[0] = re.sub(r'<.*? ', '', row[0]) The results I get are sporatic. Sometimes two tags ...
    Aug 25, 2006 at 3:59 am
    Aug 29, 2006 at 3:58 pm
  • hi I am trying to get a roll over effect on my canvas.(this is a virtual program which will eventually fit into my final program) Exactly i have a text on my screen and I want to have a brief ...
    Aug 26, 2006 at 3:50 pm
    Aug 28, 2006 at 2:57 pm
  • At http://www-03.ibm.com/developerworks/blogs/page/davidmertz David Mertz writes "Presumably with 2.7 (and later 2.x versions), there will be a means of warning developers of constructs that are ...
    Aug 15, 2006 at 8:16 pm
    Aug 24, 2006 at 8:56 am
  • hello can i write a eof to a file descriptor without closing it? like: fd.write(EOF) or something grts, ruben
    Aug 19, 2006 at 1:07 pm
    Aug 21, 2006 at 2:19 pm
Group Navigation
period‹ prev | Aug 2006 | next ›
Group Overview
grouppython-list @

990 users for August 2006

Fredrik Lundh: 169 posts Simon Forman: 142 posts John Machin: 140 posts John Salerno: 82 posts Gabriel Genellina: 73 posts Steve Holden: 58 posts H J van Rooyen: 56 posts Bruno Desthuilliers: 55 posts Skip Montanaro: 55 posts Gerhard Fiedler: 52 posts Diez B. Roggisch: 49 posts Tim Chase: 49 posts BearophileHUGS: 48 posts Marc 'BlackJack' Rintsch: 47 posts Duncan Booth: 44 posts Tony Nelson: 43 posts Alex Martelli: 40 posts David_wahler: 40 posts Larry Bates: 37 posts Georg Brandl: 33 posts
show more