Search Discussions

329 discussions - 1,903 posts

    Rakesh kumarRakesh kumar
    Jun 1, 2011 at 7:31 am
    Jun 9, 2011 at 2:32 am
  • (a lil weekend distraction from comp lang!) in recent years, there came this Colemak layout. The guy who created it, Colemak, has a site, and aggressively market his layout. It's in linuxes distro by ...
    Xah LeeXah Lee
    Jun 11, 2011 at 7:50 am
    Jun 19, 2011 at 7:19 pm
  • When you want to stop execution of a statement body early, for flow control, there is a variety ways you can go, depending on the context. Loops have break and continue. Functions have return. ...
    Eric SnowEric Snow
    Jun 14, 2011 at 10:28 pm
    Jun 21, 2011 at 12:06 pm
  • Sometimes when using class inheritance, I want the overriding methods of the subclass to get the docstring of the matching method in the base class. You can do this with decorators (after the class ...
    Eric SnowEric Snow
    Jun 9, 2011 at 6:22 am
    Jun 13, 2011 at 6:49 pm
  • I'm working on the Project Euler exercises and I'm stumped on problem 3: "What is the largest prime factor of the number 600851475143 ?" Now, I've actually written functions to get a list of the ...
    John SalernoJohn Salerno
    Jun 21, 2011 at 7:48 pm
    Jun 23, 2011 at 9:52 am
  • Hi, I am looking for an easy way to do significant figure calculations in python (which I want to use with a class that does unit calculations). Significant figure calculations should have the ...
    Jun 24, 2011 at 8:05 pm
    Jun 28, 2011 at 9:01 pm
  • I am working on some medical image data, and I try to look into specific slice of 3d *.raw image. I know voxels are 16 bit int, and dimensions are 352*470*96. I checked it in some pro medical image ...
    Jun 13, 2011 at 6:18 pm
    Jun 15, 2011 at 2:13 am
  • A python web process is producing files that are given randomized names of the form hhhhhh-YYYYMMDDhhmmss-rrrrrrrr.pdf where rrr.. is a 128bit random number (encoded as base62). The intent of the ...
    Robin BeckerRobin Becker
    Jun 7, 2011 at 10:18 am
    Jun 8, 2011 at 11:30 am
  • hi, cat test.py #!/usr/bin/env python #-*- coding: utf-8 -*- u = u'mo?ambique' print u.encode("utf-8") print u chmod +x test.py ./test.py mo?ambique mo?ambique ./test.py output.txt Traceback (most ...
    Sérgio Monteiro BastoSérgio Monteiro Basto
    Jun 9, 2011 at 2:18 am
    Jun 13, 2011 at 2:49 pm
  • Is there a way to declare a project-wide variable and use that in all downstream modules? -- Gnarlir
    Jun 23, 2011 at 1:41 pm
    Jun 24, 2011 at 9:19 pm
  • AFAICT, the python iterator concept only supports readable iterators, not write. Is this true? for example: for e in sequence: do something that reads e e = blah # will do nothing I believe this is ...
    Neal BeckerNeal Becker
    Jun 22, 2011 at 7:28 pm
    Jun 24, 2011 at 2:09 am
  • With Python 2.7 : "foo" What is this curious syntax on line 2 ? Where is it documented ?
    Jun 19, 2011 at 1:41 pm
    Jun 21, 2011 at 11:02 pm
  • x=y="some string" And we know that python interprets from left to right. so why it doesnt raise a name error here saying name 'y' is not defined? another example: (1,2) + 3, here, python raises a ...
    Chetan HarjaniChetan Harjani
    Jun 24, 2011 at 4:32 am
    Jun 25, 2011 at 6:44 pm
  • Let's say I'm writing a game (really I'm just practicing OOP) and I want to create a "Character" base class, which more specific classes will subclass, such as Warrior, Wizard, etc. Which of the ...
    John SalernoJohn Salerno
    Jun 18, 2011 at 4:17 am
    Jun 20, 2011 at 6:31 pm
  • similar_headers = 0 different_headers = 0 source_headers = sorted(source_mapping.headers) target_headers = sorted(target_mapping.headers) # Check if the headers between the two mappings are the same ...
    Zachary DziuraZachary Dziura
    Jun 13, 2011 at 2:58 pm
    Jun 13, 2011 at 9:33 pm
  • Exceptions are great, but... Sometimes when calling a function, you want to catch some or even all the various exceptions it could raise. What exceptions *are* those? It can be pretty obvious. For ...
    Chris TorekChris Torek
    Jun 21, 2011 at 1:43 am
    Jun 27, 2011 at 6:52 pm
  • How to declare a constant in python 3?
    Jun 22, 2011 at 6:54 pm
    Jun 25, 2011 at 11:24 am
  • In my continuing quest for Python Mastery (and because I felt like it ;) I decided to code a Path object so I could dispense with all the os.path.join and os.path.split and os.path.splitext, etc., ...
    Ethan FurmanEthan Furman
    Jun 16, 2011 at 2:00 am
    Jun 17, 2011 at 4:24 am
  • I started an open source file organizer called Miranda. Miranda is inspired by Belvedere written by Adam Pash of Lifehacker (http:// lifehacker.com/341950/belvedere-automates-your-self+cleaning-pc). ...
    Zainul franciscusZainul franciscus
    Jun 14, 2011 at 3:55 am
    Jun 15, 2011 at 10:27 pm
  • I was surfing around looking for a way to split a list into equal sections. I came upon this algorithm: ['Hal', 'lo ', 'Wel', 't'] ...
    Jun 4, 2011 at 5:46 pm
    Jun 7, 2011 at 2:08 am
  • Hi, I'm trying to put together a lot of pieces of source code in matlab, java, perl and python. Im an expert when it comes to matlab, but novice in all the others listed above. However, I have ...
    Adam ChapmanAdam Chapman
    Jun 21, 2011 at 5:45 pm
    Jun 22, 2011 at 6:50 pm
  • Hi All, Please let me know which one is GOOD whether Python 2.6 OR 3.2. Please let me know the difference between them. Please give some refernce site or books to know the difference
    Jun 9, 2011 at 5:18 pm
    Jun 13, 2011 at 11:17 pm
  • I am new to Python and Django, was going through the concept of decorators where I came across a special case of using arguments with decorators Below is the code for memoization where I was looking ...
    Jigar TannaJigar Tanna
    Jun 28, 2011 at 4:52 pm
    Jul 1, 2011 at 3:18 pm
  • Hello Folks, I am wondering what your strategies are for ensuring that data transmitted to a website via a python program is indeed from that program, and not from someone submitting POST data using ...
    Jun 18, 2011 at 11:34 am
    Jun 19, 2011 at 12:18 pm
  • I have a script that processes command line arguments def main(argv=None): syslog.syslog("Sparkler stared processing") if argv is None: argv = sys.argv if len(argv) != 2: syslog.syslog(usage()) else: ...
    Mark PhillipsMark Phillips
    Jun 10, 2011 at 5:21 pm
    Jun 10, 2011 at 10:03 pm
  • Hello All, I want to print some integers in a zero padded fashion, eg. : Testing 0001 but the padding needs to be dynamic eg. sometimes %05i, %02i or some other padding amount. But I can't insert a ...
    Friedrich ClausenFriedrich Clausen
    Jun 7, 2011 at 9:36 pm
    Jun 8, 2011 at 7:00 am
  • Hi All, I need to call a function for evry 10 secs how can i achieve this in python
    Jun 29, 2011 at 5:39 pm
    Jul 2, 2011 at 7:49 am
  • I'm pretty happy that I can copy variables and their value from one object's namespace to another object's namespace with the same variable names automatically: class simpleObject(): pass a = ...
    Andrew BergAndrew Berg
    Jun 12, 2011 at 1:32 am
    Jun 12, 2011 at 3:20 pm
  • I didn't get at least two messages from the "call a function every 10 seconds thread", and possibly some other messages, and I access the group via the mailing list. I use the latest stable ...
    Andrew BergAndrew Berg
    Jun 29, 2011 at 8:34 pm
    Jul 2, 2011 at 2:55 pm
  • Hi, What do I have to do under python windows to create a directory with all permissions, such, that new files / directories created below will inherit the permissions. The reason I am asking is, ...
    Jun 26, 2011 at 8:57 pm
    Jun 27, 2011 at 12:45 pm
  • Dear Python Experts, First, I'd like to convey my appreciation to you all for your support and contributions. I am a Python newborn and need help with my function. I commented on my program as to ...
    Cathy JamesCathy James
    Jun 18, 2011 at 11:21 pm
    Jun 26, 2011 at 4:09 pm
  • Hello Trying to pop some key from a dict while is iterating over it will cause an exception. How I can remove items when the search result is true. Example: while len(dict): for key in dict.keys(): ...
    Jun 19, 2011 at 2:32 pm
    Jun 21, 2011 at 2:15 pm
  • Hi, I'm just wondering about the complexity of some Python operations to mimic Lisp car and cdr in Python... def length(L) : if not L : return 0 return 1 + length(L[1:]) Should I think of the slice ...
    Franck DitterFranck Ditter
    Jun 17, 2011 at 2:45 pm
    Jun 19, 2011 at 4:38 pm
  • Based on what I've read, it seems os.rename is the proper function to use, but I'm a little confused about the syntax. Basically I just want to write a simple script that will back up my saved game ...
    John SalernoJohn Salerno
    Jun 17, 2011 at 5:06 am
    Jun 18, 2011 at 8:52 pm
  • Hi, I'd like to simplify the following string formatting: solo = 'Han Solo' jabba = 'Jabba the Hutt' print "{solo} was captured by {jabba}".format(solo=solo, jabba=jabba) # Han Solo was captured by ...
    Jabba LaciJabba Laci
    Jun 6, 2011 at 4:15 pm
    Jun 7, 2011 at 7:47 am
  • I'm working on an audio/video converter script (moving from bash to Python for some extra functionality), and part of it is chaining the audio decoder (FFmpeg) either into SoX to change the volume ...
    Andrew BergAndrew Berg
    Jun 28, 2011 at 5:57 am
    Jul 2, 2011 at 12:25 pm
  • Hi, I am getting following error message while unziping a .zip file. Any help or idea is highly appreciated. Error message Traceback (most recent call last): File "C:\Zip_Process\py\test2_new.py", ...
    Ahmed, ShakirAhmed, Shakir
    Jun 24, 2011 at 2:55 pm
    Jun 24, 2011 at 8:21 pm
  • Random rant and not very on-topic. Feel free to hit Delete and move on. I've just spent a day coding in Javascript, and wishing browsers supported Python instead (or as well). All I needed to do was ...
    Chris AngelicoChris Angelico
    Jun 14, 2011 at 6:31 am
    Jun 22, 2011 at 4:37 pm
  • I'm using the SimPy package to run simulations. Anyone who's used this package knows that the way it simulates process concurrency is through the clever use of yield statements. Some of the code in ...
    Jun 4, 2011 at 6:27 pm
    Jun 21, 2011 at 3:03 am
  • Using Python 2.6.5 on linux. When using MySQLdb I am getting warnings printed to stdout, but I would like to trap, display and log those warnings. In the past I have used _mysql_exceptions.Warning, ...
    Tim JohnsonTim Johnson
    Jun 16, 2011 at 1:58 am
    Jun 16, 2011 at 9:56 pm
  • Hi All, The following function was showing up in my profiles as a large bottle neck: # Slow version def RMSBand(self, histogram): """Calculates the root-mean-squared value for the given colour stream ...
    Keir RiceKeir Rice
    Jun 2, 2011 at 10:07 pm
    Jun 3, 2011 at 12:11 pm
  • hi , I trying to use urllib2 in my script , but the problem is lets say a domains resolves to multiple IPs , If the URL is served by plain http , I can add ?Host: domain? header and check whether all ...
    Saurabh vermaSaurabh verma
    Jun 14, 2011 at 6:34 pm
    Jun 25, 2011 at 8:27 pm
  • Hi, How get all users belongs to a group using python ldap module.
    Jun 23, 2011 at 1:14 pm
    Jun 25, 2011 at 10:20 am
  • I'm involved in the construction of an environment that allows end users to supply scripts which will then run on our servers. We need to be able to offer the full flexibility of a scripting ...
    Chris AngelicoChris Angelico
    Jun 22, 2011 at 12:49 am
    Jun 22, 2011 at 5:33 pm
  • Hello I've a list of tasks to perform. Each of them is a threading.Thread. Basically I have : while task_list : task = task_list[0] task.run() task_list.remove(task) Now I want, in some circumstance ...
    Laurent ClaessensLaurent Claessens
    Jun 19, 2011 at 2:42 pm
    Jun 19, 2011 at 5:04 pm
  • There are basically two ways to go about this. One is, to append the new value, and then sort the list. Another is to traverse the list, and insert the new value at the appropriate position. The ...
    Jun 17, 2011 at 8:53 pm
    Jun 19, 2011 at 2:21 pm
  • Hi there, I've been looking for 2 days for a way to convert integer to binary number 0-padded, nothing... I need to get numbers converted with a defined number of bits. For example on 8 bits 2 = ...
    Olivier LEMAIREOlivier LEMAIRE
    Jun 15, 2011 at 12:29 pm
    Jun 18, 2011 at 9:00 am
  • Is there a way to keep the definitions of the high-level functions at the top of the source ? I don't see a way to declare a function in Python. Thanks in advance. -- Andr? Majorel ...
    Andre MajorelAndre Majorel
    Jun 8, 2011 at 1:58 pm
    Jun 14, 2011 at 2:03 am
  • Hi Guru's, I'm working on a solution to find the prime factor of the number This part of the code works.. http://www.pastie.org/2041584 When the number gets bigger, the range cannot iterate through ...
    Ganapathy SubramaniumGanapathy Subramanium
    Jun 9, 2011 at 8:31 am
    Jun 10, 2011 at 8:10 am
  • Hello I studying some way to print few line in the console that won't scroll down. If was for a single line I've some idea, but several line it may take some vertical tab and find the original first ...
    Jun 2, 2011 at 1:22 pm
    Jun 7, 2011 at 2:08 pm
Group Navigation
period‹ prev | Jun 2011 | next ›
Group Overview
grouppython-list @

413 users for June 2011

Chris Angelico: 120 posts Steven D'Aprano: 93 posts Terry Reedy: 71 posts Ian Kelly: 64 posts Ethan Furman: 63 posts Ben Finney: 51 posts Chris Torek: 34 posts Andrew Berg: 25 posts Nobody: 25 posts Benjamin Kaplan: 24 posts MRAB: 24 posts TheSaint: 24 posts Eric Snow: 23 posts Rustom Mody: 23 posts Gregory Ewing: 22 posts Chris Rebert: 20 posts John Salerno: 18 posts Erik Max Francis: 17 posts Carl Banks: 16 posts Gnarlodious: 16 posts
show more