FAQ

Search Discussions

227 discussions - 1,999 posts

  • I need to pass a global variable into a python function. However, the global variable does not seem to be assigned after the function ends. Is it because parameters are not passed by reference? How ...
    SamSam
    Feb 21, 2014 at 6:37 am
    Mar 10, 2014 at 2:29 pm
  • Hello, I have 10 files and I need to merge them (using K way merging). The size of each file is around 200 MB. Now suppose I am keeping the merged data in a variable named mergedData, I had thought ...
    Ayushi DalmiaAyushi Dalmia
    Feb 4, 2014 at 11:28 am
    Mar 6, 2014 at 1:16 pm
  • Hi, I'm using Python 3.3 and i have a problem for which i've still not found any reasonable explanation... Traceback (most recent call last): File "<stdin ", line 1, in <module TypeError: 'tuple' ...
    Eric JacoboniEric Jacoboni
    Feb 27, 2014 at 4:01 pm
    Mar 20, 2014 at 2:34 am
  • Hello, Background: My twelve y/o son and I are still working our way through Invent Your Own Computer Games with Python, 2nd Edition. (We finished the Khan Academy Javascript Tutorials is the extent ...
    Dave emDave em
    Feb 14, 2014 at 6:08 pm
    Feb 17, 2014 at 6:24 pm
  • But __new__ does not call __init__, type does [1]. -- ~Ethan~ [1] And I seem to think pickle does, too, but I'm not sure.
    Ethan FurmanEthan Furman
    Feb 1, 2014 at 12:13 am
    Feb 3, 2014 at 11:47 pm
  • Please i have a silly question to ask. How long did it take you to learn how to write programs? What is the best way i can master thinker? I know the syntax but using it to write a program is a ...
    Ngangsia akumboNgangsia akumbo
    Feb 12, 2014 at 12:21 am
    Mar 8, 2014 at 10:06 pm
  • I ran across this and I thought there must be a better way of doing it, but then after further consideration I wasn't so sure. if key[:1] + key[-1:] == '< ': ... Some possibilities that occurred to ...
    Forman SimonForman Simon
    Feb 13, 2014 at 6:37 pm
    Feb 14, 2014 at 10:08 pm
  • playing a bit with subject. pros and cons of this approach? did i create bicycle again? :-) class myclass(object): class_instance = None def __new__(cls, *args, **kwargs): if myclass.class_instance ...
    Asaf LasAsaf Las
    Feb 12, 2014 at 4:34 am
    Feb 14, 2014 at 5:21 am
  • generator slides review and Python doc I do not know what tool is used to produce such slides. When the mouse is over a a text like a title (<H* ... <\H* ???) the text get transformed and a colored ...
    WxjmfauthWxjmfauth
    Feb 3, 2014 at 1:59 pm
    Feb 7, 2014 at 3:05 am
  • hello, i'd like to know how to set up a flag to change a variable, for example, i want a simple script to combine 2 numbers, sum = num + another_num print "Now the sum of the numbers equals : ", sum ...
    Luke GeelenLuke Geelen
    Feb 11, 2014 at 5:29 pm
    Feb 12, 2014 at 6:51 pm
  • Hi, every one. I am a second year EE student. I just started learning python for my project. I intend to parse a csv file with a format like 3520005,"Toronto (Ont.)",C ...
    Zhen ZhangZhen Zhang
    Feb 6, 2014 at 12:10 am
    Feb 6, 2014 at 6:51 pm
  • In working on a proposal that might result in the creation of a new keyword, I needed to ascertain what names were used extensively in existing Python code. Out of random curiosity, I asked my script ...
    Chris AngelicoChris Angelico
    Feb 20, 2014 at 9:39 am
    Feb 21, 2014 at 8:57 pm
  • I have a class hierarchy like this: Widget <- VisualWidget <- BsWidget and then BsWidget has many descendants: Desktop, Row, Column, Navbar etc. Widgets can have children. They are stored in a tree ...
    Nagy László ZsoltNagy László Zsolt
    Feb 17, 2014 at 1:01 pm
    Mar 10, 2014 at 7:42 pm
  • I have a question that was a part of my homework and I got it correct but the teacher urged me to do it using the % sign rather than subtracting everything, for some reason I?m having issues getting ...
    Scott W DunningScott W Dunning
    Feb 8, 2014 at 4:44 am
    Feb 10, 2014 at 4:36 am
  • Once you can divide the number of seconds into hours, minutes, and seconds, you can format them like this: time = "%02d:%02d:%02d" % (hours, minutes, seconds) I'll give you that one for free because ...
    Chris AngelicoChris Angelico
    Feb 1, 2014 at 12:57 am
    Feb 3, 2014 at 7:48 am
  • Dictionaries and sets share a few properties: - Dictionaries keys are unique as well as sets items - Dictionaries and sets are both unordered - Dictionaries and sets are both accessed by key - ...
    MauroMauro
    Feb 25, 2014 at 8:32 pm
    Mar 15, 2014 at 5:24 pm
  • Hi guys, Here is one question related to algorithm. Details here: here is input sequence like a1,a2,...,an,b1,b2,...,bn ?the ax and bx always exist in pair. So, now, how to change the sequence to ...
    WesleyWesley
    Feb 9, 2014 at 12:13 pm
    Feb 11, 2014 at 10:56 pm
  • Hello, I had a question regarding functions. Is there a way to call a function multiple times without recalling it over and over. Meaning is there a way I can call a function and then add *5 or ...
    Scott W DunningScott W Dunning
    Feb 23, 2014 at 5:43 am
    Feb 27, 2014 at 10:49 pm
  • Would it be possible to extend the methods of the decimal module just a bit to include atan(), sin(), cos(), and exp() ? The module has methods for ln() and sqrt(); and that's great! I have done some ...
    Mark H. HarrisMark H. Harris
    Feb 19, 2014 at 3:30 pm
    Mar 2, 2014 at 12:49 am
  • I got to know about Python a few months ago and today, I want to develop only using Python because of its code readability. This is not a healthy bias. To play my own devil's advocate, I have a ...
    SamSam
    Feb 8, 2014 at 11:54 pm
    Feb 22, 2014 at 11:15 am
  • http://postimg.org/image/rkm9lhj8n/ So, I was doing some cx freeze stuff. If you cant understand everything from the pic, I'll give extra info. Please help me.
    EneskristoEneskristo
    Feb 12, 2014 at 7:43 pm
    Feb 13, 2014 at 10:22 pm
  • I am new to Python programming, actually new to any programming language. I sent the email below to the "pythonmac-sig at python.org a few days ago. So far I have not seen a reply, actually, I have ...
    Walter HugheyWalter Hughey
    Feb 10, 2014 at 4:10 pm
    Feb 14, 2014 at 2:02 pm
  • ## START CODE ########################################### def foo(): # foo represents a patternless function # or method that returns a Boolean value # based on some internal test. # if 1==1: return ...
    Rick JohnsonRick Johnson
    Feb 10, 2014 at 6:45 pm
    Feb 13, 2014 at 10:00 pm
  • Hello, I'm sure this is a common question but I can't seem to find a previous thread that addresses it. If one one exists, please point me to it. I've been developing with python recreationally for a ...
    TwizTwiz
    Feb 23, 2014 at 8:43 am
    Mar 2, 2014 at 9:58 am
  • Hey Guys i Need Help , When i run this program i get the 'None' Under the program, see what i mean by just running it , can someone help me fix this def Addition(): print('Addition: What are two your ...
    Charlie WinnCharlie Winn
    Feb 2, 2014 at 9:16 pm
    Feb 5, 2014 at 6:30 pm
  • hello, i have been working on a python resistor calculator to let my class show what you can do with python. now i have a script that makes the more speekable value of the resistance (res) #if ...
    Luke GeelenLuke Geelen
    Feb 15, 2014 at 9:18 am
    Feb 16, 2014 at 12:19 pm
  • I had a bug in a Python script recently. The code in question was something along the lines of: if a == 1: x = y else: x = z y = z + y z = z + 1 While editing this file I accidentally pushed TAB on ...
    MsustikMsustik
    Feb 6, 2014 at 3:02 am
    Feb 8, 2014 at 11:11 am
  • Hi, I'm curious. If I append an item to a list from the left using `list.insert`, will Python always move the entire list one item to the right (which can be super-slow) or will it check first to see ...
    cool-RRcool-RR
    Feb 6, 2014 at 11:59 pm
    Feb 7, 2014 at 8:25 am
  • I have to dynamically generate some code inside a function using exec, but I'm not sure if it is working by accident or if I can rely on it. Here is a trivial example: py def spam(): ... exec( """x = ...
    Steven D'ApranoSteven D'Aprano
    Feb 26, 2014 at 1:15 pm
    Feb 28, 2014 at 1:49 am
  • Is MySQLdb the recommended python module for SQL database access? Are there other modules? What I want in a module is to be able to write readable and maintainable code.
    SamSam
    Feb 8, 2014 at 8:55 am
    Feb 11, 2014 at 3:45 am
  • Hi, ALL, I'm trying to do a very easy task: sort python dictionary by value where value is a datetime object. When trying to do that in Python shell everthing works as expected. C:\Documents and ...
    Igor KorotIgor Korot
    Feb 8, 2014 at 7:06 am
    Feb 11, 2014 at 2:56 am
  • I am having trouble figuring out how to remove spaces?. Assume variables exist for minutes and seconds. Each variable is an integer. How would you create a string in the format, 3:11 with no spaces ...
    Scott W DunningScott W Dunning
    Feb 7, 2014 at 1:22 am
    Feb 7, 2014 at 10:09 pm
  • What is needed for proper learning is near-absolute simplicity. Even one toy too many to play with is an intolerable distraction, but one too few massively hampers learning and induces boredom. I ...
    John AllsupJohn Allsup
    Feb 12, 2014 at 7:05 am
    Feb 13, 2014 at 1:06 am
  • Hi can anyone help finding the angle to draw different polygons shapes in this example import turtle wm = turtle.Screen() alex = turtle.Turtle() for i in range(5): alex.left(216) alex.forward(50) ...
    GeniusrkoGeniusrko
    Feb 10, 2014 at 11:44 pm
    Feb 11, 2014 at 9:35 am
  • I'm looking for an efficient method to produce rows of tables like this: for base 2 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 . . . 1 1 1 1 for base 3 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 2 0 0 0 0 1 0 0 ...
    Jean DupontJean Dupont
    Feb 2, 2014 at 5:44 pm
    Feb 4, 2014 at 9:18 am
  • Hi Folks , Iam newbie to Python, Iam trying to use optparse module and write a script that will parse the command line options ..I had to use opt parse instead of argparse because by host Operating ...
    Ganesh PalGanesh Pal
    Feb 25, 2014 at 3:31 pm
    Mar 1, 2014 at 12:17 pm
  • Let's say I have a sample file like this: Name 1 2 3 4 5 6 7 8 ------------------------------------------------------------------------ name1 099-66-7871 A-F Y 100 67 81 59 98 name2 999-88-7766 A-F N ...
    KxjakkkKxjakkk
    Feb 20, 2014 at 4:22 pm
    Feb 24, 2014 at 12:02 pm
  • I am getting below tuple from excel. How should i remove extra commas in each tuple to make it easy for operations. tuples is: seriesxlist1 = ((0.0), (0.01), (0.02), (0.03), (0.04), (0.05), (0.06), ...
    Jaydeep PatilJaydeep Patil
    Feb 21, 2014 at 6:49 am
    Feb 24, 2014 at 1:19 am
  • I am writing a couple of class methods to build up several lines of html. Some of the lines are conditional and most need variables inserted in them. Searching the web has given me a few ideas. Each ...
    Cstrutton11Cstrutton11
    Feb 8, 2014 at 7:41 am
    Feb 8, 2014 at 2:42 pm
  • I was wandering if I could dynamically change my GUI and after a few searches on Google found the grid_remove() function. What I'm wandering now is if there is a way to group a lot of widgets up into ...
    Lewis WoodLewis Wood
    Feb 1, 2014 at 7:43 pm
    Feb 3, 2014 at 3:21 am
  • I am fully ready to invest in the Google Cloud Platform, and bring with me my very own idea: Glass Solver (Sometimes called GlaSolver). Long story short, this application for Google Glass will ...
    EliasbylarsenEliasbylarsen
    Feb 9, 2014 at 11:48 pm
    Feb 18, 2014 at 9:18 pm
  • I'm giving a talk tomorrow @Fosdem about generators/iterators/iterables.. The slides are here (forgive the strange Chinese characters) ...
    Andrea crottiAndrea crotti
    Feb 1, 2014 at 2:12 pm
    Feb 4, 2014 at 12:55 am
  • hi folks, Its been too long... can't remember... are there rules here about posting code snippets, or length considerations, and so forth? Seems like there was a place to share code snips outside of ...
    Mark H. HarrisMark H. Harris
    Feb 27, 2014 at 12:13 pm
    Mar 2, 2014 at 12:20 pm
  • I would like to learn and try out functional programming (FP). I love Python and would like to use it to try FP. Some have advised me to use Haskell instead because Python is not a good language for ...
    SamSam
    Feb 16, 2014 at 4:45 am
    Feb 18, 2014 at 4:39 pm
  • I want to use (https://github.com/timetric/python-metar). Our deployment process more or less requires that it be installed via pip. We maintain our own cache of packages and install using: pip ...
    Roy SmithRoy Smith
    Feb 15, 2014 at 1:47 am
    Feb 16, 2014 at 3:47 pm
  • On behalf of the Python development team, I'm delighted to announce the first release candidate of Python 3.4. This is a preview release, and its use is not recommended for production settings ...
    Larry HastingsLarry Hastings
    Feb 11, 2014 at 7:43 am
    Feb 12, 2014 at 11:48 pm
  • I have Python 3.3 installed on my Windows 7 x64 box. Today I had to install Python 2.7 for an older app of mine. Here is my problem: although "#!/usr/bin/env python3" is given in the file and "py -3" ...
    Nagy László ZsoltNagy László Zsolt
    Feb 13, 2014 at 11:53 am
    Feb 25, 2014 at 1:38 pm
  • Greetings! A PEP is under discussion to add %-interpolation back to the bytes type in Python 3.5. Assuming the PEP is accepted, what *will* be added back is: Numerics: b'%d' % 10 -- b'10' b'%02x' % ...
    Ethan FurmanEthan Furman
    Feb 24, 2014 at 7:54 pm
    Feb 25, 2014 at 8:29 am
  • Hi. I stumbled upon Wheezy.web and I got interested into learn more about it. After googling I didn't find that many information about it: only docs and samples from its web site. I didn't find a ...
    Marcio Andrey OliveiraMarcio Andrey Oliveira
    Feb 18, 2014 at 11:48 pm
    Feb 23, 2014 at 8:48 am
  • The next adventure in Python was to install Python 3 into a Windows XP machine. I had a previous 2.7 installation that I uninstalled and carefully removed all traces of from the directory and the ...
    Eglowstein HEglowstein H
    Feb 18, 2014 at 2:56 pm
    Feb 22, 2014 at 3:14 am
Group Navigation
period‹ prev | Feb 2014 | next ›
Group Overview
grouppython-list @
categoriespython
discussions227
posts1,999
users303
websitepython.org

303 users for February 2014

Chris Angelico: 255 posts Mark Lawrence: 85 posts Steven D'Aprano: 77 posts Asaf Las: 71 posts Roy Smith: 66 posts Marko Rauhamaa: 58 posts Dave Angel: 52 posts Terry Reedy: 52 posts Rustom Mody: 51 posts Ben Finney: 47 posts Peter Otten: 43 posts Scott W Dunning: 37 posts Tim Chase: 35 posts Ned Batchelder: 34 posts Ethan Furman: 30 posts Gregory Ewing: 29 posts MRAB: 26 posts Wxjmfauth: 24 posts Ian Kelly: 24 posts Gary Herron: 19 posts
show more
Archives