Search Discussions

200 discussions - 1,720 posts

  • I'm approaching the end of converting a large system from Python 2 to Python 3. Here's why you don't want to do this. The language changes aren't that bad, and they're known and documented. It's the ...
    John NagleJohn Nagle
    Mar 13, 2015 at 9:08 pm
    Mar 20, 2015 at 5:13 pm
  • This is more a question about standard terminology/conventions than about semantics - of course assuming I understand :-) Say I have a simple yielding function: def foo(x): yield x+1 yield x+2 And I ...
    Rustom ModyRustom Mody
    Mar 12, 2015 at 1:35 pm
    Apr 3, 2015 at 6:46 am
  • A lot of discussion was generated by the good, old fibonacci sequence. I have yet to find practical use for fibonacci numbers. However, the technique behind a sudoku solver come up every now and ...
    Marko RauhamaaMarko Rauhamaa
    Mar 25, 2015 at 11:39 am
    Mar 30, 2015 at 10:54 am
  • I always do single line comments with # but just for the sake of it I tried it with ''' ''' and it gives me a syntax error. In both the interpreter, and the source code text file, doing - a = 5 '''a ...
    Aditya Raj BhattAditya Raj Bhatt
    Mar 18, 2015 at 5:46 pm
    Apr 3, 2015 at 3:25 pm
  • 56


    <head <style type="text/css" body {color:black;} h1 {text-align:center;color:maroon;font-size:30px;font-style:normal;} td {font-size:12;font-style:monospace;} } </style <title {% block title %}{% ...
    Tiglath SuriolTiglath Suriol
    Mar 25, 2015 at 2:47 am
    Mar 27, 2015 at 1:14 pm
  • Hi, I'm looking for a way to supply a condition to an if-statement inside a function body when calling the function. I can sort of get what I want with using eval (see code below) but I would like to ...
    Manuel GrauneManuel Graune
    Mar 25, 2015 at 5:29 pm
    Mar 29, 2015 at 10:46 pm
  • Guys, please Help!!! I am trying to impress a girl who is learning python and want ask her out at the same time. Could you please come up with something witty incorporating a simple python line like ...
    Mar 5, 2015 at 1:34 am
    Mar 9, 2015 at 7:58 pm
  • Hello team , [root at localhost Python]# cat fibonacci-Sequence-3.py ## Example 2: Using recursion def fib(n): if n == 0: return 0 elif n == 1: return 1 else: return fib(n-1) + fib(n-2) print fib(5) ...
    Ganesh PalGanesh Pal
    Mar 23, 2015 at 4:01 pm
    Mar 24, 2015 at 5:22 pm
  • The Python 2 module "fcgi" is gone in Python 3. The Python 3 documentation at https://docs.python.org/3/howto/webservers.html recommends "flup" and links here: https://pypi.python.org/pypi/flup/1.0 ...
    John NagleJohn Nagle
    Mar 29, 2015 at 6:57 pm
    Mar 30, 2015 at 11:30 pm
  • It's been brought up on Stack Overflow that the "in" operator (on tuples, and by my testing on dict and list, as well as dict lookup) uses object identity as a shortcut, and returns true immediately ...
    Mar 5, 2015 at 10:26 pm
    Mar 7, 2015 at 2:37 am
  • Hi everyone, I'm writing a document in restructured text and I'd like to convert it to latex for printing. To accomplish this I've used semi-successfully pandoc and the wrapper pypandoc. My biggest ...
    Mar 2, 2015 at 7:59 am
    Mar 3, 2015 at 10:27 pm
  • I am using PLY for a parsing task which uses re for the lexical analysis. Does anyone know what regular expression to use for a sequence of letters? There is a class for alphanumerics but I can't ...
    Antoon PardonAntoon Pardon
    Mar 9, 2015 at 10:23 am
    Mar 10, 2015 at 8:46 am
  • Below are the function's requirements. I am torn between using the OS module or some other quick and dirty module. In addition, my ideal assumption that this could be cross-platform. "Records" refers ...
    Saran AhluwaliaSaran Ahluwalia
    Mar 29, 2015 at 11:32 am
    Apr 4, 2015 at 2:16 am
  • I've been hosting Python projects on Google Code, and they're shutting down. Damn. What is the recommended replacement for Code Hosting that works reliably with PyPi and pip?
    Josh EnglishJosh English
    Mar 12, 2015 at 10:26 pm
    Mar 14, 2015 at 5:03 am
  • I would like to propose a new piece of syntax for the python language; .= In short, the operator is form of syntactic sugar, for instance consider the following code: hello = "hello world " hello = ...
    Jamie WillisJamie Willis
    Mar 27, 2015 at 8:24 pm
    Mar 29, 2015 at 4:50 am
  • I am creating a tool to search a filesystem for one simple string. I cannot get the syntax correct. Thank you in advance for your help. import sys import re import os path='/' ...
    Mar 24, 2015 at 6:13 pm
    Mar 26, 2015 at 12:04 pm
  • I have a list containing 9600 integer elements - each integer is either 0 or 1. Starting at the front of the list, I need to combine 8 list elements into 1 by treating them as if they were bits of ...
    Mar 25, 2015 at 3:13 am
    Mar 26, 2015 at 2:53 am
  • Hi all I like dict comprehensions, but I don't use them very often, so when I do I need to look up the format. I always struggle to find the information in the Library Reference. The obvious ...
    Frank MillmanFrank Millman
    Mar 16, 2015 at 5:25 am
    Mar 18, 2015 at 8:39 am
  • Hi, What is the currently most Pythonic way for doing deep comparisons between dicts? For example, say you have the following two dictionaries a = { 'bob': { 'full_name': 'bob jones', 'age': 4, ...
    Victor HooiVictor Hooi
    Mar 20, 2015 at 2:00 am
    Apr 1, 2015 at 3:53 am
  • On an older WinXP SP2 box with python2.6 that's been running this process fine for years, this week we're seeing: - return val (Pdb) val *** NameError: name 'val' is not defined (Pdb) l 139 try: 140 ...
    Mar 13, 2015 at 10:10 pm
    Mar 17, 2015 at 8:48 pm
  • Hello, For a new project, a person recommande me to use Python 3 can I use Python 3 with a Python 2 y module ex : pyQt 4 ? Tanks for your answer Best regards mparchet
    Michael ParchetMichael Parchet
    Mar 9, 2015 at 10:30 pm
    Mar 11, 2015 at 9:38 pm
  • Hi all, Is there a way to generate permutations of large arrays of sizes say,in the hundreds, faster than in the time itertools.permutations() can return? ?-Abhiram.R *~Never give up* An HTML ...
    Abhiram RAbhiram R
    Mar 6, 2015 at 6:44 am
    Mar 6, 2015 at 8:24 pm
  • 16


    I have a csv file, the first item on a line is the date in the format 2015-03-02 I try to get that as a date by date(row[0]), but it barfs, replying "Expecting an integer". (I am really trying to get ...
    Mar 2, 2015 at 11:55 am
    Mar 2, 2015 at 6:32 pm
  • Hello, I'm new to python and I'm trying to find the right way to solve this issue I have. I'm trying to sort this list by name and then by version numbers. The problem I'm having is that I can not ...
    Charles HeizerCharles Heizer
    Mar 2, 2015 at 6:17 pm
    Mar 3, 2015 at 5:44 pm
  • Hi. I have used python to provide a web service app, it will running 7*24, and it will return some data to client by API. Now I want to add some extra data in return data, ex, "status = 1", and I ...
    Jerry OELooJerry OELoo
    Mar 26, 2015 at 3:26 am
    Mar 27, 2015 at 6:29 pm
  • I'm fairly new to Python, so I don't know if the following is me abusing the programming language idioms, or simply a mistake of my IDE code inspection routine. I have a singleton Map class which is ...
    Mario FigueiredoMario Figueiredo
    Mar 11, 2015 at 11:33 pm
    Mar 12, 2015 at 8:16 pm
  • Hi! What is the best way to read a file that begins with some few text lines and whose rest is a binary stream? As an exmaple ... files .pnm. Thanks for any comments/help on this.
    Paulo da SilvaPaulo da Silva
    Mar 10, 2015 at 12:45 am
    Mar 11, 2015 at 7:29 pm
    Mar 2, 2015 at 7:37 pm
    Apr 2, 2015 at 1:17 pm
  • Hello, there is an app, written in Python, which stores few bytes of datas in a single file. The application uses threads. Every thread can modify the file, but only one at a time. I'm using a lock ...
    Ervin HegedüsErvin Hegedüs
    Mar 31, 2015 at 2:50 pm
    Apr 1, 2015 at 11:51 pm
  • [I thought I'd seen a discussion of this recently, but I can't seem to find the right keyword.] I need to automate operation of a Windows application. It's a conformance test app from a standards ...
    Grant EdwardsGrant Edwards
    Mar 20, 2015 at 5:55 pm
    Apr 1, 2015 at 1:14 am
  • I have a simple script that takes user input (for an Employee) such as name, age, etc then puts in an sqlite3 database. The script worked fine until I realized one problem. The age input field is ...
    Chris KavanaghChris Kavanagh
    Mar 18, 2015 at 2:41 am
    Mar 19, 2015 at 9:42 am
  • I have this tweak I'd like to make to the top command (Linux only is fine). Most of the time I want to see just one user or all users. Every now and again though, I'd like to see all users except ...
    Skip MontanaroSkip Montanaro
    Mar 13, 2015 at 3:17 pm
    Mar 15, 2015 at 9:23 am
  • Greetings, $ time curl -I https://pypi.python.org/pypi/ HTTP/1.1 200 OK Date: Tue, 10 Mar 2015 10:24:30 GMT ... Content-Length: 9870689 curl -I https://pypi.python.org/pypi/ 0.02s user 0.00s system ...
    Miki TebekaMiki Tebeka
    Mar 10, 2015 at 11:12 am
    Mar 11, 2015 at 1:49 am
  • Hello all , Just a little question about function's default arguments. Let's say I have this function: def my_fun(history=False, built=False, current=False, topo=None, full=False, file=None): if ...
    Ivan EvstegneevIvan Evstegneev
    Mar 25, 2015 at 5:43 pm
    Mar 26, 2015 at 10:51 am
  • Hi, I have a perl script named "my_eth-traffic.pl" which calculates the tx and rx speed of the Ethernet interface in Mb. I want to run this script from another script and want the output in other ...
    Robert CloveRobert Clove
    Mar 18, 2015 at 10:35 am
    Mar 20, 2015 at 3:15 pm
  • <SCRIPT LANGUAGE="Javascript" function naiveAdd(base,arrOne,arrTwo) { if (arrOne.length =arrTwo.length) {length=arrOne.length;} else {length=arrTwo.length;} out=""; remainder=0; for ...
    Jonas ThornvallJonas Thornvall
    Mar 15, 2015 at 6:07 pm
    Mar 16, 2015 at 7:44 am
  • I've just come across this http://www.stavros.io/posts/brilliant-or-insane-code/ as a result of this http://bugs.python.org/issue23695 Any and all opinions welcomed, I'm chickening out and sitting ...
    Mark LawrenceMark Lawrence
    Mar 18, 2015 at 12:35 am
    Mar 18, 2015 at 3:28 pm
  • Python 3.4 provides auto-completion facility within a Python console embedded in a command line terminal. But apparently this facility doesn't allow the user to complete with standard module name ...
    Mar 16, 2015 at 4:23 pm
    Mar 18, 2015 at 1:07 am
  • My python program was running for over six weeks. Then the idle gui stopped opening. I have reinstalled several times but it doesn't work. Any idea?
    Mar 13, 2015 at 8:58 pm
    Mar 14, 2015 at 10:59 pm
    Mar 3, 2015 at 6:40 pm
    Apr 2, 2015 at 1:21 pm
  • PDF Converter for Mac is a fantastic and easyto-use instrument for converting PDF documents on Macos. Macintosh PDF Converter can pdf to excel converter to Word, Shine, PowerPoint, EPUB, Text format ...
    Mar 24, 2015 at 7:05 am
    Mar 28, 2015 at 3:05 pm
  • Reading PEP 257 and 258 I got the impression that I could document module attributes and these would be available in the __doc__ attribute of the object. So things like the one below are something I ...
    Mario FigueiredoMario Figueiredo
    Mar 24, 2015 at 8:55 am
    Mar 27, 2015 at 7:49 am
  • I'm posting this here because I have no clue who the heck the mailing list manager is. I got this message: Your membership in the mailing list Python-ideas has been disabled due to excessive bounces ...
    Ryan GonzalezRyan Gonzalez
    Mar 12, 2015 at 9:56 pm
    Mar 13, 2015 at 8:27 am
    Mar 1, 2015 at 11:41 am
    Apr 2, 2015 at 1:19 pm
  • Hi, I wrote simple asyncio program (see below) and I'm not sure if I understand behavior correctly. I have print_tasks coroutine which prints each task in a loop by using Task.all_tasks function. I ...
    Łukasz LigowskiŁukasz Ligowski
    Mar 27, 2015 at 8:33 am
    Mar 27, 2015 at 11:27 pm
  • I have a numeric value, possibly a float, Decimal or (improper) Fraction, and I want the fractional part. E.g. fract(2.5) should give 0.5. Here are two ways to do it: py x = 2.5 py x % 1 0.5 py x - ...
    Steven D'ApranoSteven D'Aprano
    Mar 23, 2015 at 12:52 pm
    Mar 26, 2015 at 10:02 pm
  • Is there a way of "adding" 4 hours and getting a jump of 5 hours on March 8th, 2015 (due to Daylight Savings Time), without hardcoding when to spring forward and when to fall back? I'd love it if ...
    Dan StrombergDan Stromberg
    Mar 24, 2015 at 10:24 pm
    Mar 25, 2015 at 3:10 pm
  • Hi, I am currently a "Progress Programmer" and looking for new challenges! It seems that Python is a good language to get familiar with and I would like some advice. I am on the look-out for a new ...
    Binki CBinki C
    Mar 11, 2015 at 9:19 am
    Mar 12, 2015 at 8:55 am
  • This may seem off-topic, but it's an issue for my roundup server which is written in Python, so hopefully that will buy me some slack. ;) And, yes, I did post a message to the Roundup Users mailing ...
    Ethan FurmanEthan Furman
    Mar 4, 2015 at 6:33 am
    Mar 6, 2015 at 10:51 pm
  • I have the following directory /home/me/projects/modulename. I update PYTHONPATH using the following command: export PYTHONPATH=$PYTHONPATH:/home/me/projects/modulename It seems to have been added ...
    Mar 4, 2015 at 3:25 am
    Mar 4, 2015 at 9:14 am
Group Navigation
period‹ prev | Mar 2015 | next ›
Group Overview
grouppython-list @

258 users for March 2015

Chris Angelico: 170 posts Steven D'Aprano: 135 posts Mark Lawrence: 91 posts Rustom Mody: 80 posts Marko Rauhamaa: 79 posts Ian Kelly: 71 posts Mario Figueiredo: 51 posts Dave Angel: 46 posts Ben Finney: 43 posts Paul Rubin: 35 posts Terry Reedy: 35 posts Michael Torrie: 28 posts Tiglath Suriol: 28 posts Cameron Simpson: 19 posts Gregory Ewing: 19 posts Thomas 'PointedEars' Lahn: 19 posts Peter Otten: 18 posts BartC: 15 posts Grant Edwards: 15 posts Sohcahtoa82: 14 posts
show more