Search Discussions
-
366
Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)
Hi list, Can anyone - maybe one of the Python language core team, or someone with knowledge of the internals of Python - can explain why this code works, and whether the different occurrences of the ...Vasudev Ram
Mar 21, 2014 at 8:42 pm
Apr 9, 2014 at 2:26 am -
Dumb noob questions: I've installed python 3.3 on my Slack box, which by default comes with python 2.7. I know how to fire up the different IDLE environments, but how do I differentiate between the ...
Notbob
Mar 20, 2014 at 2:58 pm
Mar 21, 2014 at 12:09 pm -
If Python is not a fnctional language, then which programming paradigmis dominant?
Musicdenotation
Mar 2, 2014 at 11:14 pm
Mar 5, 2014 at 12:11 pm -
greetings, I would like to create a lamda as follows: ? = lambda n: sqrt(n) On my keyboard mapping the "problem" character is alt-v which produces the radical symbol. When trying to set the symbol as ...
Mark H Harris
Mar 25, 2014 at 6:30 pm
Apr 2, 2014 at 5:55 am -
One of my roles on this newsgroup is to periodically whine about stupidities in the Python datetime module. This is one of those times. I have some code which computes how long ago the sun set. Being ...
Roy Smith
Mar 26, 2014 at 12:58 am
Mar 28, 2014 at 3:25 pm -
Hi all I know I *should* be using a Source Control Management system, but at present I am not. I tried to set up Mercurial a couple of years ago, but I think I set it up wrongly, as I got myself ...
Frank Millman
Mar 17, 2014 at 1:06 pm
Mar 25, 2014 at 5:41 am -
Imo the lesson here is never write in low level c. Use modern languages with well designed exception handling. -- ----Android NewsGroup Reader---- http://www.piaohong.tk/newsgroup
Neal Becker
Mar 3, 2014 at 2:17 pm
Mar 7, 2014 at 2:39 am -
if (a, b) != (None, None): or if a != None != b: Preference? Pros? Cons? Alternatives? :D
Contact Trigon
Mar 29, 2014 at 6:56 pm
Mar 30, 2014 at 10:48 pm -
Hi All, I see python now has a plethora of async frameworks and I need to try and pick one to use from: - asyncio/tulip - tornado - twisted From my side, I'm looking to experimentally build a network ...
Chris Withers
Mar 10, 2014 at 8:38 pm
Mar 21, 2014 at 6:34 pm -
Hi everyone! This is regarding the inbuilt 'complex' function. The python docs say: "Note: When converting from a string, the string must not contain whitespace around the central + or - operator ...
Jayanth Koushik
Mar 15, 2014 at 4:26 pm
Mar 19, 2014 at 7:35 pm -
Hello everybody, I implemented a password validation with a Python 2.7.5 script in OpenSUSE 13.1. The user calls it passing 'login' and 'password' as arguments. I made a dictionary in the format ...
Renato
Mar 1, 2014 at 5:49 pm
Mar 3, 2014 at 6:46 pm -
Hi everybody, I need to install Python 3.4 final urgently, because my IDE stopped supporting Python 3.4 beta2, and I need it urgently to work. I downloaded it, but the MSI won't install. It didn't ...
cool-RR
Mar 21, 2014 at 10:05 pm
Mar 23, 2014 at 1:07 am -
Hi guys, My env: centos 6.5 64 bit; gdb 7.1; python 2.6.6 I wanna use gdb to attach my running python scripts. Successfully import libpython in gdb, but seems all py operations failed to read python ...
Wesley
Mar 7, 2014 at 2:03 am
Mar 11, 2014 at 7:31 am -
I think I understand the difference between deep vs. shallow copies but I was bitten by this: with open(os.path.join('path', 'foo.txt', 'rb') as txt: reader = csv.reader(txt) data = [row.append(year) ...
Alex van der Spek
Mar 12, 2014 at 2:25 pm
Mar 14, 2014 at 6:17 am -
I have a script that forks off other processes and attempts to manage them. Here is a stripped down version of the script: self.sleepTime = 300 self.procs = {} self.startTimes = {} self.cmd = ...
Larry Martell
Mar 5, 2014 at 10:27 pm
Mar 14, 2014 at 2:10 pm -
hi folks, Python Decimal Library dmath.py v0.3 Released https://code.google.com/p/pythondecimallibrary/ This code provides the C accelerated decimal module with scientific/transcendental functions ...
Mark H. Harris
Mar 3, 2014 at 11:34 am
Mar 5, 2014 at 7:09 am -
Hi, ALL, I'm getting this: timestamp out of range for platform localtime()/gmtime() function trying to convert the timestamp with milliseconds into the datetime object. The first hit of Google gives ...
Igor Korot
Mar 4, 2014 at 8:57 pm
Mar 5, 2014 at 4:11 am -
I'm trying to use python classes and members to define complex data entry forms as a meta language The idea is to use a nice clean syntax like Python to define form content, then render it as HTML ...
Sells, Fred
Mar 27, 2014 at 8:56 pm
Mar 28, 2014 at 1:04 pm -
hi folks, I am posting to share a File Reader Generator which I have been playing with, that simplifies reading of text files on-demand: like log files, config files, small record flat data-bases, ...
Mark H Harris
Mar 15, 2014 at 9:38 pm
Mar 16, 2014 at 10:36 am -
So I finally got enough data and enough of an understanding to write some unit tests for my code. These aren't the first unit tests I've written, but the behavior I'm getting is baffling. I'm using ...
Ethan Furman
Mar 11, 2014 at 8:58 pm
Mar 13, 2014 at 2:27 am -
I understand that in an object method the first argument in the object itself, called self. However, it doesn't have to be called self, and can be called anything. So my question is why is it called ...
Westley Martínez
Mar 3, 2014 at 6:16 am
Mar 6, 2014 at 5:46 pm -
Id like to ask.. do you know any modern looking GUI examples of windows software written in python? Something like this maybe: http://techreport.com/r.x/asus-x79deluxe/software-oc.jpg (or hopefully ...
D. Xenakis
Mar 30, 2014 at 11:16 pm
Apr 3, 2014 at 10:44 pm -
I'm confused by the behaviour of the following python-script I wrote: #!/usr/bin/env python #I first made a data file 'test.dat' with the following content #1.0 2 3 #4 5 6.0 #7 8 9 import numpy as np ...
Jean Dubois
Mar 25, 2014 at 10:26 am
Mar 26, 2014 at 8:48 am -
Hi all. I was wondering if someone could explain gc.get_objects() in a bit more detail to me. Does it return a list of 'all objects known to Python'? Only some of them? Which does it return? Which it ...
Jurko Gospodnetić
Mar 12, 2014 at 7:34 pm
Mar 17, 2014 at 5:53 pm -
OK, I know that Unicode data is stored in an encoding on disk. But how is it stored in RAM? I realize I shouldn't write code that depends on any relevant implementation details, but knowing some of ...
Dan Stromberg
Mar 9, 2014 at 2:08 am
Mar 9, 2014 at 2:53 pm -
Hello, i am working on a project for learning python and I?m stuck. The directions are confusing me. Please keep in mind I?m very ne to this. The directions are long so I?ll just add the paragraphs ...
Scott W Dunning
Mar 1, 2014 at 6:46 am
Mar 3, 2014 at 7:10 am -
Hi Everybody actually i want to run python on web browser. I downloaded python and installed but i'm not able to run it in browser but it running using command prompt. so i trying to install mod_wsgi ...
Rborole06
Mar 23, 2014 at 5:09 pm
Mar 27, 2014 at 1:01 am -
11
loop
Hello, I'm trying to create a for loop that starts at 100 and goes to 10Mllion. The increments are like this: 100, 1000, 10000, ..... Basicaly adding a zero each iteration. I'm having problems trying ...Pabloeruggeri
Mar 24, 2014 at 12:35 am
Mar 24, 2014 at 10:58 am -
Is it possible to somehow 'steal' bytearray's buffer and make it a read-only bytes? I failed to find a way to do this, and would like to make sure. My use case is, I would expect, fairly common. I ...
Juraj Ivančić
Mar 3, 2014 at 12:07 am
Mar 4, 2014 at 4:19 pm -
I am trying to get all the element data from the rss below. The only thing I am pulling is the first element. I don't understand why the for loop does not go through the entire rss. Here is my ...
Teddybubu
Mar 22, 2014 at 11:21 am
Mar 23, 2014 at 10:44 pm -
I was wondering if a better programmer than I could explain if the removal of OO features in golang really does offer an great benefit over python. An article I was reading ran through a brief ...
Flebber
Mar 10, 2014 at 4:49 am
Mar 11, 2014 at 8:21 pm -
No. This has to be a better way to flatten lists: [1, 2, 3, 4, 5, 6, 7, 8, 9] marcus
Mark H Harris
Mar 28, 2014 at 9:56 pm
Mar 29, 2014 at 3:59 pm -
Hello good people I am working on a caeser cipher program for class. However, I ran into a problem with my outputs. Up to a certain point for example: 1. two('y', 'z') Would give a '\x92' output ...
Dtran Ru
Mar 21, 2014 at 2:50 am
Mar 22, 2014 at 5:29 pm -
Hi list, I noticed a behavior change on Thread._stop() with Python 3.4. I know the method is an undocumented "feature" itself, but some projects are using it, and now they fail. A minimized snippet ...
Felix Yan
Mar 17, 2014 at 5:18 pm
Mar 17, 2014 at 8:05 pm -
Hi Can anyone help with this problem Create a big box out of n rows of little o's for any desired size n. Use an input statement to allow the user to enter the value for n and then print the properly ...
Geniusrko
Mar 1, 2014 at 7:12 pm
Mar 2, 2014 at 9:48 pm -
Multiple times, I've seen someone want something like what C-style languages offer where assignment is done in a test, something like if (m = re.match(some_string)): do_something(m) So when I ...
Tim Chase
Mar 27, 2014 at 4:08 pm
Mar 28, 2014 at 8:38 am -
I can't get this to work. It runs but there is no output when I try it on a file. #!/usr/bin/python import os import sys import re from datetime import datetime #logDir = ...
James Smith
Mar 27, 2014 at 3:23 am
Mar 27, 2014 at 3:49 pm -
8
test
test please disregardMark H. Harris
Mar 6, 2014 at 1:36 am
Mar 17, 2014 at 7:01 pm -
I've stumbled on a problem with the python-sybase module. If I have a stored procedure like this: create stored procedure test_proc as return 1 and call it from Python like this ...
Skip Montanaro
Mar 12, 2014 at 9:44 pm
Mar 13, 2014 at 5:32 pm -
Hi! I would like to assure that when writing to a file I do not overwrite an existing file, but I'm unsure which is the best way to approach to this problem. As I can see, there are at least two ...
Zoom
Mar 12, 2014 at 12:29 pm
Mar 13, 2014 at 2:49 am -
Hello: I can't figure out how to create an instance of a python class from 'C++': ( I am relatively new to Python so excuse some of the following. ) In a .py file I create an ABC and then specialize ...
Bill
Mar 5, 2014 at 12:14 am
Mar 12, 2014 at 5:10 pm -
How do I read a binary file, find/identify a character string and replace it with another character string and write out to another file? Its the finding of the string in a binary file that I am not ...
Loial
Mar 4, 2014 at 12:27 pm
Mar 5, 2014 at 5:46 pm -
Django views.py: ... pwd = os.path.dirname(os.path.realpath(__file__ )) home_lastmod = strftime('%Y-%m-%dT%H:%m:%SZ',gmtime(os.path.getmtime(pwd+'/templates/art_index.html'))) ... The template gives ...
Jaap van Wingerde
Mar 3, 2014 at 1:35 pm
Mar 4, 2014 at 5:43 pm -
Haven't seen any mention of it on this list yet, but since it's such an obvious flaw in quite a number of programming languages, here's a good article on the recent security bug in iOS, which was due ...
Stefan Behnel
Mar 2, 2014 at 10:41 am
Mar 4, 2014 at 11:02 am -
Hello, I'm trying to use urllib and urllib2 to open an url + login_data in a for loop. How can I display when successfully logged in and how to show when the login is denied? I've tried use this ...
Marcus
Mar 3, 2014 at 12:32 pm
Mar 3, 2014 at 1:47 pm -
And lines are delimited entities. A text file is a sequence of lines, separated by certain characters. That's not a tidy way to iterate, that's a way to iterate and then do stuff. Compare: for line ...
Chris Angelico
Mar 23, 2014 at 1:37 am
Mar 27, 2014 at 4:24 pm -
Anybody else having trouble getting to Github? I'm trying to get to the pythondotorg issue tracker: https://github.com/python/pythondotorg/issues Thx, Skip
Skip Montanaro
Mar 21, 2014 at 1:22 pm
Mar 22, 2014 at 10:19 am -
Hello. I want to use a c library. It is a complete graphic widget set. Here code working. But i have problem with the callback function. The callback is executed while ClikOnForm is executed but i ...
Fiensproto
Mar 20, 2014 at 11:16 pm
Mar 22, 2014 at 12:22 am -
The current (2.7; maybe 3.x?) logging module doesn't have any sort of "clear out all the current handlers" method. I can hack it by doing log = logging.getLogger() # get the root logger del ...
Tim Chase
Mar 16, 2014 at 2:58 am
Mar 16, 2014 at 6:50 pm
Group Overview
group | python-list |
categories | python |
discussions | 186 |
posts | 2,093 |
users | 279 |
website | python.org |
279 users for March 2014
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)