FAQ

Search Discussions

193 discussions - 1,932 posts

  • "Designed". You simply can't get a good clean design if you just let it grow by itself, one feature at a time. You'll end up with something where you can do the same sort of thing in three different ...
    Chris AngelicoChris Angelico
    Oct 12, 2013 at 10:37 pm
    Oct 26, 2013 at 9:31 pm
  • Hey, I've been working on GCCPY since roughly november 2009 at least in its concept. It was announced as a Gsoc 2010 project and also a Gsoc 2011 project. I was mentored by Ian Taylor who has been an ...
    Philip HerronPhilip Herron
    Oct 20, 2013 at 5:56 pm
    Nov 15, 2013 at 3:59 pm
  • Just logged in via FTP to my server and i saw an uploade file named "Warnign html" Contents were: WARNING I am incompetent. Do not hire me! Question: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO ...
    ΝίκοςΝίκος
    Oct 1, 2013 at 9:58 am
    Oct 8, 2013 at 2:53 pm
  • Part of the reason that Python does not do tail call optimization is that turning tail recursion into while iteration is almost trivial, once you know the secret of the two easy steps. Here it is ...
    Terry ReedyTerry Reedy
    Oct 1, 2013 at 9:30 pm
    Oct 9, 2013 at 10:45 pm
  • version 0.01 created on 17 october 2013 by Skybuck Flying. (after having some experience with python which lacks repeat until/goto/labels and programming game bots) (the exit conditions described ...
    Skybuck FlyingSkybuck Flying
    Oct 16, 2013 at 11:36 pm
    Nov 4, 2013 at 9:38 am
  • I believe this is set at a suitable level http://www.youtube.com/watch?v=HyTPFyyA-mA -- Cheers. Mark Lawrence
    Mark LawrenceMark Lawrence
    Oct 1, 2013 at 8:26 am
    Oct 2, 2013 at 6:57 pm
  • Last week, Elad Maidar wrote a fairly short but readable opinion piece[0] illustrating some long-standing social problems in the Ruby community, ending with a very specific call to action around ...
    Owen JacobsonOwen Jacobson
    Oct 17, 2013 at 3:13 am
    Oct 26, 2013 at 4:47 pm
  • # initialize cookie and retrieve cookie from clients browser cookie = cookies.SimpleCookie( os.environ.get('HTTP_COOKIE') ) if cookie.get('ID') is not None: cookieID = cookie['ID'].value else ...
    Νίκος ΑλεξόπουλοςΝίκος Αλεξόπουλος
    Oct 8, 2013 at 10:04 am
    Oct 10, 2013 at 1:42 pm
  • I am starting to have doubts as to whether Python 3.x will ever be actually adopted by the Python community at large as their standard. Years have passed, and a LARGE number of Python programmers has ...
    DufrizDufriz
    Oct 23, 2013 at 11:57 am
    Oct 25, 2013 at 12:03 am
  • Hello i having the following code to try and retrieve the visitor's saved cookie form the browser. [CODE] # initialize cookie and retrieve cookie from clients browser try: cookie = ...
    Νίκος ΑλεξόπουλοςΝίκος Αλεξόπουλος
    Oct 25, 2013 at 7:22 am
    Oct 27, 2013 at 6:45 am
  • # initialize cookie cookie = cookies.SimpleCookie( os.environ.get('HTTP_COOKIE') ) cookie.load( cookie ) vip = cookie.get('ID') ....... ....... # if browser cookie does not exist, set it vip = ...
    Νίκος ΑλεξόπουλοςΝίκος Αλεξόπουλος
    Oct 5, 2013 at 1:38 pm
    Oct 7, 2013 at 2:16 am
  • Hello. I've written a program for my kids to calculate arc length. I want to include some error testing for value types entered that are something other than integer values. My goal is to make sure ...
    Scott NovingerScott Novinger
    Oct 19, 2013 at 12:23 pm
    Nov 1, 2013 at 3:07 pm
  • Just came across this little Javascript gem: ",,," == Array((null,'cool',false,NaN,4)); = evaluates as true http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array I swear, I am never going ...
    Steven D'ApranoSteven D'Aprano
    Oct 10, 2013 at 4:36 am
    Oct 11, 2013 at 4:56 pm
  • As some of you are aware, I have a module accepted into the standard library: http://docs.python.org/3.4/library/statistics.html I'm now at the point where I wish to backport this module to support ...
    Steven D'ApranoSteven D'Aprano
    Oct 24, 2013 at 4:54 am
    Oct 25, 2013 at 7:49 am
  • Hello i having the following code to try and retrieve the visitor's saved cookie form the browser. [CODE] # initialize cookie and retrieve cookie from clients browser try: cookie = ...
    Nick the Gr33kNick the Gr33k
    Oct 26, 2013 at 1:27 pm
    Oct 27, 2013 at 11:26 pm
  • Is the following considered poor Python form? class Foo (object) : _lazy = None def foo(self, x) : _lazy = _lazy or self.get_something(x) def get_something(self, x) : # doesn't really matter I like ...
    Peter CacioppiPeter Cacioppi
    Oct 19, 2013 at 9:44 pm
    Oct 21, 2013 at 6:47 pm
  • Who's up for some fun? Implement an XKCD-936-compliant password generator in Python 3, in less code than this: print(*__import__("random").sample(open("/usr/share/dict/words").read().split("\n"),4)) ...
    Chris AngelicoChris Angelico
    Oct 8, 2013 at 6:17 am
    Oct 10, 2013 at 12:29 am
  • I have a program that runs like this: foo.py <inputfile I want to reconnect stdin to the tty as usual after 'inputfile' has been read so that things like raw_input and getpass will work as expected ...
    Tim DaneliukTim Daneliuk
    Oct 23, 2013 at 5:25 pm
    Oct 24, 2013 at 2:43 pm
  • I've never been well-up on complex numbers; can you elaborate on this, please? All I know is that I was taught that the square root of -1 is called i, and that hypercomplex numbers include i, j, k, ...
    Chris AngelicoChris Angelico
    Oct 10, 2013 at 1:25 pm
    Oct 16, 2013 at 12:21 pm
  • Excuse me for asking again today, but i see no error in the following code, yes no isertion or update happens into the database: try: # locate the ID of the page's URL cur.execute('''SELECT ID FROM ...
    Νίκος ΑλεξόπουλοςΝίκος Αλεξόπουλος
    Oct 5, 2013 at 7:16 pm
    Oct 6, 2013 at 9:40 pm
  • Hi, (explaining the title) : my app has functions and methods (and maybe classes in the future) that are decorated by decorators provided by the standard library or 3rd party packages. But I need to ...
    Gilles LenfantGilles Lenfant
    Oct 10, 2013 at 2:00 pm
    Oct 11, 2013 at 9:38 pm
  • #!/usr/bin/python import time f = open('/home/martin/Downloads/a.txt') while 1: for line in f: print line; time.sleep(1);
    GaleomagaGaleomaga
    Oct 5, 2013 at 7:38 am
    Oct 7, 2013 at 9:52 am
  • Firstly, in Python circles we prefer to call them "attributes" rather than variables. Since this is Python, it is trivially easy to test this for yourself. Start an interactive Python interpreter, ...
    Steven D'ApranoSteven D'Aprano
    Oct 1, 2013 at 12:19 am
    Oct 10, 2013 at 11:51 pm
  • Tim delaney said: "Because there's no chance with the brilliance you display that there could be any possibility of login details being kept in plaintext in your database. And of course your database ...
    ΝίκοςΝίκος
    Oct 2, 2013 at 12:20 pm
    Oct 2, 2013 at 10:48 pm
  • I have to define a function add(c1, c2), where c1 and c2 are capital letters; the return value should be the sum (obtained by converting the letters to numbers, adding mod 26, then converting back to ...
    KjakupakKjakupak
    Oct 8, 2013 at 2:28 pm
    Oct 20, 2013 at 8:33 am
  • try: cur.execute( '''SELECT host, city, useros, browser, ref, hits, lastvisit FROM visitors WHERE counterID = (SELECT ID FROM counters WHERE url = %s) ORDER BY lastvisit DESC''', page ) data = ...
    Νίκος ΑλεξόπουλοςΝίκος Αλεξόπουλος
    Oct 20, 2013 at 11:30 pm
    Oct 27, 2013 at 11:52 am
  • Hi! I am looking for an example of a UNICODE to ASCII conversion example that will remove diacritics from characters (and leave the characters, i.e., Kl?ft to Kluft) as well as handle the conversion ...
    CaldwellinvaCaldwellinva
    Oct 18, 2013 at 8:45 pm
    Oct 20, 2013 at 9:11 am
  • Am I the only one who finds this function super useful? def _code_file() : return os.path.abspath(inspect.getsourcefile(_code_file)) I've got one in every script. It's the only one I have to copy ...
    Peter CacioppiPeter Cacioppi
    Oct 27, 2013 at 2:23 am
    Oct 28, 2013 at 12:34 am
  • Hello all, I am kind of new to python. I am currently trying to make and use a list/array of sockets in a program. So I have declared an array as follows: myCSocks = ['CSock1', 'CSock2', 'CSock3', ...
    Theelder777Theelder777
    Oct 26, 2013 at 9:41 pm
    Oct 27, 2013 at 8:53 am
  • Hi Guys, Good Morning! How are you all doing? I am in need of your help. I am stuck in a problem. I want to write my own Screenshot Taking program in Python for Mac OS X. Example : Whenever Command + ...
    Pratik MehtaPratik Mehta
    Oct 19, 2013 at 10:12 pm
    Oct 24, 2013 at 4:00 am
  • Hi everyone, I'm trying to create a simple maze program. When the user finishes the maze, I want to print in big letters "You Win!" and when the user hits a wall, I want the user to go back to the ...
    BaujacobBaujacob
    Oct 13, 2013 at 9:52 pm
    Oct 14, 2013 at 10:58 pm
  • I'm trying to find out which version of glibc Python is using. I need a fix that went into glibc 2.10 back in 2009. (http://udrepper.livejournal.com/20948.html) So I try the recommended way to do ...
    John NagleJohn Nagle
    Oct 12, 2013 at 6:34 am
    Oct 13, 2013 at 6:06 pm
  • I've read a couple of articles about this, but still not sure. When someone talks about a closure in another language (I'm learning Lua on the side), is that the same concept as a decorator in ...
    TimTim
    Oct 10, 2013 at 1:51 pm
    Oct 14, 2013 at 4:39 pm
  • I think this is a bug in Python's UTF-8 handling, but I'm not sure. If I've read the Unicode FAQs correctly, you cannot encode *lone* surrogate code points into UTF-8 ...
    Steven D'ApranoSteven D'Aprano
    Oct 8, 2013 at 1:52 pm
    Oct 9, 2013 at 12:55 pm
  • hi.. getting some files via curl, and want to convert them from what i'm guessing to be unicode. I'd like to convert a string like this:: <div class="profName" <a href="ShowRatings.jsp?tid12168" ...
    BruceBruce
    Oct 26, 2013 at 8:11 pm
    Nov 1, 2013 at 9:18 am
  • Hi, We have a directory of large CSV files that we'd like to process in Python. We process each input CSV, then generate a corresponding output CSV file. input CSV - munging text, lookups etc. - ...
    Victor HooiVictor Hooi
    Oct 25, 2013 at 1:38 am
    Oct 26, 2013 at 8:53 am
  • Dear all, I have the following code in projects.py: ##################################################33 for row in xrange(len(uniqueFields)): instance = QtGui.QCheckBox(uniqueFields[row]) ...
    Mohsen PahlevanzadehMohsen Pahlevanzadeh
    Oct 16, 2013 at 10:14 pm
    Oct 17, 2013 at 7:54 pm
  • I really like the logic that Pythons "or" is not only short-circuit but non-typed. So I can say y = override or default and y won't necc be True or False. If override boolean evaluates to True ...
    Peter CacioppiPeter Cacioppi
    Oct 9, 2013 at 11:54 pm
    Oct 11, 2013 at 2:47 am
  • I am looping as for L in file.readlines(), where file is csv. L is a list of 3 items, eg, [{'a':1, 'b':2}, [1,2,3], 10] Note that the first item is a dir and 2nd is a list, so parsing with split ...
    Harvey GreenbergHarvey Greenberg
    Oct 6, 2013 at 1:08 am
    Oct 7, 2013 at 6:04 am
  • I am using IDLE, Python 2.7.2 on Windows 7, 64-bit. I have four questions: 1. Why is it that print unicode_object displays non-ASCII characters in the unicode object correctly, whereas print ...
    Stephen TuckerStephen Tucker
    Oct 11, 2013 at 8:16 am
    Oct 12, 2013 at 1:11 pm
  • Given this class: ... def afoo(*args): ... print(args) in Python 3 we can write the following class: ... def bfoo(*args): ... super(B, args[0]).afoo(*args[1:]) ... (<__main__.B object at ...
    Marco ButtuMarco Buttu
    Oct 9, 2013 at 3:44 pm
    Oct 11, 2013 at 6:17 am
  • I have a function that looks like the following: #--------------------------------- filename = 'c:\testfile.h5' f = open(filename,'r') data = f.read() q = multiprocessing.Queue() p = ...
    Isaac GergIsaac Gerg
    Oct 10, 2013 at 3:31 pm
    Oct 11, 2013 at 1:45 am
  • Hi folks, I'm trying to make some of Python class definitions behave like the ones I find in professional packages, such as Matplotlib. A Matplotlib class can often have a very large number of ...
    John LadaskyJohn Ladasky
    Oct 6, 2013 at 4:04 am
    Oct 8, 2013 at 8:30 am
  • problem is : Traceback (most recent call last): File "C:\Users\Marko\Desktop\hacker.org\XOR cypher.py", line 35, in <module print("Key-" + str(v?ti) + ": " + str("".join(tulemus2))) TypeError ...
    MarkotahtMarkotaht
    Oct 6, 2013 at 7:07 pm
    Oct 8, 2013 at 8:25 am
  • What is the difference between running multiple python scripts and a single multi-threaded script? May I know what are the pros and cons of each approach? Right now, my preference is to run multiple ...
    JLJL
    Oct 3, 2013 at 4:01 pm
    Oct 4, 2013 at 4:38 pm
  • In the following case: ... _Foo__a = 100 ... __a = 33 ... 33 I think this behavior, for a user who does not know the convention, could be a surprise. Should be raising an exception (in order to ...
    Marco ButtuMarco Buttu
    Oct 8, 2013 at 10:13 am
    Oct 9, 2013 at 7:34 pm
  • I am very new to python so I'll apologize up front if this is some boneheaded thing. I am using python and pyserial to talk to an embedded pic processor in a piece of scientific equipment. I ...
    Robert JacksonRobert Jackson
    Oct 6, 2013 at 10:47 pm
    Oct 7, 2013 at 1:38 am
  • How to create a program similar to paint, but the difference would be that the cursor would be always in the middle and the canvas moves or the camera is always fixed on the cursor as it moves around ...
    MarkotahtMarkotaht
    Oct 24, 2013 at 7:16 pm
    Nov 7, 2013 at 1:04 pm
  • Hi folks, My side job as a Python tutor continues to grow. In two weeks, I will start working with a high-school student who owns a MacBook Pro. I have had students with Linux systems (my preference) ...
    John LadaskyJohn Ladasky
    Oct 26, 2013 at 7:07 pm
    Nov 7, 2013 at 12:11 am
  • Hi, I am having an issue with something that would seem to have an easy solution, but which escapes me. I have configuration files that I would like to parse. The data I am having issue with is a ...
    MarcMarc
    Oct 27, 2013 at 9:09 pm
    Nov 4, 2013 at 1:28 am
Group Navigation
period‹ prev | Oct 2013 | next ›
Group Overview
grouppython-list @
categoriespython
discussions193
posts1,932
users266
websitepython.org

266 users for October 2013

Chris Angelico: 159 posts Mark Lawrence: 148 posts Steven D'Aprano: 123 posts Νίκος Αλεξόπουλος: 101 posts Terry Reedy: 67 posts Ben Finney: 56 posts Rusi: 52 posts Roy Smith: 51 posts Peter Cacioppi: 50 posts Ned Batchelder: 46 posts Mark Janssen: 44 posts Piet van Oostrum: 39 posts MRAB: 30 posts Antoon Pardon: 29 posts Steven D'Aprano: 28 posts Denis McMahon: 25 posts Neil Cerutti: 24 posts Ethan Furman: 22 posts Tim Chase: 22 posts Markotaht: 21 posts
show more
Archives