Search Discussions

198 discussions - 1,650 posts

  • http://www.slideshare.net/pydanny/python-worst-practices Any that should be added to this list? Any that be removed as not that bad? -- My fellow Pythonistas, ask not what our language can do for ...
    Mark LawrenceMark Lawrence
    Feb 25, 2015 at 8:45 pm
    Mar 7, 2015 at 3:11 pm
  • Hello, Working with pyshp, this is my code : import shapefile inFile = shapefile.Reader("blah") for sr in inFile.shapeRecords(): rec = sr.record[2] print("Output : ", rec, type(rec)) Output ...
    Pierrick BrihayePierrick Brihaye
    Feb 24, 2015 at 10:49 am
    Mar 8, 2015 at 1:45 am
  • Hi all, I'm working on a project that will involve the use of callbacks, and I want to bounce an idea I had off of everyone to make sure I'm not developing a bad idea. Note that this is for python ...
    Cem KaranCem Karan
    Feb 21, 2015 at 2:44 am
    Mar 2, 2015 at 3:34 pm
  • Hi all sqlite3 does not have a DATE type, but the python module does a pretty good job of providing one - <sqlite3.Cursor object at 0x00FE9BE0 <sqlite3.Cursor object at 0x00FE9BE0 <sqlite3.Cursor ...
    Frank MillmanFrank Millman
    Feb 18, 2015 at 6:19 am
    Feb 21, 2015 at 7:27 pm
  • I'm not confusing anything. I'm fully aware of the differences between what C or Pascal does and what Python does. But I'm also aware of the similarities. Compilation consists of many different ...
    Steven D'ApranoSteven D'Aprano
    Feb 1, 2015 at 3:06 am
    Feb 8, 2015 at 10:17 am
  • As an engineer, I can quickly knock together behavioural models of electronic circuits, complete units, and control systems in Python, then annoyingly in a few recent cases, have to re-write in C for ...
    Dave FarranceDave Farrance
    Feb 22, 2015 at 12:45 pm
    Feb 27, 2015 at 9:40 pm
  • In http://optarbvalintenc.blogspot.nl/ I propose a new way to encode arbitrarily valued integers and the python code that can be used as a reference for practical implementations of codecs. The ...
    Janhein VanderburgJanhein Vanderburg
    Feb 17, 2015 at 11:22 am
    Feb 20, 2015 at 8:58 am
  • http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/
    Roy SmithRoy Smith
    Feb 24, 2015 at 9:34 pm
    Feb 26, 2015 at 7:33 am
  • Scheme is forty years old, having come out in 1975. Python is 24 years old, having come out in 1991. If Scheme hasn't caught up with Python by now, it never will. -- Steven
    Steven D'ApranoSteven D'Aprano
    Feb 1, 2015 at 2:27 am
    Feb 2, 2015 at 11:15 pm
  • I know this is way off-topic for this group, but I figured if anyone in the online virtual communities I participate in would know the answer, the Pythonistas would... Google has so far not been my ...
    Skip MontanaroSkip Montanaro
    Feb 10, 2015 at 9:05 pm
    Feb 13, 2015 at 4:46 pm
  • "Nature", one of the world's premier science journals, has published an excellent article about programming in Python: http://www.nature.com/news/programming-pick-up-python-1.16833 -- Steve
    Steven D'ApranoSteven D'Aprano
    Feb 12, 2015 at 8:46 am
    Feb 15, 2015 at 10:16 pm
  • hello I dont understand why there is a comma just after line in the following command: line, = plt.plot(x, np.sin(x), '--', linewidth=2) I never saw that before Found here ...
    Feb 4, 2015 at 2:08 pm
    Feb 6, 2015 at 2:03 pm
  • I have need to search a directory and return the name of the most recent file matching a given pattern. Given a directory with these files and timestamps, q.pattern1.abc Feb 13 r.pattern1.cdf Feb 12 ...
    Jason FriedmanJason Friedman
    Feb 19, 2015 at 4:44 am
    Feb 22, 2015 at 2:17 pm
  • I wrote a little script that acts like a proxy, you just give it a URL and it will fetch the content and display it back to you. For some reason, this proxy blocks sometimes and refuses to serve any ...
    Feb 2, 2015 at 9:54 am
    Feb 8, 2015 at 2:13 pm
  • According to the documentation of the "g" floating-point format, trailing zeros should be stripped from the resulting string: """ General format. For a given precision p = 1, this rounds the number ...
    Hrvoje NikšićHrvoje Nikšić
    Feb 11, 2015 at 8:02 pm
    Feb 15, 2015 at 12:39 am
  • I'm trying to write a correct iteration over a doubly indexed container, and what I've got so far is: def __next__ (self): for row in range(self._rows): for col in range(self._cols): if ...
    Charles HixsonCharles Hixson
    Feb 9, 2015 at 7:14 pm
    Feb 10, 2015 at 5:33 pm
  • So I'm trying to wrap my head around packaging issues, and according to some quick Google searches I'm not the only one. I'm developing applications of various size for internal deployment. When I'm ...
    Rob GaddiRob Gaddi
    Feb 6, 2015 at 9:17 pm
    Feb 10, 2015 at 11:59 am
  • Hello, I need some help in downloading videos from flash applications in web using python. Is there any lib to deal with flash player using python? The videos I need to download are, in fact, live ...
    Gabriel FerreiraGabriel Ferreira
    Feb 2, 2015 at 4:00 pm
    Feb 3, 2015 at 11:54 am
  • I've been working with machine learning for a while. Many of the standard packages (e.g., scikit-learn) have fitting algorithms which run in single threads. These algorithms are not themselves ...
    John LadaskyJohn Ladasky
    Feb 26, 2015 at 2:35 am
    Feb 27, 2015 at 6:55 pm
  • Hi I want to use the Python 3.4 interpreter interactively, via a PuTTY ssh session. Python is running on Centos 5. Currently, the arrow keys do not work: $ /usr/local/bin/python3.4 Python 3.4.2 ...
    David AldrichDavid Aldrich
    Feb 23, 2015 at 1:44 pm
    Feb 25, 2015 at 8:39 am
  • this is the error in the following python code, can any one help me error{Traceback (most recent call last): File "C:\Python27\Scripts\BeOk\getBeOKExperts.py", line 6, in <module from BeautifulSoup ...
    Feb 19, 2015 at 8:35 am
    Feb 21, 2015 at 3:44 am
  • Official Python documentation very frequently invokes a mysterious *container* data structure. The PLR manual explains : -------------------------- Some objects contain references to other objects ...
    Feb 17, 2015 at 9:21 pm
    Feb 20, 2015 at 6:38 pm
  • I tried using Interactive Python with a PyQt4 console: "IPython.exe qtconsole" But got a "ImportError: IPython requires PyQT4 = 4.7, found 4.10.4" Looking at Ipython's check (in ...
    Gisle VanemGisle Vanem
    Feb 12, 2015 at 4:45 pm
    Feb 13, 2015 at 3:10 am
  • Hi, For some scripts, I write in a a more functional way, using a lot of small functions outside of any class. Although it makes the code clearer for specific cases, I have found that it makes ...
    Feb 28, 2015 at 11:12 pm
    Mar 2, 2015 at 4:51 pm
  • I really like pymongo. And I really like Python. But one thing my fingers really get tired of typing is someDoc[?_?id?] This just does not roll of the fingers well. Too many ?reach for modifier keys? ...
    Travis GriggsTravis Griggs
    Feb 4, 2015 at 4:50 pm
    Feb 5, 2015 at 9:11 pm
  • hi [2, 5] [2, 5] Ok, a change in a or b doesn't impact Li. This works as expected Is there a way to define a container object able to store some variables so that a change of a variable make a change ...
    Feb 23, 2015 at 12:55 pm
    Feb 24, 2015 at 8:18 am
  • Hello all, I'm using the following pattern for db access that requires me to close the connection as soon as it is not needed: import sqlite3 as lite try: db = lite.connect('data.db') except ...
    Mario FigueiredoMario Figueiredo
    Feb 21, 2015 at 2:42 am
    Feb 22, 2015 at 11:35 pm
  • I inserted @profile def run(...) into a module-level global function called 'run'. Something is very wrong here. 1. profile results were written before anything even ran 2. profile is not defined? ...
    Neal BeckerNeal Becker
    Feb 11, 2015 at 12:06 am
    Feb 16, 2015 at 7:49 pm
  • I am trying to process a CSV file using Python 3.5 (CPython tip as of a week or so ago). According to chardet[1], the file is encoded as utf-8: 562272 {'encoding': 'utf-8', 'confidence': 0.99} so I ...
    Skip MontanaroSkip Montanaro
    Feb 9, 2015 at 3:44 am
    Feb 10, 2015 at 8:23 am
  • I defined function Fatalln in "mydef.py" and it works fine if i call it from "mydef.py", but when i try to call it from "test.py" in the same folder: import mydef ... Fatalln "my test" i have ...
    Feb 10, 2015 at 11:38 pm
    Feb 27, 2015 at 8:11 pm
  • Hello all, I have been posting to another group which directed me to this group. I am a blind software engineering student at Arizona State University. I am currently doing research and have decided ...
    Bryan DuarteBryan Duarte
    Feb 18, 2015 at 5:43 pm
    Feb 22, 2015 at 7:14 pm
  • import random RandomNum = random.randint(0,7) restraunt = raw_input("What's your favourite takeaway?Pizza, Chinease or Indian?") if restraunt == ("Pizza"): fav = ("1") elif restraunt == ...
    Feb 9, 2015 at 11:52 pm
    Feb 10, 2015 at 8:38 pm
  • I'm interested in prototyping a Monte Carlo type simulation algorithm in Python. The background is that a friend has written a similar program in C++, and I'm interested in seeing if I can achieve ...
    Paul MoorePaul Moore
    Feb 5, 2015 at 4:20 pm
    Feb 10, 2015 at 2:40 pm
  • Another possibility is: import itertools my_dict = {x:y for x,y in zip(list1, itertools.cycle(list2))}
    Jason FriedmanJason Friedman
    Feb 1, 2015 at 2:38 am
    Feb 3, 2015 at 7:13 am
  • Hi everyone. Quick question here. Lets suppose if have the following numpy array: b=np.array([[0]*2]*3) and then: 45855552 45857512 45855552 Please correct me if I am wrong, but according to this ...
    Feb 22, 2015 at 5:53 pm
    Feb 23, 2015 at 6:31 am
  • On Linux we use #!/usr/bin/env python At the start of scripts to ensure that the python executable used is the one defined in the PATH variable, rather than hardcoding a path to the python ...
    Feb 20, 2015 at 2:43 pm
    Feb 21, 2015 at 2:40 pm
  • Hello! I have a best-practice question: Imagine I have several hardware devices that I work with on the same I2C bus and I am using the python smbus module for that purpose. The individual devices ...
    Feb 21, 2015 at 12:15 pm
    Feb 24, 2015 at 12:14 am
  • Start off with sets of elements as follows: 1. A,B,E,F 2. G,H,L,P,Q 3. C,D,E,F 4. E,X,Z 5. L,M,R 6. O,M,Y Note that sets 1, 3 and 4 all have the element 'E' in common, therefore they are "related" ...
    Feb 21, 2015 at 7:46 pm
    Feb 22, 2015 at 5:02 pm
  • Hello everyone, [Python 3.X] I have the following factory model for the initialization of a class tree (code abbreviated for simplicity). # item.py class BadItemType(Exception): pass class Item: def ...
    Mario FigueiredoMario Figueiredo
    Feb 15, 2015 at 8:04 pm
    Feb 16, 2015 at 3:29 pm
  • Context: I am using idle for taking python classes. Finish the class and run out usually in a hurry and forget to save the idle interaction window. Would like to save it so that I can mail it to the ...
    Rustom ModyRustom Mody
    Feb 11, 2015 at 1:11 pm
    Feb 12, 2015 at 7:17 am
  • Hi, I am deploying Python to hundreds of machines using SCCM 2012. I am using the below command to install: Msiexec /i "python.msi" TARGETDIR="C:\Program Files\Python" ALLUSERS=1 /qn Even though I am ...
    Colin AtkinsonColin Atkinson
    Feb 23, 2015 at 1:57 pm
    Feb 25, 2015 at 4:49 pm
    Feb 15, 2015 at 1:32 pm
    Feb 24, 2015 at 5:11 pm
  • Is there a quick way to concatenate all the values in a list into a string, except the first value? I want this to work with variable length lists. All values in list will be strings. Any help ...
    Feb 23, 2015 at 3:58 pm
    Feb 24, 2015 at 10:30 am
  • In Python, unrecognized escape sequences are treated literally, without (as far as I can tell) any sort of warning or anything. This can mask bugs, especially when Windows path names are used ...
    Chris AngelicoChris Angelico
    Feb 23, 2015 at 2:29 am
    Feb 23, 2015 at 10:14 am
  • How many people (actually machines) out here are vulnerable? http://security.stackexchange.com/questions/80210/ghost-bug-is-there-a-simple-way-to-test-if-my-system-is-secure shows a python 1-liner to ...
    Rustom ModyRustom Mody
    Feb 3, 2015 at 3:53 am
    Feb 4, 2015 at 2:13 am
  • I am in school and there is a problem with my code: When I try to run my code in the python code in the python shell it waits about 10 seconds then shows an error that says ?IDLE?s subprocess didn?t ...
    Luke LloydLuke Lloyd
    Feb 2, 2015 at 11:26 pm
    Feb 3, 2015 at 10:01 pm
  • I build several versions of Python from Mercurial sources on a regular basis. I am starting on a new collection of programs for some database work and figured I should start using Python 3. I wanted ...
    Skip MontanaroSkip Montanaro
    Feb 1, 2015 at 4:24 pm
    Feb 1, 2015 at 10:09 pm
  • 'xthunder' 'under' I could understand backslash but forward slash?
    Feb 24, 2015 at 11:05 pm
    Feb 27, 2015 at 10:18 am
  • In an XML file which contain a tag and then these tags contain properties, which later are being called in anoter tag where these properties are expanded as variables. For eg. <instance ...
    Feb 10, 2015 at 7:30 am
    Feb 10, 2015 at 11:55 pm
  • On the Mac running Mavericks, I have successfully managed to install and use the requests library for HTTP and HTTPS requests using Python 2. But I'd like to move to Python 3. I downloaded the most ...
    Feb 9, 2015 at 6:11 pm
    Feb 9, 2015 at 10:42 pm
Group Navigation
period‹ prev | Feb 2015 | next ›
Group Overview
grouppython-list @

248 users for February 2015

Chris Angelico: 183 posts Steven D'Aprano: 100 posts Mark Lawrence: 80 posts Ian Kelly: 69 posts Marko Rauhamaa: 63 posts Dave Angel: 54 posts Rustom Mody: 41 posts Ethan Furman: 38 posts Laura Creighton: 37 posts Paul Rubin: 35 posts Wxjmfauth: 31 posts Ben Finney: 30 posts Terry Reedy: 27 posts Cem Karan: 24 posts Gregory Ewing: 24 posts Skip Montanaro: 24 posts Mario Figueiredo: 23 posts Tim Chase: 23 posts Peter Otten: 21 posts Grant Edwards: 17 posts
show more