Search Discussions

225 discussions - 1,532 posts

  • How can I use the '.split()' method (am I right in calling it a method?) without instead of writing each comma between words in the pie list in the following code? Also, is there a way to use .split ...
    Aug 14, 2013 at 4:51 am
    Aug 18, 2013 at 7:17 am
  • Dear all, I'm C++ programmer and unfortunately put semicolon at end of my statements in python. Quesion: What's really defferences between putting semicolon and don't put? Yours, Mohsen
    Mohsen PahlevanzadehMohsen Pahlevanzadeh
    Aug 29, 2013 at 12:18 am
    Sep 5, 2013 at 3:15 pm
  • I think that something iam missing in the new VPS implementation concerning my python web page. After: tail -F /usr/local/apache/logs/error_log & ================ [Tue Aug 27 12:49:52 2013] [error] ...
    Ferrous CranusFerrous Cranus
    Aug 27, 2013 at 12:52 pm
    Aug 29, 2013 at 6:30 am
  • Hi Fellow Python Friends, I am new to Python and recently subscribed to the mailing list.I have a doubt regarding the basics of Python. Please help me in understanding the below concept. So doubt is ...
    Krishnan ShankarKrishnan Shankar
    Aug 10, 2013 at 3:33 pm
    Aug 17, 2013 at 1:09 am
  • I am checking my 1292-line script for syntax errors. I ran the following commands in a terminal to check for errors, but I do not see the error. collier at Nacho-Laptop:/media/collier/AI/Pysh$ ...
    Devyn Collier JohnsonDevyn Collier Johnson
    Aug 11, 2013 at 2:19 am
    Aug 14, 2013 at 12:39 pm
  • I know this isn't the place to ask but since most of you are web programmers also, you possibly do hosting too. Problem is also that i made the mistake of paying my current provider up until 5/5/2014 ...
    Aug 27, 2013 at 7:13 am
    Aug 28, 2013 at 12:37 pm
  • I am new to Python, with experience in Java, C++ and R. As I understand encapsulation is not a big thing in the Python world. I read that you can put two underscores before the name of a variable ...
    Aug 17, 2013 at 12:26 pm
    Sep 2, 2013 at 11:29 pm
  • I am seeking comments on PEP 450, Adding a statistics module to Python's standard library: http://www.python.org/dev/peps/pep-0450/ Please read the FAQs before asking anything :-) Also relevant ...
    Steven D'ApranoSteven D'Aprano
    Aug 10, 2013 at 1:10 am
    Dec 10, 2013 at 11:55 pm
  • Is there any pythonic way to perform static typing? After searching the web I've stumbled on a significant number of comments that appear to cover static typing as a proof of concept , but in the ...
    Rui MacielRui Maciel
    Aug 5, 2013 at 8:46 pm
    Aug 8, 2013 at 4:46 pm
  • I have this file that has this: from struct_global import y from struct_global import x and this usage (a few lines later in a class method definition in the same file): if y == x: If I stop there in ...
    Aug 17, 2013 at 2:25 pm
    Aug 20, 2013 at 9:15 am
  • Newly revised this morning: http://www.python.org/dev/peps/pep-0008/#maximum-line-length summary: 72 for text block (comments, triple-quoted strings) 79 for normal code 99 for code that is really ...
    Terry ReedyTerry Reedy
    Aug 1, 2013 at 7:52 pm
    Aug 4, 2013 at 6:23 pm
  • I have a suggestion about the Python tutorial for improvement. Specifically about in Python tutorial 4.7.5 lambda forms. http://docs.python.org/3/tutorial/controlflow.html#lambda-forms It is not very ...
    Aseem BansalAseem Bansal
    Aug 3, 2013 at 5:53 pm
    Oct 1, 2013 at 5:31 pm
  • I'm trying to create an option for the program to repeat if the user types 'y' or 'yes', using true and false values, or otherwise end the program. If anyone could explain to me how to get this code ...
    Aug 7, 2013 at 8:17 am
    Aug 10, 2013 at 1:40 am
  • Basically, I think Twitter's broken. For my full discusion on the matter, see: http://www.reddit.com/r/learnpython/comments/1k2yrn/help_with_len_and_input_function_33/cbku5e8 Here's the first post of ...
    Joshua LandauJoshua Landau
    Aug 11, 2013 at 6:17 am
    Aug 14, 2013 at 6:36 am
  • note everything works great if i use Ascii, but: in my utf8-encoded script i have this: in my embedded C++ i have this: PyObject* CPython_Script::print(PyObject *args) { PyObject *resultObjP = NULL ...
    David M. CotterDavid M. Cotter
    Aug 23, 2013 at 8:49 pm
    Aug 28, 2013 at 5:46 pm
  • Basically, I'm trying to find out how to remove matching items from a list. But there doesn't seem to be any information on how to go about doing this specific function. For example, what I want is ...
    Aug 3, 2013 at 8:12 pm
    Aug 4, 2013 at 6:52 am
  • I'd like to print strings right adjusted. ( Python 2.7.3, Linux 3.4.47-2.38-desktop ) from __future__ import print_function print( ' {0: 3}<'.format( 'a' ) ) But if the string contains an Umlaut ...
    Kurt MuellerKurt Mueller
    Aug 8, 2013 at 2:23 pm
    Aug 28, 2013 at 11:17 am
  • Hi all, Please see the below code. class Test(threading.Thread): ? ? ? ? ? def StartThread(self): ? ? ? ?Lock = threading.Lock() ? ? ? ? self.start() ?? class Test1(threading.Thread): ? ? def ...
    Chandan kumarChandan kumar
    Aug 21, 2013 at 6:50 am
    Aug 23, 2013 at 3:50 pm
  • Hey everybody, I am using 2.7 on Ubuntu 12.10. All I need to do is to print time with the microseconds. I have been looking at the docs and trying things for about half a day now with no success ...
    Matt Doolittle33Matt Doolittle33
    Aug 2, 2013 at 10:54 am
    Aug 8, 2013 at 1:30 pm
  • While designing a simple library, I found myself asking a philosophical question: to check or not to check the parameter's interface? I think that, considering it is Python, the usual answer would be ...
    Joe JuniorJoe Junior
    Aug 28, 2013 at 9:09 pm
    Sep 1, 2013 at 12:52 am
  • Greetings all. I'm using Python 2.7 under Windows and am trying to run a command line program and process the programs output as it is running. A number of web searches have indicated that the ...
    Ian SimcockIan Simcock
    Aug 22, 2013 at 5:51 am
    Aug 24, 2013 at 9:36 am
  • Currently the documentation download includes a lot of things but PEPs are not its part. I wanted to suggest that PEPs should be included in the download. They are very much relevant to Python.
    Aseem BansalAseem Bansal
    Aug 21, 2013 at 5:14 am
    Aug 23, 2013 at 1:19 pm
  • Hi everybody, I am trying to understand how to use named pipes in python to launch external processes (in a Linux environment). As an example I am trying to "imitate" the behaviour of the following ...
    Luca CeroneLuca Cerone
    Aug 5, 2013 at 1:09 pm
    Aug 10, 2013 at 1:07 am
  • Hi, func4(func3(func2(func1(myval)))) I was wondering if there is a function in standard library that would take a list of functions and a initial value and do the above like this ...
    Aug 28, 2013 at 12:52 pm
    Aug 29, 2013 at 10:48 pm
  • I'm learning Python and I have a problem. I've asked the question everywhere and no one helps me, so I'm hoping someone here will. I am making a program that shows album covers and you click on the ...
    Michael StaggsMichael Staggs
    Aug 22, 2013 at 2:04 am
    Aug 24, 2013 at 9:09 pm
  • The list.pop(index) returns the element represented by the index and also reduces the list by removing that element. So it a short one liner for doing both things. But when it comes for popping a ...
    Neatu Ovidiu GabrielNeatu Ovidiu Gabriel
    Aug 8, 2013 at 9:45 am
    Aug 8, 2013 at 10:10 pm
  • Hi guys, I would like to apply the Pool.map method to a member of a class. Here is a small example that shows what I would like to do: from multiprocessing import Pool class A(object): def ...
    Luca CeroneLuca Cerone
    Aug 6, 2013 at 5:12 pm
    Aug 7, 2013 at 11:31 pm
  • I'm in need of help to solve this Python (ver. 3.3) problem: I have a hierarchy of classes (SubA, SubAB, SubB, ..., SubBCA, SubC,...), each of which is inheriting from a chain of superclasses with a ...
    Aug 6, 2013 at 9:10 am
    Aug 7, 2013 at 8:10 am
  • I am wanting to sort a plain text file alphanumerically by the lines. I have tried this code, but I get an error. I assume this command does not accept newline characters. z c w r h s d know where ...
    Devyn Collier JohnsonDevyn Collier Johnson
    Aug 6, 2013 at 2:00 am
    Aug 6, 2013 at 1:15 pm
  • Hi, I have been using ipython and ipython with qtconsole and working on a code with functions. Each time I make a modification in function? I have to quit IPTHON console (in both with and with out qt ...
    Sudheer JosephSudheer Joseph
    Aug 19, 2013 at 12:55 am
    Aug 21, 2013 at 6:23 pm
  • Hi I'm trying to write a script that writes some content to a file root through sudo, but it's not working at all. I am using: channel = 'stable' config_file = '/opt/ldg/etc/channel.conf' command = ...
    Adam MercerAdam Mercer
    Aug 9, 2013 at 4:11 am
    Aug 9, 2013 at 8:16 pm
  • import random def player(): hp = 10 speed = 5 attack = random.randint(0,5) def monster (): hp = 10 speed = 4 def battle(player): print ("a wild mosnter appered!") print ("would you like to battle?") ...
    Kris MesenbrinkKris Mesenbrink
    Aug 12, 2013 at 3:33 am
    Aug 13, 2013 at 6:22 am
  • import random def room (): hp = 10 while hp != 0: random_Number = random.randint(1, 2) #asking if you want to roll/play des = input("Would you like to roll the die?") if des == ("y"): print ("Rolling ...
    Aug 7, 2013 at 3:38 am
    Aug 8, 2013 at 3:21 am
  • I'm trying to replace the blank(_) with the letter typed in by the user, in the appropriate blank(_) spot where the letter should be (where is in the letters list). letters='abcdefg' blanks='_ ...
    Aug 20, 2013 at 8:35 am
    Aug 23, 2013 at 1:28 am
  • I'm trying to create a game of Go Fish in Python. But I've stumbled onto a little problem that I can't seem to figure out how to deal with. There is a human player (player 0) and three computer ...
    Aug 3, 2013 at 12:40 am
    Aug 3, 2013 at 8:12 pm
  • So, I have been working in PHP for several years but I want to learn something new. That something new is Python. But since I'm a web developer I want to build stuff for the web. I don't want to use ...
    Ecazs NetEcazs Net
    Aug 28, 2013 at 8:14 pm
    Sep 5, 2013 at 8:26 pm
  • Hi, I am totally new to Python. I noticed that there are many videos showing how to collect data from Python, but I am not sure if I would be able to accomplish my goal using Python so I can start ...
    Comment HolderComment Holder
    Aug 21, 2013 at 2:55 pm
    Aug 22, 2013 at 3:11 pm
  • We were coming into Python's unittest module from backgrounds in nunit, where they use a decorate to identify tests. So I was hoping to avoid the convention of prepending "test" to the TestClass ...
    Adam PrebleAdam Preble
    Aug 8, 2013 at 6:32 am
    Aug 12, 2013 at 4:25 am
  • I was writing a Python script for getting the user stats of a website(Specifically codereview.stackexchange). I wanted to store the stats in a database. I found Python3's sqlite3 library. I found ...
    Aseem BansalAseem Bansal
    Aug 3, 2013 at 5:57 pm
    Aug 7, 2013 at 5:43 pm
  • Hi, Is it possible with argparse to have this syntax for a script? my-script (-a -b VALUE-B | -c -d VALUE-D) I would like to do this with the argparse module. Thanks in advance. -- Fran?ois Lafont
    Francois LafontFrancois Lafont
    Aug 4, 2013 at 2:10 am
    Aug 6, 2013 at 11:36 pm
  • Hi list, I have to write a small SMTP-Relay script (+ some statistic infos) and I'm wondering, if this can be done in python (in terms of performance, of course not in terms of possibility ;) ). It ...
    Aug 2, 2013 at 12:00 pm
    Aug 3, 2013 at 5:04 pm
  • Since StopIteration is not an error, how come does it inherit directly from Exception and not from BaseException? Thanks in advance, Marco -- Marco
    Marco ButtuMarco Buttu
    Aug 26, 2013 at 7:37 pm
    Aug 27, 2013 at 8:37 pm
  • Can anyone suggest a way to get a pair of file descriptor numbers such that data written to one can be read from the other and vice versa? Is there anything like os.pipe() where you can read/write ...
    Jack BatesJack Bates
    Aug 13, 2013 at 11:10 pm
    Aug 15, 2013 at 6:24 pm
  • I am working on a library, and adding one feature broke a seemingly unrelated feature. As I already had Test Cases written, I decided to try to incorporate the logging module into my class, and turn ...
    Josh EnglishJosh English
    Aug 10, 2013 at 8:00 pm
    Aug 11, 2013 at 1:10 am
  • HOWTO anyone? What im trying to succeed here is create one SSH tunnel, so that i can connect from a python script running on my pc, to a remote MySQL database running on my Host and id like to stick ...
    D. XenakisD. Xenakis
    Aug 8, 2013 at 7:30 pm
    Aug 10, 2013 at 6:29 pm
  • (My subject line is meant to be tongue and cheek inflammatory) I've been thinking about why programming for me often feels like ice skating uphill. I think part of the problem, maybe the biggest ...
    Aug 1, 2013 at 5:57 pm
    Aug 3, 2013 at 6:31 pm
  • This is a follow up to the Subject "right adjusted strings containing umlauts" For some text manipulation tasks I need a template to split lines from stdin into a list of strings the way ...
    Kurt MuellerKurt Mueller
    Aug 28, 2013 at 8:32 am
    Sep 5, 2013 at 1:25 pm
  • I have a crufty old DNS provisioning system that I'm rewriting and I hope improving in python. (It's based on tinydns if you know what that is.) The record formats are, in the worst case, like this ...
    John LevineJohn Levine
    Aug 28, 2013 at 4:44 pm
    Aug 29, 2013 at 7:26 am
  • I'm currently learning about the socket module. My question is how can I detect if a connection is closed from the other side, for example a KeyboardInterrupt as I frequently use. My code below ...
    Paul PittlersonPaul Pittlerson
    Aug 26, 2013 at 7:45 pm
    Aug 27, 2013 at 8:49 pm
  • Hello, I am currently just starting to learn the basics of the tkinter module and ive run into a problem. To teach myself I am messing around by creating separate modules containing basic GUI apps ...
    Aug 6, 2013 at 10:28 pm
    Aug 9, 2013 at 5:02 am
Group Navigation
period‹ prev | Aug 2013 | next ›
Group Overview
grouppython-list @

284 users for August 2013

Chris Angelico: 132 posts Steven D'Aprano: 74 posts Terry Reedy: 53 posts Dave Angel: 52 posts Joshua Landau: 45 posts MRAB: 34 posts Roy Smith: 34 posts Joel Goldstick: 32 posts Peter Otten: 28 posts Steven D'Aprano: 28 posts Ian Kelly: 24 posts Eschneider92: 23 posts Antoon Pardon: 22 posts Luca Cerone: 22 posts Wxjmfauth: 21 posts Ben Finney: 18 posts Ferrous Cranus: 18 posts Skip Montanaro: 18 posts Random832: 17 posts Νικόλαος: 17 posts
show more