Search Discussions
-
So, here I was thinking "oh, this is a nice, easy way to initialize a 4D matrix" (running 2.7.3, non-core libs not allowed): m = [[None] * 4] * 4 The way to get what I was after was: m = [[None] * 4, ...
Demian Brecht
Nov 5, 2012 at 6:27 am
Nov 9, 2012 at 9:49 pm -
Hi, I'm developing a GUI Automation library (http://www.getautoma.com) and am having difficulty picking a name for the function that simulates key strokes. I currently have it as 'type' but that ...
Michael Herrmann
Nov 20, 2012 at 12:18 pm
Nov 29, 2012 at 11:45 am -
I would like to introduce a new Python textbook aimed at high school students: http://femhub.com/textbook-python/. The textbook is open source and its public Git repository is located at Github: git ...
Pavel Solin
Nov 19, 2012 at 5:30 am
Nov 23, 2012 at 3:43 am -
Hi all! I just started learning Python by myself and I have an extremely simple question now! I am in my Python interpreter now and I want to open/edit a program called nobel.py. But when I typed ...
Caroline Hou
Nov 13, 2012 at 2:02 am
Nov 22, 2012 at 11:35 am -
Dear list, I'm relatively new to Python and have googled and googled but haven't found a reasonable answer to this question, so I thought I'd ask it here. I'm beginning a large Python project which ...
Martin Hewitson
Nov 2, 2012 at 6:16 am
Nov 3, 2012 at 1:38 am -
Cyclomatic (or conditional) complexity is a metric used to indicate the complexity of a source code. Excessive complexity is something that is beyond recommended level of 10 (threshold that points to ...
Andriy Kornatskyy
Nov 20, 2012 at 5:41 pm
Nov 22, 2012 at 8:56 am -
Hello, I want to create a URL-safe unique ID for URL's. Currently I use: url_id = base64.urlsafe_b64encode(url) 'ZG9jcy5weXRob24ub3JnL2xpYnJhcnkvdXVpZC5odG1s' I would prefer more concise ID's. What ...
Richard
Nov 13, 2012 at 11:20 pm
Nov 14, 2012 at 1:00 pm -
What is the best solution to solve the following problem in Python 3.3? import math ... def __init__(self, x=0, y=0): ... self.x = x ... self.y = y ... def __sub__(self, other): ... return ...
Jennie
Nov 10, 2012 at 7:33 pm
Nov 12, 2012 at 4:46 am -
Simple problem, given a lot of data in many files/directories, I should create a tar file splitted in chunks <= a given size. The simplest way would be to compress the whole thing and then split. At ...
Andrea crotti
Nov 7, 2012 at 5:13 pm
Nov 14, 2012 at 8:57 pm -
21
error
I am getting this error while running my programme.. : error: index is out of range I cannot find a valid reason for it in my prog can somebody suggest what may be possible reasons for this error. ...Inshu chauhan
Nov 6, 2012 at 12:31 pm
Nov 20, 2012 at 1:23 pm -
I've run into a Unicode error, and despite doing some googling, I can't figure out the right way to fix it. I have a Python 2.6 script that reads my Outlook 2010 task list. I'm able to read the tasks ...
Anders
Nov 7, 2012 at 10:17 pm
Nov 9, 2012 at 10:06 am -
Hello everybody, i am doing my project: local network chat using python here is my file http://www.mediafire.com/?cc2g9tmsju0ba2m when i compile client.py, there is some bug Traceback (most recent ...
Minh Dang
Nov 28, 2012 at 2:50 am
Nov 29, 2012 at 9:13 am -
I need to time the operation of a command-line utility (specifically nslookup) from within a python program I'm writing. I don't want to use python's timeit function because I'd like to avoid ...
Wrw
Nov 14, 2012 at 3:34 am
Nov 17, 2012 at 12:17 am -
Is there a simpler way to modify all arguments in a function before using the arguments? For example, can the below code, in the modify arguments section be made into a few statements? def ...
Bruceg113355
Nov 10, 2012 at 12:48 am
Nov 16, 2012 at 9:30 pm -
I'm trying to pull down tweets with one of the many twitter APIs. The particular one I'm using (python-twitter), has a call: data = api.GetSearch(term="foo", page=page) The way it works, you start ...
Roy Smith
Nov 10, 2012 at 10:58 pm
Nov 13, 2012 at 4:14 am -
Anybody know of the appropriate place to troll and flame about various Python related issues? I'm kind of mad about some Python stuff and I need a place to vent where people may or may not listen, ...
Jason Benjamin
Nov 2, 2012 at 11:20 am
Nov 5, 2012 at 7:43 pm -
18
Index Error
def distance(c, p): dist = sqrt( ((c[0]-p[0])**2) + ((c[1]-p[1])**2) + ((c[2]-p[2])**2) ) return dist def GenerateRing(x,y, N): Generates square rings around a point in data which has 300 columns(x) ...Inshu chauhan
Nov 20, 2012 at 1:43 pm
Nov 21, 2012 at 2:33 pm -
python version 2.4.3, yes i know that it is old. getting the sysadmin to update the OS requires a first born. with the following code.. for signal in register['signals'] : 351 sigName = ...
Kevin T
Nov 19, 2012 at 11:43 pm
Nov 29, 2012 at 10:57 pm -
A lazy attribute is an attribute that is calculated on demand and only once. The post below shows how you can use lazy attribute in your Python class ...
Andriy Kornatskyy
Nov 15, 2012 at 7:33 pm
Nov 16, 2012 at 3:22 pm -
I'm converting an application to Python 3. The app works fine on Python 2. Simply put, this simple one-liner: print(chr(254)) errors out with: Traceback (most recent call last): File ...
Danielk
Nov 9, 2012 at 5:17 pm
Mar 19, 2014 at 3:14 pm -
People who come from strongly typed languages that offer interfaces often are confused by lack of one in Python. Python, being dynamic typing programming language, follows duck typing principal. It ...
Andriy Kornatskyy
Nov 8, 2012 at 5:34 pm
Nov 9, 2012 at 5:55 pm -
Hi, do you think it's bad style to override the built-in function `type`? I'm co-developing a GUI automation library called Automa (http://www.getautoma.com) and 'type' would be a very fitting name ...
Michael Herrmann
Nov 23, 2012 at 4:12 pm
Dec 3, 2012 at 10:57 am -
Greetings: I am the lone developer of db apps at a company of 350+ employees. Everything is done in MS Access 2010 and VBA. I'm frustrated with the limitations of this platform and have been ...
Kgard
Nov 23, 2012 at 3:19 am
Nov 29, 2012 at 5:22 pm -
How to "statically type" an instance of class that I pass to a method of other instance? I suppose there shall be some kind of method decorator to treat an argument as an instance of class? Generally ...
ALeX inSide
Nov 25, 2012 at 12:11 pm
Nov 27, 2012 at 5:18 am -
Hi all! I have a stupid problem, for which I cannot find a solution... I have a python module, lets call it debugTest.py. and it contains: def test(): a=1 b=2 c=a+b c so as simple as possible. Now I ...
Chip9munk
Nov 15, 2012 at 12:29 pm
Nov 16, 2012 at 10:30 am -
Hello! Clueless noob again! :) This time around, I'm trying to figure out the random.seed() function -- specifically, I'd like to retrieve the seeded values from a list (which I've called levelSeed), ...
Graham Fielding
Nov 19, 2012 at 3:00 am
Nov 27, 2012 at 1:01 am -
Hi All i am trying to build up a set of subprocess.Ponen calls to replicate the effect of a horribly long shell command. I'm not clear how I can do one part of this and wonder if anyone can advise ...
Jkn
Nov 8, 2012 at 6:05 pm
Nov 18, 2012 at 11:17 pm -
Hello, I'm trying to complete a namebook CSV file with missing phone numbers which are in another CSV file. the namebook file is structured: First name;Lastname; Address; City; Country; Phone number, ...
Anatoli Hristov
Nov 26, 2012 at 9:08 pm
Nov 29, 2012 at 11:13 pm -
-1 Now, reading find's documentation: S.find(sub [,start [,end]]) - int Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments ...
Giacomo Alzetta
Nov 21, 2012 at 12:43 pm
Nov 22, 2012 at 10:53 pm -
Hi, I'm writing a small mail library for my own use, and at the time I'm testing parameters like this: class Mail(object): def __init__(self, smtp, login, **params) blah blah required = ['Subject', ...
Cantabile
Nov 11, 2012 at 10:24 pm
Nov 12, 2012 at 10:25 pm -
I'm investigating Python for image processing (having used Matlab, then Octave for some years). And I'm spoiled for choice: PIL and its fork pillow, scipy.ndimage, scikits-image, mahotas, the Python ...
Alasdair McAndrew
Nov 28, 2012 at 12:30 pm
Nov 29, 2012 at 11:04 pm -
Hi all, I want to list the repositories in svn using python. For this i have used below command, " res = subprocess.check_output(["svn.exe", "list", "Https://127.0.0.1:443/svn/Repos"], ...
Dachakku
Nov 26, 2012 at 10:36 am
Nov 28, 2012 at 2:47 pm -
Requirements for `account number` generator: 1. Issue pseudo random consistent number (must be unique for dozen millions of records) 2. Easy check validity (without a need to make a database call) ...
Andriy Kornatskyy
Nov 2, 2012 at 9:13 pm
Nov 3, 2012 at 4:23 pm -
Hi, I want to create a method within a class that is able to accept either a class or an instance. class MyClass(object): @magic_decorator def method(param): # param can be MyClass (cls) or an ...
Marc Aymerich
Nov 22, 2012 at 3:14 pm
Nov 23, 2012 at 1:06 pm -
Latin1 has a block of 32 undefined characters. Windows-1252 (aka cp1252) fills in 27 of these characters but leaves five undefined: 0x81, 0x8D, 0x8F, 0x90, 0x9D The byte 0x81 decoded with latin gives ...
Buck
Nov 16, 2012 at 9:44 pm
Nov 17, 2012 at 7:15 pm -
Hi all! I would like to use conf file to get all the variables in my code. And it works great. I use the following (simple example): execfile("example.conf", config) print config["value1"] and it ...
Chip9munk
Nov 16, 2012 at 12:06 pm
Nov 16, 2012 at 4:41 pm -
http://stackoverflow.com/questions/tagged/python "Python has two major versions (2 and 3) in use which have significant differences." I believe that this is incorrect. The warts have been removed, ...
Mark Lawrence
Nov 13, 2012 at 3:08 am
Nov 14, 2012 at 9:07 am -
10
pythonic way
what is the most pythonic way to do this : if 0 < ix < 10 and 0 < iy < 10 ??? An HTML attachment was scrubbed... URL ...Inshu chauhan
Nov 1, 2012 at 3:32 pm
Nov 2, 2012 at 9:11 am -
Hello, I created some bindings to a 3rd party library. I have found that when I run Python and import smtplib it works fine. If I first log into the 3rd party application using my bindings however I ...
Eric Frederich
Nov 15, 2012 at 2:38 pm
Nov 19, 2012 at 1:37 pm -
I'm looking into writing a python script that colorizes particular hops when using traceroute. Anyone run across something like this? I don't think it would be extremely difficult to write but some ...
Jordan Bylsma
Nov 17, 2012 at 3:04 pm
Nov 18, 2012 at 1:27 am -
How to only get a list of the names of the non-directory files in current directory ('.')? (Note excluding its subdirectories ). I need the code : )
iMath
Nov 6, 2012 at 5:19 am
Nov 13, 2012 at 9:24 pm -
Hi, probably I'm missing something. Using str(Arg) works just fine if Arg is a list. But str([],encoding='latin-1') gives the error TypeError: coercing to str: need bytes, bytearray or buffer-like ...
Helmut Jarausch
Nov 9, 2012 at 9:18 am
Nov 10, 2012 at 4:45 pm -
Hello, I am a French student and I am currently realizing my final thesis in the field of Free/libre open source software. It would be a great help for me if you could answer a short online survey ...
Tengy Td
Nov 1, 2012 at 8:49 pm
Nov 7, 2012 at 5:39 am -
Hi All, As part of a Nim solver I'm playing around with I'm trying to code this Haskell snippet: options [x] = zero : [ [y] | y <- [1..x - 1] ] options (x:xs) = map (++ xs) (options [x]) ++ map (x:) ...
Foster63
Nov 2, 2012 at 7:19 pm
Nov 4, 2012 at 5:16 am -
Hello, Under platform that has fixed pitch font, I want to get a "screen" length of a multibyte string --- sample --- s1 = u"abcdef" s2 = u"???" # It has same "screen" length as s1's. print len(s1) # ...
Kobayashi
Nov 25, 2012 at 10:19 am
Nov 26, 2012 at 12:58 am -
Hi, I'm using the json module to create a JSON string, then inserting that string into a html template containing a javascript function (from the highcharts library: http://www.highcharts.com/) The ...
Saikari78
Nov 21, 2012 at 2:59 pm
Nov 22, 2012 at 5:05 pm -
Hello: I have a multihomed machine that I would like to run the Python imaplib's IMAP4 client on. I would like to be able to specify which interface the underlying socket will bind to as its source ...
Brintoul
Nov 20, 2012 at 9:14 pm
Nov 20, 2012 at 11:10 pm -
I all of the other problems but I have issues with these: 1.Given a positive integer n , assign True to is_prime if n has no factors other than 1 and itself. (Remember, m is a factor of n if m ...
Su29090
Nov 19, 2012 at 1:52 am
Nov 20, 2012 at 3:02 pm -
Hello, I want to process XML-like data like this: <testname=ltpacpi.sh <description ACPI (Advanced Control Power & Integration) testscript for 2.5 kernels. <\description <test_location ...
Artie Ziff
Nov 9, 2012 at 12:54 pm
Nov 20, 2012 at 5:48 am -
I am trying to open a file in 'w' mode open('file', 'wb'). open() will throw with IOError with errno 13 if the file is locked by another application or if user does not have permission to open/write ...
Ali Akhavan
Nov 14, 2012 at 12:33 am
Nov 15, 2012 at 4:01 pm
Group Overview
group | python-list |
categories | python |
discussions | 220 |
posts | 1,579 |
users | 296 |
website | python.org |
296 users for November 2012
Archives
- September 2015 (591)
- August 2015 (1,058)
- July 2015 (1,440)
- June 2015 (1,704)
- May 2015 (1,841)
- April 2015 (1,231)
- March 2015 (1,717)
- February 2015 (1,612)
- January 2015 (889)
- December 2014 (1,283)
- November 2014 (1,600)
- October 2014 (1,447)
- September 2014 (1,031)
- August 2014 (1,867)
- July 2014 (1,618)
- June 2014 (1,357)
- May 2014 (1,431)
- April 2014 (1,285)
- March 2014 (2,093)
- February 2014 (1,999)
- January 2014 (2,089)
- December 2013 (2,060)
- November 2013 (2,507)
- October 2013 (1,932)
- September 2013 (1,634)
- August 2013 (1,532)
- July 2013 (2,062)
- June 2013 (2,795)
- May 2013 (1,935)
- April 2013 (1,980)
- March 2013 (1,953)
- February 2013 (1,789)
- January 2013 (1,924)
- December 2012 (1,569)
- November 2012 (1,579)
- October 2012 (1,961)
- September 2012 (2,311)
- August 2012 (1,808)
- July 2012 (1,577)
- June 2012 (1,199)
- May 2012 (1,197)
- April 2012 (1,416)
- March 2012 (1,373)
- February 2012 (1,442)
- January 2012 (1,446)
- December 2011 (1,895)
- November 2011 (1,291)
- October 2011 (1,188)
- September 2011 (1,587)
- August 2011 (2,069)
- July 2011 (2,140)
- June 2011 (1,908)
- May 2011 (2,475)
- April 2011 (2,098)
- March 2011 (1,761)
- February 2011 (1,746)
- January 2011 (2,123)
- December 2010 (1,671)
- November 2010 (2,355)
- October 2010 (2,518)
- September 2010 (2,187)
- August 2010 (3,098)
- July 2010 (2,579)
- June 2010 (3,238)
- May 2010 (2,458)
- April 2010 (2,356)
- March 2010 (2,759)
- February 2010 (3,486)
- January 2010 (3,294)
- December 2009 (2,899)
- November 2009 (3,396)
- October 2009 (3,346)
- September 2009 (3,087)
- August 2009 (3,903)
- July 2009 (3,761)
- June 2009 (3,321)
- May 2009 (3,370)
- April 2009 (4,272)
- March 2009 (4,228)
- February 2009 (3,965)
- January 2009 (4,732)
- December 2008 (4,335)
- November 2008 (3,799)
- October 2008 (4,123)
- September 2008 (3,816)
- August 2008 (4,056)
- July 2008 (4,238)
- June 2008 (3,737)
- May 2008 (4,976)
- April 2008 (4,708)
- March 2008 (4,122)
- February 2008 (4,132)
- January 2008 (4,145)
- December 2007 (3,686)
- November 2007 (3,419)
- October 2007 (4,234)
- September 2007 (4,332)
- August 2007 (4,189)
- July 2007 (3,771)
- June 2007 (4,142)
- May 2007 (5,018)
- April 2007 (4,912)
- March 2007 (4,365)
- February 2007 (3,951)
- January 2007 (3,864)
- December 2006 (4,449)
- November 2006 (4,229)
- October 2006 (5,506)
- September 2006 (5,244)
- August 2006 (4,829)
- July 2006 (4,720)
- June 2006 (5,054)
- May 2006 (5,302)
- April 2006 (4,845)
- March 2006 (5,729)
- February 2006 (4,839)
- January 2006 (5,249)
- December 2005 (5,011)
- November 2005 (5,677)
- October 2005 (5,387)
- September 2005 (4,458)
- August 2005 (4,428)
- July 2005 (4,472)
- June 2005 (4,562)
- May 2005 (4,269)
- April 2005 (5,019)
- March 2005 (5,070)
- February 2005 (5,159)
- January 2005 (5,194)
- December 2004 (5,211)
- November 2004 (4,048)
- October 2004 (5,191)
- September 2004 (5,534)
- August 2004 (6,168)
- July 2004 (4,217)
- June 2004 (4,202)
- May 2004 (3,890)
- April 2004 (4,285)
- March 2004 (5,077)
- February 2004 (4,213)
- January 2004 (3,988)
- December 2003 (3,818)
- November 2003 (4,940)
- October 2003 (6,297)
- September 2003 (4,299)
- August 2003 (5,654)
- July 2003 (4,912)
- June 2003 (4,933)
- May 2003 (4,938)
- April 2003 (5,017)
- March 2003 (5,031)
- February 2003 (7,701)
- January 2003 (6,229)
- December 2002 (4,102)
- November 2002 (4,346)
- October 2002 (3,307)
- September 2002 (4,206)
- August 2002 (4,919)
- July 2002 (4,826)
- June 2002 (4,215)
- May 2002 (5,295)
- April 2002 (5,967)
- March 2002 (5,323)
- February 2002 (5,245)
- January 2002 (5,617)
- December 2001 (4,443)
- November 2001 (4,565)
- October 2001 (3,669)
- September 2001 (3,719)
- August 2001 (5,208)
- July 2001 (6,528)
- June 2001 (4,905)
- May 2001 (5,492)
- April 2001 (4,713)
- March 2001 (4,478)
- February 2001 (3,871)
- January 2001 (4,187)
- December 2000 (3,099)
- November 2000 (2,336)
- October 2000 (3,820)
- September 2000 (3,933)
- August 2000 (4,253)
- July 2000 (4,199)
- June 2000 (4,089)
- May 2000 (4,269)
- April 2000 (3,217)
- March 2000 (3,719)
- February 2000 (4,000)
- January 2000 (2,682)
- December 1999 (2,283)
- November 1999 (1,896)
- October 1999 (2,048)
- September 1999 (2,001)
- August 1999 (2,151)
- July 1999 (2,351)
- June 1999 (2,386)
- May 1999 (2,201)
- April 1999 (1,706)
- March 1999 (6)
- February 1999 (1)