FAQ

Search Discussions

693 discussions - 4,293 posts

  • I have a function return a reference, and want to assign to the reference, simply like this: return a b = 0 * f( b ) = 1* but the last line will be refused as "can't assign to function call". In my ...
    ScsoceScsoce
    Dec 29, 2008 at 6:01 am
    Mar 15, 2009 at 1:45 am
  • I have not worked with Python enough to really know. But, it seems to me that more I look at python 3.0, the more I wonder if it isn't a step backwards. To me, it seems that this: print "%s=%d" % ...
    WalterbyrdWalterbyrd
    Dec 19, 2008 at 4:01 pm
    Jan 14, 2009 at 1:44 am
  • Wolfram Research's Mathematica Version 7 has just been released. See: http://www.wolfram.com/products/mathematica/index.html Among it's marketing material, it has a section on how mathematica ...
    Xah LeeXah Lee
    Dec 1, 2008 at 3:30 am
    Jan 31, 2009 at 5:32 am
  • Consider the maverick who insists on class C: def me.method(arg): self.value = arg which should be equivalent to class C: def method(me, arg): me.value = arg What's the interpreter going to do with ...
    James StroudJames Stroud
    Dec 6, 2008 at 4:35 am
    Dec 15, 2008 at 8:38 am
  • A bottom line / pragmatic question... hopefully not a FAQ. Why was it necessary to make "as" a reserved keyword? And more to the point, why was it necessary to prevent developers from being able to ...
    Warren DeLanoWarren DeLano
    Dec 3, 2008 at 9:38 pm
    Dec 10, 2008 at 9:16 pm
  • Dear All, For the first time I have come across a Python feature that seems completely wrong. After the introduction of rich comparisons, equality comparison does not have to return a truth value, ...
    Rasmus FoghRasmus Fogh
    Dec 6, 2008 at 4:42 pm
    Jan 7, 2009 at 10:21 am
  • http://blog.kowalczyk.info/blog/2008/07/05/why-google-should-sponsor-a-faster-python-vm.html I fully agree with Krzysztof Kowalczyk . Can't they build a faster VM for Python since they love the ...
    Cm_guiCm_gui
    Dec 10, 2008 at 6:42 pm
    Dec 22, 2008 at 10:27 pm
  • I have read that python is the world's 3rd most popular language, and that python has surpassed perl in popularity, but I am not seeing it. - in unix/linux sysadmin, perl is far more popular than ...
    WalterbyrdWalterbyrd
    Dec 22, 2008 at 3:11 pm
    Dec 25, 2008 at 12:01 am
  • Just spent 3 hours looking into Ruby today. Here's my short impression for those interested. * Why Not Ruby? http://xahlee.org/UnixResource_dir/writ/why_not_Ruby.html plain text version follows: ...
    Xah LeeXah Lee
    Dec 31, 2008 at 5:55 pm
    Jan 6, 2009 at 11:41 pm
  • On behalf of the Python development team and the Python community, I am happy to announce the release of Python 3.0 final. Python 3.0 (a.k.a. "Python 3000" or "Py3k") represents a major milestone in ...
    Barry WarsawBarry Warsaw
    Dec 4, 2008 at 1:51 am
    Dec 6, 2008 at 10:43 pm
  • How can I make a "var" parm, where the called function can modify the value of the parameter in the caller? def f(x): x = x + 1 n = 1 f(n) # n should now be 2 Many TIA!! Mark -- Mark Harrison Pixar ...
    MhMh
    Dec 7, 2008 at 8:54 am
    Dec 13, 2008 at 8:33 pm
  • Hi! I would like to iterate over a sequence nad ignore all None objects. The most obvious way is explicitly checking if element is not None, but it takes too much space. And I would like to get ...
    Filip GruszczyńskiFilip Gruszczyński
    Dec 12, 2008 at 9:18 am
    Dec 19, 2008 at 11:42 am
  • I'm translating some code from another language (Lua) which has multiple function return values. So, In Lua, it's possible to define a function function f() return 1,2,3 end which returns 3 values. ...
    Paul MoorePaul Moore
    Dec 14, 2008 at 4:19 pm
    Dec 16, 2008 at 4:50 pm
  • Hi guys, i am really sorry for making offtopic, hope you will not kill me, but this is for me life important problem which needs to be solved within next 12 hours.. I have to create stable algorithm ...
    David HláčikDavid Hláčik
    Dec 13, 2008 at 6:23 pm
    Dec 22, 2008 at 5:40 pm
  • I am trying to write a simple application to factor polynomials. I wrote (simple) raw_input lines to collect the a, b, and c values from the user, but I dont know how to implement the quadratic ...
    Collin Day 0Collin Day 0
    Dec 18, 2008 at 7:37 pm
    Dec 19, 2008 at 8:28 pm
  • hello, I want to give a small beep, for windows there's message-beep, and there seems to be something like " curses" , but that package seems to be totally broken in P2.5 for windows. Any other ...
    Stef MientkiStef Mientki
    Dec 6, 2008 at 11:40 pm
    Dec 10, 2008 at 8:41 am
  • Hi, I have been looking for a Python module with math functions that would both eat and spit Decimals. The standard math module eats Decimals allright but spits floats... herefore exp(sin(Decimal())) ...
    Jerry Carl MiJerry Carl Mi
    Dec 28, 2008 at 12:02 am
    Jan 6, 2009 at 9:48 pm
  • ... shouldn't people who spend all their time trolling be doing something else: studying, working, writing patches which solve the problems they perceive to exist in the troll subject? Is there some ...
    SkipSkip
    Dec 22, 2008 at 5:53 pm
    Dec 29, 2008 at 3:22 pm
  • Now that Python 3 final has been released I thought it would be a good time to mention that there's a new book to go with it: "Programming in Python 3: A Complete Introduction to the Python Language" ...
    Mark SummerfieldMark Summerfield
    Dec 4, 2008 at 3:02 pm
    Dec 20, 2008 at 10:37 pm
  • Hello everyone, After reading http://www.python.org/dev/peps/pep-0371/ I was under impression that performance of multiprocessing package is similar to that of thread / threading. However, to ...
    MkMk
    Dec 29, 2008 at 2:52 pm
    Jan 9, 2009 at 11:19 pm
  • #!/usr/bin/python/ #Py3k, UTF-8 import random print(" --- WELCOME TO THE SUPER NUMBER GUESSING GAME --- " + ("\n" * 5)) pnum = int(input("1 OR 2 PLAYER?\nP#: ")) target = random.randint(1, 99) #Pick ...
    FebaFeba
    Dec 13, 2008 at 8:57 am
    Dec 17, 2008 at 10:46 am
  • Hello group, I'm having trouble reading a utf-16 encoded file with Python3.0. This is my (complete) code: #!/usr/bin/python3.0 class AddressBook(): def __init__(self, filename): f = open(filename, ...
    Johannes BauerJohannes Bauer
    Dec 5, 2008 at 2:25 pm
    Dec 7, 2008 at 10:20 pm
  • Reading some FAQ, I see that __str__ is "meant for human eyes". But it seems that: class X(object): def __str__(self): return "str" def __repr__(self): return "repr" x = X() d = {0 : x} print d {0: ...
    Neal BeckerNeal Becker
    Dec 18, 2008 at 2:09 pm
    Dec 19, 2008 at 5:20 am
  • #!/usr/bin/python #Py3k, UTF-8 bank = int(input("How much money is in your account?\n ")) target = int(input("How much money would you like to earn each year? \n ")) interest = 0 i = 0 while interest ...
    FebaenFebaen
    Dec 12, 2008 at 11:42 am
    Dec 13, 2008 at 1:21 am
  • I'm planning to start learning Python now, using Python 3000. I have no previous Python skills, but I now Perl pretty well. I'm also well experienced with JavaScript. Any pointers and tips how I ...
    Bertilo WennergrenBertilo Wennergren
    Dec 6, 2008 at 1:00 pm
    Dec 9, 2008 at 3:01 pm
  • x.validate_output(x.find_text(x.match_filename (x.determine_filename_pattern(datetime.datetime.now())))) Is it even good programming form?
    IpytestIpytest
    Dec 18, 2008 at 4:08 pm
    Jan 27, 2009 at 7:39 pm
  • I'm using this method to read from a socket: def read_data(self,size): """Read data from connection until a given size.""" res = "" fd = self.socket.fileno() while not self.stop_requested.isSet(): ...
    Laszlo NagyLaszlo Nagy
    Dec 30, 2008 at 1:42 pm
    Jan 3, 2009 at 9:25 pm
  • Hi Everyone, First I want to thank everyone that posts to this group. I read it daily and always learn something new even if I never feel like I have anything to contribute but my questions. When I ...
    RogerRoger
    Dec 28, 2008 at 5:19 pm
    Dec 30, 2008 at 9:12 pm
  • I am teaching myself Python by going through Allen Downing's "Think Python." I have come across what should be a simple exercise, but I am not getting the correct answer. Here's the exercise: Given: ...
    RossRoss
    Dec 30, 2008 at 1:00 am
    Dec 31, 2008 at 12:56 am
  • I'm trying to write an extension module in C which contains a single function with the following prototype: void func( int N, int * arg1, int * arg2, int * ret ); Here arg1 and arg2 are length N ...
    Daniel FetchinsonDaniel Fetchinson
    Dec 27, 2008 at 9:45 pm
    Dec 28, 2008 at 7:44 am
  • Hi everybody! A networking question! I've been looking at and tinkering a little with the various networking modules in python. The examples are pretty clear and a module such as the ...
    Emanuele D'ArrigoEmanuele D'Arrigo
    Dec 12, 2008 at 12:33 am
    Dec 16, 2008 at 4:25 pm
  • I need help ... I've been looking at this every evening for over a week now. I'd like to see my kids again! I have script that runs fine in the terminal but when I try to run it in a crontab for ...
    Astley Le JasperAstley Le Jasper
    Dec 2, 2008 at 2:35 pm
    Dec 5, 2008 at 4:27 am
  • Good day. I have installed Python 3 and i have a problem with the builtin read() function. [code] huge = open ( 'C:/HUGE_FILE.pcl', 'rb', 0 ) import io vContent = io.StringIO() vContent = huge.read() ...
    CroCro
    Dec 4, 2008 at 4:13 pm
    Dec 5, 2008 at 2:00 am
  • I don't find any sign(x) function in the math library (return the sign of the value). I've read that math module is a wrapper to C math lib and that C math lib has not sign(), so... I've implement my ...
    Pierre-Alain DorangePierre-Alain Dorange
    Dec 22, 2008 at 10:18 am
    Dec 24, 2008 at 3:57 pm
  • Is it a feature that 1 or 1/0 returns 1 and doesn't raise a ZeroDivisionError? If so, what's the rationale? -- Psss, psss, put it down! - http://www.cafepress.com/putitdown
    Daniel FetchinsonDaniel Fetchinson
    Dec 14, 2008 at 2:08 am
    Dec 15, 2008 at 4:07 pm
  • In my attempt to learn Python I'm writing a small (useless) program to help me understand the various concepts. I'm going to add to this as I learn to serve as a single place to see how something ...
    SimonhSimonh
    Dec 8, 2008 at 1:32 pm
    Dec 9, 2008 at 8:31 pm
  • Could anyone please point me to documentation on the way the msi installer handles multiple versions eg. Python 2.5, 2.6 and 3.0? What changes are made to the registry? Is there some way to specify a ...
    Colin J. WilliamsColin J. Williams
    Dec 2, 2008 at 12:49 am
    Dec 6, 2008 at 1:46 pm
  • I'm looking for suggestions on the best ('Pythonic') way to determine the difference between 2 very large dictionaries containing simple key/value pairs. By difference, I mean a list of keys that are ...
    PythonPython
    Dec 24, 2008 at 7:16 am
    Dec 25, 2008 at 1:48 am
  • For a language as well structured as Python, this seems somewhat sloppy, and inconsistant. Or is there some good reason for this? Here is what I mean: def a(): x = 99 print x def b(): print x a() b() ...
    WalterbyrdWalterbyrd
    Dec 17, 2008 at 3:19 pm
    Dec 18, 2008 at 1:15 am
  • Hi all, About a year ago, I posted an idea I was having about thread synchronization to the newsgroup. However, I did not explain it well, and I really erred on the side of brevity. (After some ...
    Aaron BradyAaron Brady
    Dec 29, 2008 at 6:06 pm
    Jan 1, 2009 at 10:17 pm
  • Hi all: I'm new to python and trying to save time and code by iterating through list initializations as well as the assignments. I have the following code: import random from rtcmix import * from ...
    Aaron SteppAaron Stepp
    Dec 22, 2008 at 10:22 pm
    Dec 23, 2008 at 9:38 pm
  • Hi all, Im parsing a 4.1GB apache log to have stats about how many times an ip request something from the server. The first design of the algorithm was for line in fileinput.input(sys.argv[1:]): ip = ...
    Federico MoreiraFederico Moreira
    Dec 16, 2008 at 3:07 pm
    Dec 20, 2008 at 6:14 pm
  • I've done a lot of googling for this topic and I fear that it's not possible. I have a widget that is overloaded with several bindings. I want to be able to unbind one method form the same Event ...
    RogerRoger
    Dec 18, 2008 at 4:24 pm
    Dec 19, 2008 at 3:14 pm
  • Hi, I'm going nuts over the csv.reader and UnicodeReader class. Somehow I can't get this method working which is supposed to read a csv file which name is inputted but here now hardcoded. What I need ...
    AkaAka
    Dec 16, 2008 at 4:26 pm
    Dec 18, 2008 at 3:03 pm
  • IMO: breaking backward compatibility is a big deal, and should only be done when it is seriously needed. Also, IMO, most of, if not all, of the changes being made in 3.0 are debatable, at best. I can ...
    WalterbyrdWalterbyrd
    Dec 7, 2008 at 7:22 pm
    Dec 11, 2008 at 6:41 pm
  • I've just installed 2.6, had been using 2.4. This was working for me: #! /usr/bin/env python import StringIO out = StringIO.StringIO() print out, 'hello' I used 2to3, and added import from future to ...
    Bill McClainBill McClain
    Dec 8, 2008 at 6:46 pm
    Dec 10, 2008 at 6:55 pm
  • Sorry for the long subject. I'm trying to create a subclass dictionary that runs extra init code on the first __getitem__ call. However, the performance of __getitem__ is quite important - so I'm ...
    Zac BurnsZac Burns
    Dec 3, 2008 at 12:58 am
    Dec 5, 2008 at 9:59 pm
  • is it possible to save a python object into a sqlite database as an atribute of type BLOB
    AzraelAzrael
    Dec 3, 2008 at 4:22 pm
    Dec 4, 2008 at 7:56 pm
  • Are there any Python libraries that can trash files (move to Trash, not delete) or for example return a list of applications that can open given file? I can't find anything related to this for ...
    RiklaunimRiklaunim
    Dec 31, 2008 at 5:08 pm
    Jan 10, 2009 at 11:07 pm
  • hey guys, i have a hug .csv file which i need to insert it into sqlite database using python. my csv data looks like this Birthday2,12/5/2008,HTC,this is my birthday Sea,12/3/2008,kodak,sea ...
    KliaKlia
    Dec 18, 2008 at 5:58 am
    Dec 19, 2008 at 2:08 pm
Group Navigation
period‹ prev | Dec 2008 | next ›
Group Overview
grouppython-list @
categoriespython
discussions693
posts4,293
users818
websitepython.org

818 users for December 2008

Steven D'Aprano: 134 posts Gagsl-Py2: 107 posts Aaron Brady: 95 posts R: 93 posts James Mills: 89 posts MRAB: 89 posts Chris Rebert: 79 posts John Machin: 72 posts Steve Holden: 70 posts Terry Reedy: 56 posts James Stroud: 51 posts Skip Montanaro: 47 posts Bruno Desthuilliers: 45 posts Arnaud Delobelle: 44 posts BearophileHUGS: 44 posts Martin v. Löwis: 43 posts Tobias Andersson: 42 posts Robert Kern: 39 posts Benjamin Kaplan: 38 posts Diez B. Roggisch: 38 posts
show more
Archives