FAQ

Search Discussions

455 discussions - 2,330 posts

  • how much is one half times one half?
    SuperpolloSuperpollo
    Apr 1, 2010 at 8:44 pm
    Apr 4, 2010 at 11:57 pm
  • At least a few times a day I wish python had the following shortcut syntax: vbl.=func(args) this would be equivalent to vbl = vbl.func(args) example: foo = "Hello world" foo.=split(" ") print foo # ...
    JabapythJabapyth
    Apr 30, 2010 at 4:04 pm
    May 3, 2010 at 5:15 pm
  • Hi, This is undoubtedly a newbie question. How doI assign variables multiline strings? If I try this i get what's cited below. Thanks. ddddd" Traceback (most recent call last): File "<interactive ...
    GoldtechGoldtech
    Apr 28, 2010 at 2:20 am
    May 2, 2010 at 6:28 pm
  • When coding C I have often found static local variables useful for doing once-only run-time initializations. For example: int foo(int x, int y, int z) { static int first_time = TRUE; static Mongo ...
    KjKj
    Apr 1, 2010 at 10:34 pm
    Apr 15, 2010 at 2:38 pm
  • Can someone make me un-crazy? I have a bit of code that right now, looks like this: status = getoutput('smartctl -l selftest /dev/sda').splitlines()[6] status = re.sub(' (?= ...
    JJ
    Apr 7, 2010 at 9:40 pm
    Apr 10, 2010 at 8:52 pm
  • Hi all, I've just spent a few hours debugging code similar to this: d = dict() for r in [1,2,3]: d[r] = [r for r in [4,5,6]] print d THe problem is that the "r" in d[r] somehow captures the value of ...
    Alain KetterlinAlain Ketterlin
    Apr 3, 2010 at 10:30 am
    Apr 19, 2010 at 9:05 am
  • [ Please keep me cc'ed, I'm not subscribed ] Hi all I've written a bunch of internal libraries for my company, and they all use two space indents, and I'd like to be more consistent and conform to ...
    Tom EvansTom Evans
    Apr 7, 2010 at 2:53 pm
    Apr 17, 2010 at 12:31 pm
  • I am considering writing a PEP for the inclusion of an engineering format specifier, and would appreciate input from others. Background (for those who don't already know about engineering notation): ...
    KeithKeith
    Apr 26, 2010 at 3:36 am
    May 17, 2010 at 6:09 pm
  • On behalf of the Python development team, I'm merry to announce the first beta release of Python 2.7. Python 2.7 is scheduled (by Guido and Python-dev) to be the last major version in the 2.x series. ...
    Benjamin PetersonBenjamin Peterson
    Apr 10, 2010 at 6:52 pm
    Apr 12, 2010 at 8:36 pm
  • Microsoft has just released Visual Studio 2010, along with its free (of charge) Express edition. Following a tradition, they are likely to withdraw support and availability for VS 2008 Express some ...
    Martin v. LoewisMartin v. Loewis
    Apr 12, 2010 at 8:36 pm
    Aug 29, 2013 at 10:07 am
  • Hello I'd like to make sure I understand what the options are to write web applications in Python: - ? la PHP, using Apache's mod_python - using eg. Lighttpd and configuring it to load the Python ...
    Gilles GanaultGilles Ganault
    Apr 12, 2010 at 9:57 am
    Apr 22, 2010 at 12:48 pm
  • Hi, During my Python (3.1) programming I often find myself having to repeat code such as... class1.attr1 = 1 class1.attr2 = 2 class1.attr3 = 3 class1.attr4 = 4 etc. Is there any way to achieve the ...
    Alan Harris-ReidAlan Harris-Reid
    Apr 20, 2010 at 1:43 pm
    Apr 22, 2010 at 1:09 am
  • pyjamas - the stand-alone python-to-javascript compiler, and separate GUI Widget Toolkit, has its 0.7 release, today. this has been much delayed, in order to allow the community plenty of time ...
    Luke Kenneth Casson LeightonLuke Kenneth Casson Leighton
    Apr 25, 2010 at 1:49 pm
    May 7, 2010 at 2:06 pm
  • Hi, I've been told, that following code snippet is not good. open("myfile","w").write(astring) , because I'm neither explicitely closing nor using the new 'with' syntax. What exactly is the impact of ...
    GelonidaGelonida
    Apr 13, 2010 at 10:01 pm
    Apr 27, 2010 at 10:06 am
  • Maybe I'm just lazy, but what is the fastest way to convert a string into a tuple containing character sequences and integer numbers, like this: 'si_pos_99_rep_1_0.ita' - ('si_pos_', 99, '_rep_', 1, ...
    Thomas HellerThomas Heller
    Apr 2, 2010 at 10:12 am
    Apr 4, 2010 at 3:03 pm
  • Hello! Could you please confirm whether my understanding of equality operations in sets and lists is correct? This is how I think things work, partially based on experimentation and the online ...
    Gustavo NareaGustavo Narea
    Apr 6, 2010 at 6:11 pm
    Apr 11, 2010 at 1:30 am
  • Hi, I'm on the hunt for a good quality commercially licensed graphing / plotting library and wondered if anyone here had any recomendations. The work to be done is less scientific, more ...
    AlienBabyAlienBaby
    Apr 6, 2010 at 2:53 pm
    Apr 8, 2010 at 8:33 pm
  • Hello. I have approx 83 million strings, all 14 characters long. I need to be able to take another string and find out whether this one is present within the 83 million strings. Now, I have tried ...
    Karin LagesenKarin Lagesen
    Apr 29, 2010 at 9:38 am
    May 6, 2010 at 4:26 pm
  • Hello, i want to parse this String: version 3.5.1 { $pid_dir = /opt/samba-3.5.1/var/locks/ $bin_dir = /opt/samba-3.5.1/bin/ service smbd { bin = ${bin_dir}smbd -D pid = ${pid_dir}smbd.pid } service ...
    Richard LambojRichard Lamboj
    Apr 7, 2010 at 8:37 am
    Apr 12, 2010 at 12:09 pm
  • Hello everyone, I am looking for ways to use a python file as a substitute for simple pen and paper calculations. At the moment I mainly use a combination of triple-quoted strings, exec and print ...
    Manuel GrauneManuel Graune
    Apr 6, 2010 at 6:40 pm
    Apr 10, 2010 at 2:06 pm
  • Hi,friends. I wanna ask if there is a function which is able to take a list as argument and then return its top-k maximums? I only know about max which is poorly a top-1 maximum function, now I want ...
    Jo ChanJo Chan
    Apr 22, 2010 at 1:57 pm
    Apr 24, 2010 at 12:40 am
  • i get : IOError: [Errno 9] Bad file descriptor when i have logging and using daemon.DaemonContext() i tried passing : fh = logging.handlers.TimedRotatingFileHandler(LOG_FILENAME, 'midnight', ...
    RebeloRebelo
    Apr 8, 2010 at 12:14 pm
    May 22, 2014 at 3:26 pm
  • I'm having a difficult time with this. I want to display a continuous range of hues using HTML hex representation (#RRGGBB). How would I go about scanning through the hues in order to make a rainbow? ...
    TobiahTobiah
    Apr 8, 2010 at 4:46 pm
    Apr 13, 2010 at 1:51 pm
  • I have the following acre meter which works for integers, how do i convert this to float? I tried return float ((208.0 * 208.0) * n) ... return lambda x: (208 * 208) * n ... 43264 43264 43264
    Monkeys pawMonkeys paw
    Apr 7, 2010 at 3:16 am
    Apr 15, 2010 at 3:55 pm
  • Suppose I have a function with the following signature: def spam(x, y, z): # etc. Is there a way to refer, within the function, to all its arguments as a single list? (I.e. I'm looking for Python's ...
    KjKj
    Apr 3, 2010 at 10:58 pm
    Apr 6, 2010 at 3:27 pm
  • Help! this is driving me crazy lol I want to print raw binary data to display an image file BUT python3 outputs b'<binary data ' instead of <binary data .... so the browser can't read the image!! f = ...
    DodoDodo
    Apr 28, 2010 at 9:54 pm
    May 21, 2010 at 9:23 am
  • Still learning python, especially OOP. While testing classes, I sometimes think of them as "ordinary containers" of values and functions (methods). That is, values and functions can be grouped ...
    VsolerVsoler
    Apr 10, 2010 at 2:26 pm
    Apr 25, 2010 at 12:15 am
  • * ratingrick: Perhaps Guido provides subtle guidance under some unrecognized nick? "He walks among you, and you don't recognize him" - Old jungle proverb Hm, interesting Google results for that ...
    Alf P. SteinbachAlf P. Steinbach
    Apr 4, 2010 at 4:14 pm
    Apr 6, 2010 at 10:03 pm
  • Hi I've just found out that one of objects is not destroyed when it should be. This means that something was holding reference to this object or part of it (i.e. method). Is there any way to check ...
    Michal MMichal M
    Apr 27, 2010 at 8:45 pm
    May 5, 2010 at 7:47 pm
  • Hi all, For testing purposes, and because I am not yet distributing my application (which, thanks to you all, is now running perfectly!), I am going to just bundle msvcr90.dll. However, I cannot find ...
    Alex HallAlex Hall
    Apr 14, 2010 at 3:07 am
    Apr 16, 2010 at 12:51 am
  • Hi, I have a few classes that manipulate documents. One is really a process that I use a class for just to bundle a bunch of functions together (and to keep my call signatures the same for each of my ...
    Tim ArnoldTim Arnold
    Apr 6, 2010 at 1:52 pm
    Apr 9, 2010 at 7:52 am
  • Hello all, I am new to python ans was wondering if there was a way to get the mac address from the local NIC? Thanks for your help. Gerad
    BooterBooter
    Apr 2, 2010 at 8:14 pm
    Apr 7, 2010 at 7:32 am
  • hi, Any idea how I can replace words in a html file? Meaning only the content will get replace while the html tags, javascript, & css are remain untouch. THanks, James
    James_027James_027
    Apr 28, 2010 at 1:02 pm
    Apr 30, 2010 at 9:27 am
  • Hi I'm hoping to avoid reinventing a wheel (or other rolling device). I've got a number of dependencies and, if possible, I want to order them so that each item has its dependencies met before it is ...
    Jonathan FineJonathan Fine
    Apr 24, 2010 at 8:53 pm
    Apr 25, 2010 at 5:00 pm
  • With the following code, I would expect a result of 5 !! 11 Is this a bug ? thanks, Stef An HTML attachment was scrubbed... URL: ...
    Stef MientkiStef Mientki
    Apr 21, 2010 at 8:51 am
    Apr 21, 2010 at 11:11 am
  • I just stumbled across the following page which seems to indicate that the MS VC 2008 runtime files[1] required to distribute Python applications compiled with Py2exe and similar tools can be shipped ...
    PythonPython
    Apr 14, 2010 at 8:11 pm
    Apr 18, 2010 at 6:57 am
  • I have a list... ['dir_0_error.dat', 'dir_120_error.dat', 'dir_30_error.dat', 'dir_330_error.dat'] I want to sort it based upon the numerical value only. Does someone have an elegant solution to ...
    Ben RacineBen Racine
    Apr 8, 2010 at 10:52 pm
    Apr 10, 2010 at 3:20 pm
  • I have an executable (I don't have access to the source code) that processes some data. I double click on the icon and a Command prompt window pops up. The program asks me for the input file, I hit ...
    McanjoMcanjo
    Apr 3, 2010 at 4:09 pm
    Apr 6, 2010 at 8:15 pm
  • Hi, I'm making first attempts to modify a few cells of an openoffice spreadsheet. I thought I'll start with ooolib as it seems rather simple. ( linux / open office 3.1 / ooolib-python-0.0.16 ) My ...
    News123News123
    Apr 29, 2010 at 12:16 am
    May 6, 2010 at 7:38 am
  • Is there any way to configure cElementTree to ignore the XML root namespace? Default cElementTree (Python 2.6.4) appears to add the XML root namespace URI to _every_ single tag. I know that I can ...
    DmtrDmtr
    Apr 28, 2010 at 1:42 am
    May 2, 2010 at 3:06 am
  • I want to store a reference to a function into a class property. So I am expecting that: class A: fn = lambda x: x fn = A.fn fn(1) Traceback (most recent call last): File "<string ", line 1, in ...
    GZGZ
    Apr 27, 2010 at 11:36 pm
    Apr 28, 2010 at 8:08 am
  • I wanted to do something like this: while True: try: def fun(a, b=b, c=c): pass except NameError as ne: name = get_the_var_name(ne) locals()[name] = '' else: break What's be best way to implement the ...
    Yingjie LanYingjie Lan
    Apr 24, 2010 at 11:19 am
    Apr 25, 2010 at 6:34 am
  • Is there a usable street address parser available? There are some bad ones out there, but nothing good that I've found other than commercial products with large databases. I don't need 100% accuracy, ...
    John NagleJohn Nagle
    Apr 17, 2010 at 7:23 pm
    Apr 21, 2010 at 7:47 pm
  • Hello! Is it assured the following statement is always True? If it is always True, in which version, python2.x or python3.x? ... -- ? Menghan Zheng
    Menghan ZhengMenghan Zheng
    Apr 20, 2010 at 3:03 am
    Apr 21, 2010 at 4:37 am
  • Hi all, I'm trying to find a good way of doing the following: Each n-tuple in combinations( range( 2 ** m ), n ) has a corresponding value n-tuple (call them "scores" for clarity later). I'm ...
    David jensenDavid jensen
    Apr 9, 2010 at 3:03 pm
    Apr 16, 2010 at 1:14 pm
  • Sorry this is a forward (long story involving a braille notetaker's bad copy/paste and GMail's annoying mobile site). Basically, I am getting errors when I run the project at ...
    Alex HallAlex Hall
    Apr 6, 2010 at 5:25 pm
    Apr 9, 2010 at 6:27 pm
  • I'm writing this as a complete newbie (on the issue), so don't be surprised if it's the stupidest idea ever. I was wondering if there was ever a discusision in the python community on a 'raise-yield' ...
    Дамјан ГеоргиевскиДамјан Георгиевски
    Apr 15, 2010 at 1:34 pm
    Jul 6, 2010 at 9:45 pm
  • Hello, is there any way to get the name from the actual called function, so that the function knows its own name? Kind Regards, Richi
    Richard LambojRichard Lamboj
    Apr 28, 2010 at 6:44 pm
    Apr 29, 2010 at 7:37 am
  • Hi all, I'm working on Python bindings for the Amazon Product Advertising API (http://pypi.python.org/pypi/python-amazon-product-api/) which supports the different localised versions - among them a ...
    SebastianSebastian
    Apr 20, 2010 at 4:47 pm
    Apr 22, 2010 at 6:27 am
  • Hello. I read a string from an utf-8 file: fichierLaTeX = codecs.open(sys.argv[1], "r", "utf-8") s = fichierLaTeX.read() fichierLaTeX.close() I can then print the string without error with 'print s'. ...
    FabFab
    Apr 21, 2010 at 8:09 am
    Apr 21, 2010 at 5:00 pm
Group Navigation
period‹ prev | Apr 2010 | next ›
Group Overview
grouppython-list @
categoriespython
discussions455
posts2,330
users526
websitepython.org

526 users for April 2010

Chris Rebert: 84 posts Patrick Maupin: 81 posts Lie Ryan: 65 posts Steven D'Aprano: 65 posts Peter Otten: 50 posts Alf P. Steinbach: 43 posts Stefan Behnel: 42 posts Gabriel Genellina: 39 posts Terry Reedy: 38 posts MRAB: 37 posts Robert Kern: 28 posts Walter Brameld IV: 26 posts Xavier Ho: 26 posts Grant Edwards: 23 posts Tim Chase: 23 posts Bruno Desthuilliers: 22 posts Steven D'Aprano: 22 posts Alex Hall: 21 posts John Nagle: 21 posts Steve Holden: 21 posts
show more
Archives