FAQ

Search Discussions

193 discussions - 1,704 posts

  • Chunks of data (about 2MB) are to be stored on machines using a peer-to-peer protocol. The recipient of these chunks can't assume that the payload is benign. While the data senders are supposed to ...
    Randall SmithRandall Smith
    Jun 23, 2015 at 7:02 pm
    Jul 1, 2015 at 10:31 pm
  • Hi, I just see the tutorial says Python can return value in function, it does not say multiple data results return situation. In C, it is possible. How about Python on a multiple data return ...
    FlFl
    Jun 2, 2015 at 9:27 pm
    Jun 21, 2015 at 12:55 pm
  • I wrote a very simple function to test random: def test_random(length, multiplier = 10000): number_list = length * [0] for i in range(length * multiplier): number_list[random.randint(0, length - 1)] ...
    Cecil WesterhofCecil Westerhof
    Jun 7, 2015 at 6:27 am
    Jun 17, 2015 at 3:01 pm
  • Hello, I need some kind of parser and some kind of way to access the data contained in a file like the one below: (text file) ...
    Skybuck FlyingSkybuck Flying
    Jun 2, 2015 at 12:29 am
    Jun 11, 2015 at 3:35 pm
  • One of the most annoying problems with py2/3 interoperability is that the pickle formats are not compatible. There must be many who, like myself, often use pickle format for data storage. It ...
    Neal BeckerNeal Becker
    Jun 9, 2015 at 6:08 pm
    Jun 11, 2015 at 11:11 am
  • I have a function in a module which is intended to be used by importing that name alone, then used interactively: from module import edir edir(args) edir is an enhanced version of dir, and one of the ...
    Steven D'ApranoSteven D'Aprano
    Jun 15, 2015 at 11:57 pm
    Jun 19, 2015 at 12:41 am
  • Hello. Very new to Python and looking for some basic help. Would like a set-up where something happens when a key is pressed. Not propose a question, have the user type something, then hit return, ...
    John McKenzieJohn McKenzie
    Jun 3, 2015 at 6:22 pm
    Jul 16, 2015 at 9:29 pm
  • Dear Group, I am trying to learn how to create .exe file for Python. I tried to work around http://www.py2exe.org/index.cgi/Tutorial of Py2exe. The sample program went nice. But if I try to make exe ...
    Subhabrata BanerjiSubhabrata Banerji
    Jun 15, 2015 at 11:42 am
    Jun 17, 2015 at 3:58 pm
  • Sometimes I just want to know how much time a function takes, but at the same time I also want the result of the function. For this I wrote the following function: def time_test(function, *args) ...
    Cecil WesterhofCecil Westerhof
    Jun 7, 2015 at 6:39 am
    Jun 8, 2015 at 6:32 am
  • Hello Python community. I come from a classic background in what refers to OOP. Mostly Java and PHP ( 5.3). I'm used to abstract classes, interfaces, access modifiers and so on. Don't get me wrong. I ...
    Jason P.Jason P.
    Jun 17, 2015 at 7:21 pm
    Jun 21, 2015 at 8:26 am
  • I am thinking about using ipython3 instead of bash. When I want to find a file I can do the following: !find ~ -iname '*python*.pdf' but is there a python way? -- Cecil Westerhof Senior Software ...
    Cecil WesterhofCecil Westerhof
    Jun 2, 2015 at 4:13 pm
    Jun 7, 2015 at 1:16 pm
  • http://jt.node365.se/baseconversion8.html
    Jonas ThornvallJonas Thornvall
    Jun 29, 2015 at 10:39 pm
    Jun 30, 2015 at 10:27 pm
  • The following code produces a plot with a line running from (9:30, 0) to (10:30, 1), not from (8:30, 0) to (9:30, 1) as I desire. If I use timezone None instead of pacific, the plot is as desired, ...
    Peter PearsonPeter Pearson
    Jun 30, 2015 at 12:56 am
    Jul 10, 2015 at 4:15 pm
  • Greetings, I'm in the process of converting 101 old BASIC games into Python (see link below). http://www.atariarchives.org/basicgames/ The short term goal is to learn the finer aspects of the Python ...
    C.D. ReimerC.D. Reimer
    Jun 21, 2015 at 7:32 pm
    Jun 22, 2015 at 9:20 am
  • Hi, I would like to download a file (http://video.hrt.hr/2906/otv296.mp4) If the connection is OK, I can download the file with: import urllib.request urllib.request.urlretrieve(remote_file, ...
    ZljubisicZljubisic
    Jun 30, 2015 at 3:34 pm
    Jul 5, 2015 at 5:31 am
  • Hi, Consider the following calls, where very_long_path is more than 256 bytes: [1] os.mkdir(very_long_path) [2] os.getsize(very_long_path) [3] shutil.rmtree(very_long_path) I am using Python 2.7 and ...
    Albert-Jan RoskamAlbert-Jan Roskam
    Jun 24, 2015 at 5:45 pm
    Jun 26, 2015 at 5:58 pm
  • Good Evening Everyone: I would like to have this JSON object written out to a CSV file so that the keys are header fields (for each of the columns) and the values are values that are associated with ...
    Saran AhluwaliaSaran Ahluwalia
    Jun 17, 2015 at 9:49 pm
    Jun 20, 2015 at 5:27 pm
  • Greetings, I'm converting 101 BASIC games from an old book (http://www.atariarchives.org/basicgames/) into Python scripts. After a dozen conversions, I've created a helper file for common functions ...
    C.D. ReimerC.D. Reimer
    Jun 13, 2015 at 7:10 pm
    Jun 14, 2015 at 7:08 am
  • Folks, I am developing a program which I'd like to be python 2 and 3 compatible. I am still relatively new to python and I use primarily py3 for development. Every once in a while I use a py2 ...
    FabienFabien
    Jun 12, 2015 at 3:00 pm
    Jun 13, 2015 at 4:16 pm
  • I know that sounds strange: usually we look up values by key, not keys. But suppose you have a strange key type that despite being "equal", is not identical in some fields, and you need to see those ...
    Dan StrombergDan Stromberg
    Jun 24, 2015 at 12:21 am
    Jul 5, 2015 at 6:25 am
  • Say in 2014 April to May whole weeks would be 7th, 14th 28th April and May would be 5th, 12th and 19th. So expecting 7 whole weeks in total
    Sebastian M CheungSebastian M Cheung
    Jun 10, 2015 at 5:05 pm
    Jun 11, 2015 at 3:45 am
  • str.split() doesn't seem to respect non-breaking space: Python 3.4.2 (default, Oct 8 2014, 10:45:20) [GCC 4.9.1] on linux Type "help", "copyright", "credits" or "license" for more information ...
    Tim ChaseTim Chase
    Jun 10, 2015 at 1:28 pm
    Jun 11, 2015 at 3:37 am
  • Good Evening, I have a conundrum regarding JSON objects and converting them to CSV: Context I am converting XML files to a JSON object (please see snippet below) and then finally producing a CSV ...
    SahlusarSahlusar
    Jun 19, 2015 at 1:47 am
    Jun 23, 2015 at 11:32 am
  • Hello I am trying to create multiple thread through the below program but I am getting an error #! /usr/bin/python import os import subprocess import thread import threading from thread import ...
    Mohan MohtaMohan Mohta
    Jun 3, 2015 at 8:41 pm
    Jun 4, 2015 at 10:58 pm
  • Hi, When I search solution of reverse a string/number, I came across a short function online: return str(num) == str(num)[::-1] I thought that it is a general function. And with the following ...
    FlFl
    Jun 1, 2015 at 4:46 am
    Jun 2, 2015 at 10:30 pm
  • Folks, I am developing a tool which works on individual entities (glaciers) and do a lot of operations on them. There are many tasks to do, one after each other, and each task follows the same ...
    FabienFabien
    Jun 19, 2015 at 2:01 pm
    Jun 21, 2015 at 8:27 pm
  • Greetings, I've revisited my misbegotten childhood by translating the programs from "BASIC Computer Games" by David H. Ahl into Python. This is mostly an exercise in unraveling spaghetti code with ...
    C.D. ReimerC.D. Reimer
    Jun 7, 2015 at 5:17 pm
    Jun 8, 2015 at 9:44 pm
  • Hi, Currently, in various places in my code, I have the equivalent of: for x in it: if complicated_calculation_1(): cleanup() break complicated_calculation_2() if complicated_calculation_3() ...
    AcdrAcdr
    Jun 2, 2015 at 11:26 am
    Jun 3, 2015 at 4:57 pm
  • I would like to have this JSON object written out to a CSV file so that the keys are header fields (for each of the columns) and the values are values that are associated with each header field. Is ...
    Saran ASaran A
    Jun 17, 2015 at 3:00 pm
    Jun 21, 2015 at 11:38 pm
  • Is there a program what runs on Windows that uses a national blacklist to block phone calls?
    Seymore4HeadSeymore4Head
    Jun 12, 2015 at 10:20 pm
    Jun 13, 2015 at 7:12 pm
  • I have so far ignored the new string formatting (you know, the stuff with all the braces, dots and brackets that make Python strings look like Perl code <wink ). I am still only using Python 2.7, but ...
    Skip MontanaroSkip Montanaro
    Jun 8, 2015 at 7:09 pm
    Jun 9, 2015 at 3:42 pm
  • hey, i really need help, im a straight up beginner in scripting and i need to figure out how to make an inverted particle emitter using python in maya
    Stephenppraneel7Stephenppraneel7
    Jun 4, 2015 at 11:15 pm
    Jun 7, 2015 at 9:18 pm
  • I saw somewhere on the net that you can copy a list with slicing. So what's happening when I try it with a numpy array? False array([1, 9, 3])
    Paul ApplebyPaul Appleby
    Jun 5, 2015 at 12:46 pm
    Jun 5, 2015 at 2:13 pm
  • My question can be found here: http://stackoverflow.com/questions/31058100/enumerate-column-headers-in-csv-that-belong-to-the-same-tag-key-in-python Here is an additional sample sample of the XML ...
    KbtyoKbtyo
    Jun 25, 2015 at 6:39 pm
    Jun 30, 2015 at 4:32 pm
  • Long time lurker. I'm looking to register a python script as the default pdf reader for windows. I assume I can just register the .py in the section windows section for registering default handlers, ...
    NaftaliNaftali
    Jun 18, 2015 at 9:04 pm
    Jun 23, 2015 at 8:20 pm
  • Any idea why a server might be returning the message, in json format, "Malformed Upload"? The image is gzipped as the server requires... Someone on another forum said that he thinks Python requests ...
    Paul HubertPaul Hubert
    Jun 17, 2015 at 9:55 pm
    Jun 18, 2015 at 9:44 pm
  • Hi I've been trying to configure Apache and Python 2.7 on Red Hat. I've tried the different configurations i've seen on the web, I've given chmod -R 777 tu my python code but I still get 403 ...
    Néstor BoscánNéstor Boscán
    Jun 12, 2015 at 12:51 pm
    Jun 17, 2015 at 5:00 pm
  • Hello, I don't like the object orientated part of Python. The idea/prospect of having to write "self" everywhere... seems very horrorific and a huge time waster. (Perhaps the module thing of python ...
    Skybuck FlyingSkybuck Flying
    Jun 11, 2015 at 11:19 am
    Jun 11, 2015 at 4:55 pm
  • Hi, I want to learn some coding on PDF. After I download and install pyPDF2, it cannot pass unit test, which is coming from the package. I put a screen shot link here to show the console message ...
    FlFl
    Jun 24, 2015 at 4:53 pm
    Jun 25, 2015 at 1:20 am
  • It actually doesn't fail but it 'cannot open in protected mode' (see here ...
    NaftaliNaftali
    Jun 19, 2015 at 5:24 pm
    Jun 22, 2015 at 4:13 pm
  • [Dr. Bigcock wrote:] That's an awesome idea. It's like a final way to understand and operate with metaclasses. One would have to decide how to merge the two classes, but this could be as ...
    Dr. John Q. HackerDr. John Q. Hacker
    Jun 17, 2015 at 12:24 am
    Jun 17, 2015 at 4:48 pm
  • I would like to do something like this: class C: def __init__(self,**parms): ... c=C(f1=1,f2=None) I want to have, for the object self.f1=1 self.f2=None for an arbitrary number of parameters. What is ...
    Paulo da SilvaPaulo da Silva
    Jun 12, 2015 at 3:53 pm
    Jun 13, 2015 at 7:49 am
  • Hi, I have a list: ['12', '42', '49', '156', '225', '36', '49', '164', '11181', '3100'] I want to access the last two digits. That is: ['12', '42', '49', '56', '25', '36', '49', '64', '81', '00'] ...
    FlFl
    Jun 2, 2015 at 12:23 pm
    Jun 4, 2015 at 1:27 pm
  • I have the following script for writing out to CSV two items in a list to a CSV in such a format, such that if we have: L = [('A', 1), ('B', 2), ('C', 3), ('D', 4),('A', 5), ('B', 6), ('D', 8)] we ...
    SahlusarSahlusar
    Jun 23, 2015 at 5:15 pm
    Jun 25, 2015 at 4:37 pm
  • I am trying to find a list of strings in a directory of files. Here is my code: # -*- coding: utf-8 -*- import os import fileinput s2 = os.listdir('/home/malikarumi/Projects/P5/shortstories') with ...
    Malik RumiMalik Rumi
    Jun 12, 2015 at 7:39 pm
    Jun 16, 2015 at 2:51 am
  • I have a piece of code written for a Raspberry Pi with no explanation for two of the lines -- and I can't find an explanation I understand. Here are the lines: if os.system('modprobe --first-time -q ...
    GrawburgGrawburg
    Jun 12, 2015 at 1:07 pm
    Jun 12, 2015 at 2:46 pm
  • Hi. I'm a newbie in python. But I want embed it in my C program. There is such method of my class: @staticmethod def install_instr_callback(callback): # set hook for every change of PC ...
    Doc MefistoDoc Mefisto
    Jun 6, 2015 at 6:09 pm
    Jun 8, 2015 at 5:44 am
  • I am using libturpial to post messages on Twitter. Sometimes I get a libturpial.exceptions.ServiceOverCapacity. It is a good idea to try it again then. For this I wrote the following function: def ...
    Cecil WesterhofCecil Westerhof
    Jun 3, 2015 at 12:27 pm
    Jun 4, 2015 at 5:13 am
  • I'm trying to use a readline binding for both TAB and Ctrl-TAB, but it's not working for me. Whichever I install second seems to over-ride the first. In the Python interactive interpreter under ...
    Steven D'ApranoSteven D'Aprano
    Jun 28, 2015 at 6:55 pm
    Jul 10, 2015 at 4:56 am
  • Purely as an exercise I've been converting Grant Jenks' pypatt[1] from 2.7 to 3.4. I've managed to sort out most of the required changes by checking on what I can see with an AST pretty printer[2] ...
    Mark LawrenceMark Lawrence
    Jun 29, 2015 at 1:14 am
    Jun 30, 2015 at 11:01 pm
Group Navigation
period‹ prev | Jun 2015 | next ›
Group Overview
grouppython-list @
categoriespython
discussions193
posts1,704
users225
websitepython.org

225 users for June 2015

Chris Angelico: 139 posts Steven D'Aprano: 97 posts Laura Creighton: 95 posts Mark Lawrence: 73 posts Ian Kelly: 64 posts Cecil Westerhof: 52 posts Random832: 48 posts Marko Rauhamaa: 48 posts Skybuck Flying: 47 posts Michael Torrie: 40 posts Steven D'Aprano: 40 posts Rustom Mody: 34 posts Saran Ahluwalia: 31 posts Fl: 26 posts MRAB: 26 posts Peter Otten: 26 posts Grant Edwards: 24 posts Terry Reedy: 24 posts BartC: 22 posts Subhabrata Banerji: 21 posts
show more
Archives