FAQ

Search Discussions

216 discussions - 1,841 posts

  • Hello All , I'm wrecking my head trying to understand. where the class object comes into play . Is it only meant to act as base class and does it mean there is an actual class called object in python ...
    Eddilbert MachariaEddilbert Macharia
    May 31, 2015 at 2:34 pm
    Jun 4, 2015 at 2:11 pm
  • '3' Mark
    Mark Rosenblitt-JanssenMark Rosenblitt-Janssen
    May 10, 2015 at 4:34 pm
    May 13, 2015 at 3:19 pm
  • I'd like to understand what I'm being told about slices in https://wiki.python.org/moin/TimeComplexity Particularly, what's a 'del slice' and a 'set slice' and whether this information pertains to ...
    Mario FigueiredoMario Figueiredo
    May 18, 2015 at 7:23 pm
    May 21, 2015 at 7:48 pm
  • Hi, I've been asked on several occasions to write about intermediate or advanced topics in Python and I was wondering what the community considers to be "intermediate" or "advanced". I realize we're ...
    Mike DriscollMike Driscoll
    May 29, 2015 at 4:01 pm
    Jun 2, 2015 at 5:33 am
  • It's good to have at least a passing familiarity in more than one programming language, so for I've re-written a small Python script (56 lines, including blanks and comments) into Lua (67 lines), ...
    Steven D'ApranoSteven D'Aprano
    May 22, 2015 at 2:58 pm
    Jun 7, 2015 at 4:28 pm
  • Instead of learning only Scheme or only Python for a one semester intro course, what about learning BOTH? Maybe that could somehow get the benefits of both? I'm thinking that for the VERY beginning, ...
    Chris SeberinoChris Seberino
    May 10, 2015 at 8:43 pm
    May 16, 2015 at 4:24 am
  • I'm interested in playing with the CPython sources. I need to be able to build under Windows, but don't want to use make files (which rarely work properly), nor do a 6GB installation of Visual Studio ...
    BartCBartC
    May 13, 2015 at 7:36 pm
    May 17, 2015 at 8:49 pm
  • Would it be prudent to rid the long-standing "argument" (pun unintended) about self and the ulterior spellings of it, by changing it into a symbol rather than a name? Something like: class ...
    ZipherZipher
    May 26, 2015 at 4:37 pm
    Jun 3, 2015 at 7:05 am
  • Due to presumed bugs in an underlying library over which I have no control, I'm considering a restart in the wee hours of the morning. The basic fork/exec dance is not a problem, but how do I ...
    Skip MontanaroSkip Montanaro
    May 19, 2015 at 12:59 pm
    Jun 12, 2015 at 8:43 pm
  • I am writing a web service that accepts Python programs as input, runs the provided program with some profiling hooks, and returns various information about the program's runtime behavior. To do this ...
    DavidfstrDavidfstr
    May 26, 2015 at 2:24 am
    May 31, 2015 at 6:14 am
  • Hello, I was just coding and ran into a little logic problem which is as follows: There are two booleans/variables which can be either false or true. The desired thrutle table is: A = input B = input ...
    Skybuck FlyingSkybuck Flying
    May 28, 2015 at 9:50 pm
    May 29, 2015 at 11:07 pm
  • I am throwing the cat among the pigeons. ;-) In another thread I mentioned that I liked to have tail recursion in Python. To be clear not automatic, but asked for. Looking at the replies I did hit a ...
    Cecil WesterhofCecil Westerhof
    May 2, 2015 at 2:20 pm
    May 7, 2015 at 9:38 am
  • Greetings, Noobie question regarding a single line of code that transforms a URL slug ("this-is-a-slug") into a title ("This Is A Slug"). title = slug.replace('-',' ').title() This line also works if ...
    C.D. ReimerC.D. Reimer
    May 16, 2015 at 7:20 pm
    Jun 8, 2015 at 1:06 pm
  • Potential dangerous bug introduced by programming in Python as if it was C/Java. :-( I used: ++tries that has to be: tries += 1 Are there other things I have to be careful on? That does not work as ...
    Cecil WesterhofCecil Westerhof
    May 4, 2015 at 3:20 pm
    May 8, 2015 at 11:32 am
  • Hi. I don't like that subprocess.Popen(['command']) only works on Windows if there is a command.exe in %PATH%. As a Windows user you would normally expect that also command.bat and command.cmd can be ...
    Stefan ZimmermannStefan Zimmermann
    May 6, 2015 at 10:11 pm
    May 8, 2015 at 6:14 am
  • I help someone that has problems reading. For this I take photo's of text, use convert from ImageMagick to make a good contrast (original paper is grey) and use lpr to print it a little bigger ...
    Cecil WesterhofCecil Westerhof
    May 31, 2015 at 12:42 pm
    Jun 1, 2015 at 9:04 pm
  • I want to learn a lot of things. For example writing database and graphical applications. For database I decided on SQLAlchemy and GUI on Tkinter. In principal I want to write Python 3 applications ...
    Cecil WesterhofCecil Westerhof
    May 22, 2015 at 7:59 am
    May 24, 2015 at 2:00 pm
  • I'd like to do a little survey, and get a quick show of hands. How many people have written GUI or text-based applications or scripts where a "Move file to trash" function would be useful? Would you ...
    Steven D'ApranoSteven D'Aprano
    May 14, 2015 at 3:45 pm
    May 18, 2015 at 1:46 pm
  • A standard gotcha of python. Short version: Dont default optionals to mutable data structures Longer: See http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments [Or just ...
    Rustom ModyRustom Mody
    May 8, 2015 at 12:09 pm
    May 10, 2015 at 2:39 pm
  • I'm working my way through the asyncio documentation. I have got to the "Tasks and coroutines" section, but I'm frankly confused as to the difference between the various things described in that ...
    Paul MoorePaul Moore
    May 5, 2015 at 3:22 pm
    May 8, 2015 at 1:02 pm
  • Hi, What are the ways to encrypt python files?
    PalpandiPalpandi
    May 6, 2015 at 6:37 am
    May 13, 2015 at 1:48 pm
  • I read an interesting comment: """ The coolest thing I've ever discovered about Pythagorean's Theorem is an alternate way to calculate it. If you write a program that uses the distance form c = ...
    RavasRavas
    May 25, 2015 at 7:21 pm
    May 27, 2015 at 10:03 pm
  • Hi, The following code worked on Python 3.2, but no longer works in 3.4. Did something change, or have I always been doing something dumb? (I realise the code is pointless as is - it's the simplest ...
    Andrew cookeAndrew cooke
    May 13, 2015 at 1:25 pm
    May 14, 2015 at 1:07 am
  • Hi all I have often read about the gotcha regarding 'mutable default arguments' that frequently trips people up. I use them from time to time, but I have never had a problem. I have just delved a bit ...
    Frank MillmanFrank Millman
    May 8, 2015 at 8:01 am
    May 10, 2015 at 10:40 am
  • Hello Experts When I am writing list of dictionaries to CSV file, the key 'schedule' has value 'Mar 2012' becomes Mar-12. I really do not have clue why thats happening. Below is the code. dic_1 = ...
    Kashif RanaKashif Rana
    May 5, 2015 at 5:09 pm
    May 7, 2015 at 1:55 am
  • Hi group, Please refer to this blog post about code showing that a Python data structure can be self-referential: http://jugad2.blogspot.in/2015/05/can-python-data-structure-reference.html Gotten a ...
    Vasudev RamVasudev Ram
    May 2, 2015 at 8:02 pm
    May 3, 2015 at 3:46 pm
  • Why is calling a function faster than bypassing the function object and evaluating the code object itself? And not by a little, but by a lot? Here I have a file, eval_test.py: # === cut ==from timeit ...
    Steven D'ApranoSteven D'Aprano
    May 10, 2015 at 9:58 am
    Jun 22, 2015 at 9:49 pm
  • I'm a beginner to python. Reading here and there. Written a couple of short and simple programs to make life easier around the office. That being said, I'm not even sure what I need to ask for. I've ...
    20/20 Lab20/20 Lab
    May 13, 2015 at 11:24 pm
    May 20, 2015 at 9:18 pm
  • But when I do: import urllib3.contrib.pyopenssl I get: Traceback (most recent call last): File "<stdin ", line 1, in <module File "/usr/lib/python3.4/site-packages/urllib3/contrib/pyopenssl.py", line ...
    Cecil WesterhofCecil Westerhof
    May 4, 2015 at 8:58 am
    May 4, 2015 at 9:59 pm
  • At the moment I have the following code: os.chdir(directory) for document in documents: subprocess.Popen(['evince', document]) With this I can open several documents at once. But there is no way to ...
    Cecil WesterhofCecil Westerhof
    May 31, 2015 at 9:33 pm
    Jun 1, 2015 at 3:39 pm
  • At the moment I am playing with things like: p = subprocess.Popen('ls -l', shell = True, stdout = subprocess.PIPE) I think that most of the times this are the values I want. So it would be nice to ...
    Cecil WesterhofCecil Westerhof
    May 19, 2015 at 5:01 pm
    May 20, 2015 at 1:23 am
  • Hi everyone, I've installed the 'progress' module (ver 1.2) and I have the following error when used: File ...
    AlbAlb
    May 26, 2015 at 3:48 pm
    May 28, 2015 at 1:39 am
  • I have a string that contains 10 million characters. The string is formatted as: "0000001 : some hexadecimal text ... \n 0000002 : some hexadecimal text ... \n 0000003 : some hexadecimal text .. ...
    Bruceg113355Bruceg113355
    May 16, 2015 at 1:28 pm
    May 16, 2015 at 11:24 pm
  • The script is very simple (abc.txt exists in ROOTDIR directory): import os import shutil ROOTDIR = 'C:\Users\zoran' file1 = os.path.join(ROOTDIR, 'abc.txt') file2 = os.path.join(ROOTDIR, 'def.txt') ...
    ZljubisicmobZljubisicmob
    May 8, 2015 at 7:00 pm
    May 12, 2015 at 6:57 pm
  • While playing with recursion I get: RuntimeError: maximum recursion depth exceeded in comparison But then I get a very long stack trace. Is there a way to make this a lot shorter. Now I ?lose? ...
    Cecil WesterhofCecil Westerhof
    May 15, 2015 at 6:17 pm
    May 16, 2015 at 1:49 pm
  • Hello, I'm thinking how interesting it would be to add code blocks to Python, so that arbitrary strings of code can be passed around. It would open up some interesting possibilities for ...
    Dr. John Q. HackerDr. John Q. Hacker
    May 2, 2015 at 6:30 pm
    May 11, 2015 at 4:59 pm
  • Hi Just checking if the reaction to cry when given XML is normal. I thought maybe I am approaching it all wrong, using lxml largely or some xquery to club it into submission. See the usual goal is ...
    Sayth RenshawSayth Renshaw
    May 5, 2015 at 9:28 am
    May 6, 2015 at 12:29 am
  • Hi all, I have a text file with Windows-style line terminators (\r\n) which I open in universal newlines mode (Python 2.7). I would expect the newlines attribute to be set after the first call to the ...
    ArekfuArekfu
    May 4, 2015 at 9:50 am
    May 5, 2015 at 10:58 am
  • Still on my journey to learn Python. At the moment I define the test functionality in the following way: if __name__ == '__main__': keywords = [ 'all', 'factorial', 'fibonacci', 'happy', 'lucky', ] ...
    Cecil WesterhofCecil Westerhof
    May 2, 2015 at 10:29 pm
    May 3, 2015 at 10:50 am
  • webmaster at python.org just got some mail from some poor embarrased soul who ran this program and broke their Python install. They are running Mac OSX 10.7.5 They are getting: Utility has ...
    Laura CreightonLaura Creighton
    May 29, 2015 at 3:47 am
    May 29, 2015 at 7:43 pm
  • I am looking into using ipython instead of bash. But when I call a python program from ipython PYTHONPATH is not set. So pythonscripts that need a module through PYTHONPATH will not work. I could do ...
    Cecil WesterhofCecil Westerhof
    May 22, 2015 at 5:20 am
    May 23, 2015 at 7:47 pm
  • As part of Red Hat's move to Python 3, yum is officially deprecated and replaced by dnf: http://dnf.baseurl.org/2015/05/11/yum-is-dead-long-live-dnf/ Quote: Yum would not survive the ?Python 3 as ...
    Steven D'ApranoSteven D'Aprano
    May 18, 2015 at 5:21 am
    May 18, 2015 at 11:59 pm
  • Chris Angelico apparantly has a problem with cc'd people who aren't on the list. python-list is very quiet these days, so if you subscribe it won't be drinking from the firehose. And you can always ...
    Laura CreightonLaura Creighton
    May 27, 2015 at 12:57 pm
    May 29, 2015 at 2:47 pm
  • I have the JSON structure shown below and the python code shown below to manipulate the JSON structure. import json json_input = { "msgType": "0", "tid": "1", "data" ...
    Karthik SharmaKarthik Sharma
    May 27, 2015 at 10:23 pm
    May 28, 2015 at 6:49 pm
  • Hello, Sometimes it can be handy to "interrupt/reset/reposition" a running script. For example something externally goes badly wrong. The script is unaware of this. Current solution would require to ...
    Skybuck FlyingSkybuck Flying
    May 11, 2015 at 11:46 am
    May 15, 2015 at 6:06 am
  • Hi, I have python file with the following structure: import... A = configparser.get(...) B = configparser.get(...) Command line parameters parsing [they can change variable A or B] Def usage() Print ...
    ZljubisicmobZljubisicmob
    May 12, 2015 at 7:13 pm
    May 14, 2015 at 2:03 am
  • I first used marshal in my filebasedMessages module. Then I read that you should not use it, because it changes per Python version and it was better to use pickle. So I did that and now I find ...
    Cecil WesterhofCecil Westerhof
    May 8, 2015 at 9:58 am
    May 8, 2015 at 5:11 pm
  • If I have a string containing surrogate pairs like this in Python 3.4: "\udb40\udd9d" How do I convert it into the proper form: "\U000E019D" ? The answer appears not to be "unicodedata.normalize".
    Jon RibbensJon Ribbens
    May 3, 2015 at 2:40 pm
    May 3, 2015 at 7:20 pm
  • ________________________________________________________________________ ANNOUNCING eGenix PyRun - One file Python Runtime Version 2.1.0 An easy-to-use single file relocatable Python run-time - ...
    eGenix Team: M.-A. LemburgeGenix Team: M.-A. Lemburg
    May 11, 2015 at 11:59 am
    Jul 17, 2015 at 2:45 pm
  • Hi, I have a string b='1234'. I run: br=reversed(b) I hope that I can print out '4321' by: for br in b but it complains: SyntaxError: invalid syntax My questions: 1. What use for reversed(). I do not ...
    FlFl
    May 31, 2015 at 7:40 pm
    Jun 1, 2015 at 6:11 am
Group Navigation
period‹ prev | May 2015 | next ›
Group Overview
grouppython-list @
categoriespython
discussions216
posts1,841
users263
websitepython.org

263 users for May 2015

Chris Angelico: 206 posts Steven D'Aprano: 121 posts Cecil Westerhof: 109 posts Mark Lawrence: 89 posts Ian Kelly: 70 posts Marko Rauhamaa: 61 posts Rustom Mody: 59 posts Zipher: 56 posts Terry Reedy: 44 posts Laura Creighton: 43 posts Peter Otten: 35 posts Dave Angel: 32 posts BartC: 24 posts Steven D'Aprano: 24 posts Grant Edwards: 23 posts Tim Chase: 23 posts Ben Finney: 22 posts MRAB: 22 posts Skip Montanaro: 22 posts Jon Ribbens: 21 posts
show more
Archives