Search Discussions

375 discussions - 2,108 posts

  • that is a lie. Compilation only makes sure that values provided at compilation-time are of the right datatype. What happens though is that in the real world, pretty much all computation depends on ...
    Sep 27, 2010 at 5:46 pm
    Oct 29, 2010 at 9:02 am
  • I need to create a simple utility to remove characters from either the right or left side of directories. This works, but there has to be a better way. I tried to use a variable inside the brackets ...
    Sep 16, 2010 at 7:35 pm
    Sep 27, 2010 at 11:07 am
  • Hi all, I'm studying PyGTK tutorial and i've found this strange form: button = gtk.Button(("False,", "True,")[fill==True]) the label of button is True if fill==True, is False otherwise. i have ...
    Sep 29, 2010 at 10:42 am
    Oct 13, 2010 at 5:25 pm
  • Hi, I noticed that in python3k, multiplying a sequence by a negative integer is the same as multiplying it by 0, and the result is an empty sequence. It seems to me that there is a more meaningful ...
    Yingjie LanYingjie Lan
    Sep 25, 2010 at 8:22 am
    Oct 6, 2010 at 1:28 pm
  • Hello list, I've been working with Python now for about a year using it primarily for scripting in the Puredata graphical programming environment. I'm working on a project where I have been given a ...
    Patrick mcnameekingPatrick mcnameeking
    Sep 1, 2010 at 11:35 pm
    Sep 23, 2010 at 1:37 am
  • Hi, I was comparing the speed of a simple loop program between Matlab and Python. My Codes: $ cat addition.py imax = 1000000000 a = 0 for i in xrange(imax): a = a + 10 print a $ cat addition.m imax = ...
    Michael KreimMichael Kreim
    Sep 2, 2010 at 10:02 am
    Sep 10, 2010 at 1:06 am
  • here's a interesting toy list processing problem. I have a list of lists, where each sublist is labelled by a number. I need to collect together the contents of all sublists sharing the same label. ...
    Xah LeeXah Lee
    Sep 26, 2010 at 4:05 am
    Feb 6, 2013 at 11:37 pm
  • level: beginner how can i access the contents of a text file in Python? i would like to compare a string (word) with the content of a text file (word_list). i want to see if word is in word_list. ...
    Sep 5, 2010 at 9:47 pm
    Sep 16, 2010 at 10:36 am
  • Pythonistas: The "Samurai Principle" says to return victorious, or not at all. This is why django.db wisely throws an exception, instead of simply returning None, if it encounters a "record not ...
    Sep 7, 2010 at 3:48 am
    Sep 12, 2010 at 7:55 am
  • Hi all, I've just seen this: http://sheddingbikes.com/posts/1285063820.html Whatever you think of Zed Shaw (author of the Mongrel Ruby server and relatively recent Python convert), he has a very good ...
    Sep 21, 2010 at 12:29 pm
    Sep 26, 2010 at 6:44 am
  • Hi, I have some trouble with Python on Snow Leopard (10.6.3). I compile Python as a framework(for 32/64bit) without any problems. But implementing the lib in my C app, I get the following error on ...
    Sep 16, 2010 at 3:34 pm
    Sep 20, 2010 at 6:30 am
  • Hi, I would like to send code from Vim [1] to R [2] on Microsoft Windows. Vim needs python 2.7 but the pre-compiled SendKeys module [3] is only avaiable for python 2.6. How can I make SendKeys work ...
    Jakson A. AquinoJakson A. Aquino
    Sep 9, 2010 at 10:07 am
    Sep 17, 2010 at 11:04 pm
  • Hello Folks. It doesn't seem to be common knowledge when and how a[x] gets translated to a[x+len(x)]. So, here's a short info post on how Python supports negative indices for sequences. I've put the ...
    Raymond HettingerRaymond Hettinger
    Sep 10, 2010 at 1:37 am
    Sep 13, 2010 at 8:07 pm
  • I have a list of tuples that indicate a relationship, ie a is related to b, b is related to c etc etc. What I want to do is cluster these relationships into groups. An item will only be associated ...
    Astley Le JasperAstley Le Jasper
    Sep 20, 2010 at 9:42 pm
    Sep 22, 2010 at 5:06 pm
  • Hi There, I get a socket error "[Errno 98] Address already in use" when i try to open a socket that got closed before with close(). How come close() doesn't close the socket properly? My socket code ...
    Sep 15, 2010 at 6:32 pm
    Sep 21, 2010 at 12:02 pm
  • Hi All, I am new to programming and python, Being a system administrator I have chose Inventory (Software & Hardware ) as my first project. I would like to know experts advice on the best way to ...
    Sep 13, 2010 at 12:45 pm
    Sep 18, 2010 at 5:03 am
  • I've seen Python programs that can be activated from the command line. For example: hg This displays a list of commands for the Mercurial revision control system. But another command is this: hg ...
    Aug dawgAug dawg
    Sep 6, 2010 at 3:48 pm
    Sep 13, 2010 at 3:18 pm
  • I have found it for windows and mac, but no luck under linux. Any idea? Thanks -- Hugo L?veill? hugol at fastmail.net
    Hugo LéveilléHugo Léveillé
    Sep 29, 2010 at 11:27 am
    Sep 30, 2010 at 10:58 am
  • Hi How can I make the visibility of a variable across many methods or files? To avoid repeating the same line eg url = os.environ['HTTP_HOST'] if os.environ.get('HTTP_HOST') else ...
    Sep 18, 2010 at 3:25 pm
    Sep 25, 2010 at 10:51 pm
  • I know that I can index into a list of lists like this: a=[[1,2,3],[4,5,6],[7,8,9]] a[0][2]=3 a[2][0]=7 but when I try to use fancy indexing to select the first item in each list I get: ...
    Sep 8, 2010 at 6:55 pm
    Sep 9, 2010 at 4:33 pm
  • Hi All, I'm curious as to why, with a file called "Foo.txt" os.path.normcase('FoO.txt') will return "foo.txt" rather than "Foo.txt"? Yes, I know the behaviour is documented, but I'm wondering if ...
    Chris WithersChris Withers
    Sep 15, 2010 at 1:49 pm
    Sep 24, 2010 at 11:00 pm
  • I write some Python code almost every day, but lately I am using a lot the D language too. After using D for about three years I now know some of it, but when I need to write short (< about 1000 ...
    Sep 11, 2010 at 2:33 pm
    Sep 13, 2010 at 3:05 pm
  • File "<stdin ", line 1 [((s += t) and s) for t in range(1, 10)] ^ SyntaxError: invalid syntax What's the best way to get a list of partial sums? TIA! kj
    Sep 28, 2010 at 10:57 pm
    Sep 30, 2010 at 5:34 am
  • Has anyone written code or worked with Python software for downloading financial time series data (e.g. from Yahoo financial)? If yes, would you please contact me. --Thanks, V. Stokes
    Virgil StokesVirgil Stokes
    Sep 2, 2010 at 5:12 pm
    Sep 4, 2010 at 9:17 am
  • Hi query level: beginner as part of a learning exercise i have written code that: a) asks for a single letter input (assumption: only 1 letter wil be entered) b) adds that letter to list1 and then ...
    Sep 21, 2010 at 10:39 pm
    Sep 24, 2010 at 1:14 pm
  • i've got a python.txt that contain python and it must stay as it (python.txt) how can i include it in my program ? import python.txt doesn't work is there a way : a) to make an include("python.txt") ...
    Bussiere bussiereBussiere bussiere
    Sep 5, 2010 at 10:57 pm
    Sep 10, 2010 at 2:50 pm
  • level: beginner word= 'even' dict2 = {'i': 1, 'n': 1, 'e': 1, 'l': 2, 'v': 2} i want to know if word is entirely composed of letters in dict2 my approach: step 1 : convert word to dictionary(dict1) ...
    Sep 7, 2010 at 7:46 pm
    Sep 8, 2010 at 5:09 am
  • I have a list like ['1.1881', '1.1881', '1.1881', '1.1881', '1.1881', '1.1881', '1.1881', '1.1881', '1.1881', '1.1881', '1.7689', '1.7689', '3.4225', '7.7284', '10.24', '9.0601', '9.0601', '9.0601', ...
    Sep 7, 2010 at 12:37 am
    Sep 7, 2010 at 2:52 pm
  • Is there a plan to adopt PyPy and RPython under the python foundation in attempt to standardize both. I have been watching PyPy and RPython evolve over the years. PyPy seems to have momentum and is ...
    Sep 1, 2010 at 5:49 pm
    Sep 3, 2010 at 9:07 am
  • 2010-09-27 How about this: LC(func, inputList, P) compared to [func for myVar in inputList if P] the functional form is: ? shorter ? not another idiysyncratic new syntax -------------------- now, a ...
    Xah LeeXah Lee
    Sep 27, 2010 at 7:06 pm
    Sep 30, 2010 at 3:48 am
  • In python 3.1.2(I'm using windows edition, 32bit), accessing __class__ of an int literal will raise a SyntaxException, while other literals will not. For example. 1.__class__ is an error, while ...
    Sep 28, 2010 at 9:27 am
    Sep 30, 2010 at 1:21 am
  • I was trying to use Pypdf following a recipe from the Activestate cookbooks. However I cannot get it too work. Unsure if it is me or it is beacuse sets are deprecated. I have placed a pdf in my C:\ ...
    Sep 26, 2010 at 11:10 pm
    Sep 27, 2010 at 2:19 pm
  • Hi All, I am attempting to create a Windows Service in Python. I have the framework (from Mark Hammond and Andy Robinason's book) running - see below. It starts fine - but it will not stop. :( net ...
    Ian HobsonIan Hobson
    Sep 2, 2010 at 3:22 pm
    Sep 24, 2010 at 4:56 am
  • Hi There, I'm calling a python script from a php script which again calls a perl script with subprocess.popen(). This seems to work fine so far only that once the python script completed it is ...
    Sep 9, 2010 at 9:45 pm
    Sep 10, 2010 at 8:36 pm
  • Hi list, I'm looking for a possibility to access the partiton inforamtion of a hard disk of my computer from within a python program. Googling I found the module 'parted' but didn't see any ...
    Hellmut WeberHellmut Weber
    Sep 21, 2010 at 10:31 pm
    Oct 5, 2010 at 2:11 am
  • Hi everybody. I've played for few hours with encoding in py, but it's still somewhat confusing to me. So I've written a test file (encoded as utf-8). I've put everything I think is true in comment at ...
    Goran NovoselGoran Novosel
    Sep 19, 2010 at 7:43 pm
    Sep 20, 2010 at 8:19 pm
  • # bigdigits2.py import sys zero=["***", "* *", "***"] one=["***", " * ", "***"] digits=[zero,one,zero,one,zero,one,zero,one,zero,one] inputted_digit=sys.argv[1] column_max=len(inputted_digit) ...
    Sep 19, 2010 at 2:23 am
    Sep 20, 2010 at 8:52 am
  • Hello, I'm used to write in Python something like and then have a dictionary like and get the formatted output like this: Occasionally I want to extract the field names from the template string. I ...
    Andre Alexander BellAndre Alexander Bell
    Sep 14, 2010 at 4:59 pm
    Sep 15, 2010 at 10:35 am
  • Hi, I'm trying to rewrite a c program in python & encountered several problems. I have some data structures in my c program like below: typedef struct { unsigned short size; unsigned short ...
    Kwan Lai ChengKwan Lai Cheng
    Sep 7, 2010 at 4:06 am
    Sep 15, 2010 at 5:31 am
  • I have a list of tuples l = [(('s','a'),(5,9)), (('u','w'),(9,2)), (('y','x'),(3,0))] some functions using this list and fetch data using index l[0][1], l[1] [1] I need to change position of each ...
    Sep 6, 2010 at 2:54 pm
    Sep 8, 2010 at 6:39 am
  • Hi girls & guys, Just joined the group. I'm new to Python but been picking it up pretty easy. I love it! I'm hoping to use it to make a controlling application for an experiment. Basically I want to ...
    Jack KeeganJack Keegan
    Sep 4, 2010 at 1:36 pm
    Sep 4, 2010 at 7:45 pm
  • Given: a large list (10,000,000) of floating point numbers; Task: fastest python code that finds k (small, e.g. 10) smallest items, preferably with item indexes; Limitations: in python, using only ...
    Dmitry ChichkovDmitry Chichkov
    Sep 2, 2010 at 1:08 am
    Sep 2, 2010 at 11:21 pm
  • This is a recurrent situation: I want to initialize a whole bunch of local variables in a uniform way, but after initialization, I need to do different things with the various variables. What I end ...
    Sep 30, 2010 at 5:07 pm
    Oct 5, 2010 at 1:40 am
  • I'm having a weird problem with the 'External Tools' plugin for gedit, that seems to get weirder the more I dig into it. When I start gedit by clicking a launcher (from the Ubuntu menu, panel or ...
    Joel HedlundJoel Hedlund
    Sep 30, 2010 at 10:17 am
    Oct 1, 2010 at 8:03 am
  • Hello list, i had seriously troubles with the connection between a form and the wsgi, i' ve made an application on Python3 and was running perfectly but when i try to use the <form to pass the data ...
    Sep 30, 2010 at 3:33 pm
    Oct 1, 2010 at 4:33 am
  • Hi all, Have been grappling with a list problem for hours... a = [2, 3, 4, 5,.....] b = [4, 8, 2, 6,.....] Basicly I am trying to place a[0], b[0] in a seperate list IF a[2] and b[2] is present. I ...
    Sep 28, 2010 at 6:44 pm
    Sep 30, 2010 at 12:42 am
  • Hi I have succesfully created daemon with python script and as next step I am trying to give input to that python script daemon from Apache Logs....here I have got stuck and I have even checked IRC ...
    Vineet danielVineet daniel
    Sep 21, 2010 at 12:49 pm
    Sep 26, 2010 at 6:50 pm
  • Thanks for the link, unfortunately I am already familiar with the page. What I need help with is the first sentence of the note at the bottom: Each entry consists of the record number, duplicate byte ...
    Ethan FurmanEthan Furman
    Sep 18, 2010 at 4:16 pm
    Sep 19, 2010 at 6:45 pm
  • OK, this is a very stupid question about a very simple topic, but Google is failing me this morning... I'm trying to print a string that looks like this: Reported memory amounts are within 10% ...
    Sep 16, 2010 at 3:25 pm
    Sep 17, 2010 at 11:23 am
  • Hi Folks, For a quick testing purpose, I deliver .pyc files to my customer. I don't want the black DOS console appearing behind my GUI, but I have no idea how to do it. Somebody can help? Thanks! ...
    Muddy CoderMuddy Coder
    Sep 11, 2010 at 3:28 am
    Sep 13, 2010 at 10:13 am
Group Navigation
period‹ prev | Sep 2010 | next ›
Group Overview
grouppython-list @

523 users for September 2010

Lawrence D'Oliveiro: 79 posts MRAB: 58 posts Steven D'Aprano: 57 posts Seebs: 56 posts Peter Otten: 51 posts Terry Reedy: 41 posts Thomas Jollans: 40 posts Paul Rubin: 38 posts John Nagle: 32 posts Baba: 30 posts John Bokma: 28 posts Diez B. Roggisch: 27 posts Nobody: 27 posts Aahz: 25 posts Ben Finney: 24 posts Steven D'Aprano: 24 posts Stefan Behnel: 23 posts Bruno Desthuilliers: 21 posts Chris Rebert: 20 posts James Mills: 19 posts
show more