FAQ

Search Discussions

220 discussions - 1,579 posts

  • 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 BrechtDemian 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 HerrmannMichael 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 SolinPavel 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 HouCaroline 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 HewitsonMartin 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 KornatskyyAndriy 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 ...
    RichardRichard
    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 ...
    JennieJennie
    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 crottiAndrea 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 chauhanInshu 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 ...
    AndersAnders
    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 DangMinh 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 ...
    WrwWrw
    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 ...
    Bruceg113355Bruceg113355
    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 SmithRoy 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 BenjaminJason Benjamin
    Nov 2, 2012 at 11:20 am
    Nov 5, 2012 at 7:43 pm
  • 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 chauhanInshu 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 TKevin 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 KornatskyyAndriy 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 ...
    DanielkDanielk
    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 KornatskyyAndriy 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 HerrmannMichael 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 ...
    KgardKgard
    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 inSideALeX 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 ...
    Chip9munkChip9munk
    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 FieldingGraham 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 ...
    JknJkn
    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 HristovAnatoli 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 AlzettaGiacomo 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', ...
    CantabileCantabile
    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 McAndrewAlasdair 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"], ...
    DachakkuDachakku
    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 KornatskyyAndriy 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 AymerichMarc 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 ...
    BuckBuck
    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 ...
    Chip9munkChip9munk
    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 LawrenceMark Lawrence
    Nov 13, 2012 at 3:08 am
    Nov 14, 2012 at 9:07 am
  • what is the most pythonic way to do this : if 0 < ix < 10 and 0 < iy < 10 ??? An HTML attachment was scrubbed... URL ...
    Inshu chauhanInshu 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 FrederichEric 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 BylsmaJordan 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 : )
    iMathiMath
    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 JarauschHelmut 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 TdTengy 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:) ...
    Foster63Foster63
    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) # ...
    KobayashiKobayashi
    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 ...
    Saikari78Saikari78
    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 ...
    BrintoulBrintoul
    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 ...
    Su29090Su29090
    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 ZiffArtie 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 AkhavanAli Akhavan
    Nov 14, 2012 at 12:33 am
    Nov 15, 2012 at 4:01 pm
Group Navigation
period‹ prev | Nov 2012 | next ›
Group Overview
grouppython-list @
categoriespython
discussions220
posts1,579
users296
websitepython.org

296 users for November 2012

Steven D'Aprano: 115 posts Chris Angelico: 107 posts Ian Kelly: 78 posts Dave Angel: 60 posts Roy Smith: 45 posts Terry Reedy: 44 posts Mark Lawrence: 36 posts Prasad, Ramit: 35 posts Andriy Kornatskyy: 33 posts Peter Otten: 29 posts Inshu chauhan: 27 posts Hans Mulder: 25 posts Michael Herrmann: 22 posts Oscar Benjamin: 22 posts Andrew Robinson: 21 posts Joshua Landau: 21 posts MRAB: 20 posts Ulrich Eckhardt: 17 posts Rusi: 16 posts Aahz Maruch: 15 posts
show more
Archives