FAQ

Search Discussions

133 discussions - 889 posts

  • Hi all, First off, to each reader--if you believe that 'multi-line' lambdas are no good and we can just use functions, decorators, &c. to accomplish everything in Python, advance warning: this post ...
    Yawar AminYawar Amin
    Jan 15, 2015 at 5:54 am
    Jan 18, 2015 at 2:45 am
  • Hi, I'm building a custom numeric class that works with values that have uncertainty and am wanting to make it as compatible with floating point objects as possible -- so as to be usable in legacy ...
    Andrew RobinsonAndrew Robinson
    Jan 6, 2015 at 10:27 am
    Jan 17, 2015 at 12:27 pm
  • True 1 1.0 Traceback (most recent call last): File "<stdin ", line 1, in <module File "/usr/lib/python2.7/decimal.py", line 2216, in __pow__ return context._raise_error(InvalidOperation, '0 ** 0') ...
    Devin JeanpierreDevin Jeanpierre
    Jan 9, 2015 at 2:33 am
    Jan 10, 2015 at 4:57 pm
  • Hi Everyone, I have a function I'm writing to delete wildcarded files in a directory. I tried this: def unlinkFiles(): os.remove("/home/anthony/backup/unix*") This doesn't seem to work because it's a ...
    Anthony PapillionAnthony Papillion
    Jan 1, 2015 at 11:13 pm
    Jan 8, 2015 at 5:58 pm
  • At long last, I am pleased to announce the latest version of PyPrimes, a pure Python package for working with prime numbers. PyPrimes is compatible with Python 2 and 3, and includes multiple ...
    Steven D'ApranoSteven D'Aprano
    Jan 8, 2015 at 4:35 am
    Jan 14, 2015 at 10:59 am
  • Hi all, I'm working on a Python _3_ project that will be used to parse ISC DHCPD configuration files for statistics and alarming purposes (IP address pools, etc). Anyway, I'm hung up on this one ...
    Jason BaileyJason Bailey
    Jan 12, 2015 at 6:03 pm
    Jan 15, 2015 at 12:49 pm
  • If it works like eric6, I quickly tested yesterday morning, it will not work. jmf
    WxjmfauthWxjmfauth
    Jan 1, 2015 at 10:39 am
    Jan 14, 2015 at 5:12 pm
  • I have this script which can calculate the total of numbers given in a string ---- script ----- total = 0 for c in '0123456789': total += int(c) print total ---- script ----- How should I modify this ...
    Store MakhzanStore Makhzan
    Jan 11, 2015 at 7:31 pm
    Jan 12, 2015 at 1:13 am
  • ============================================================ EXAMPLE 1: "Reducing Comprehension" https://docs.python.org/2/howto/doanddont.html#using-the-batteries ...
    Rick JohnsonRick Johnson
    Jan 10, 2015 at 6:05 pm
    Jan 12, 2015 at 4:03 am
  • I have come across this in the past, but today it annoyed me enough that I'm asking for an explanation. Posts on this newsgroup/mailing list are archived on the web, but the URLs seem to change, ...
    Steven D'ApranoSteven D'Aprano
    Jan 9, 2015 at 10:56 am
    Jan 17, 2015 at 10:31 pm
  • I have this type of situation and wonder if I should use a global variable outside the recursive function instead of passing the updated parameter through. I want to get a union of all the values ...
    TimTim
    Jan 16, 2015 at 5:49 pm
    Jan 17, 2015 at 9:25 pm
  • Iam using Linux and Python 2.7 and playing with the threading.Timer module. I had the below question on the same. (a) How to I prevent the execution the "EXECUTED SLEEP" after 4 seconds ? , current ...
    Ganesh PalGanesh Pal
    Jan 14, 2015 at 1:07 pm
    Jan 15, 2015 at 3:29 pm
  • Hello - Simple question. I hope. I have 600 images (jpg) I am trying to generate. Each image will be made up of a line, with specific orientation (degrees) and length values (pixel). The background ...
    Semeon RisomSemeon Risom
    Jan 8, 2015 at 5:09 pm
    Jan 11, 2015 at 8:16 pm
  • Is in here maybe someone who speak Polish? I would like to write application witch looks like this http://linuxiarze.pl/obrazy/internet1/ceni1.png I'm looking for some libs, tutorials, or other ...
    AdamAdam
    Jan 7, 2015 at 9:17 pm
    Jan 9, 2015 at 2:09 am
  • In repsonse to this question: Write a program that prints the first 100 members of the sequence 2, -3, 4, -5, 6, -7, 8. This is my solution it works but ugly. series = range(2,100) # answer = [(x,(y* ...
    FlebberFlebber
    Jan 4, 2015 at 11:34 am
    Jan 6, 2015 at 1:30 am
  • Scenario: You're introducing someone to Python for the first time. S/he may have some previous programming experience, or may be new to the whole idea of giving a computer instructions. You have a ...
    Chris AngelicoChris Angelico
    Jan 16, 2015 at 3:03 pm
    Jan 16, 2015 at 5:57 pm
  • Development machine is windows7 64 bit machine, now working with either/both python 2.7 or 3.4 - test purposes, trying to figure out if this was something like a version incompatibility issue, and ...
    Jacob KrugerJacob Kruger
    Jan 15, 2015 at 8:13 am
    Jan 16, 2015 at 4:28 am
  • #!/usr/bin/python # -*- coding: utf-8 -*- import re kivy_class_ptn = re.compile(r"<\b[\w_.\@\+]+ :?") def test_kivy_class(s): """ "<MYBT at ToggleButton+Button :" "<MYBT " """ ret = ...
    Gordianknot1981Gordianknot1981
    Jan 12, 2015 at 4:20 am
    Jan 12, 2015 at 6:34 pm
  • I'm running some pandas examples and I canno find in what module NaN is defined. Does anyone know what module I have to import in order to have it defined?
    MaurogMaurog
    Jan 8, 2015 at 2:15 pm
    Jan 9, 2015 at 2:25 am
  • Downloaded and installed 64-bit Python 3.4 and pywin32-219. Both installed smoothly on my 64-bit Win7 machine. I added C:\Python34 to the search path. If I launch a Windows command window and run ...
    Andrew KoenigAndrew Koenig
    Jan 12, 2015 at 6:02 pm
    Jan 13, 2015 at 8:18 am
  • Hi i am learning socket programming, client code: import socket client_socket=socket.socket() server_address='192.168.2.2' server_port= 80 print("hello") ...
    Pramod gowdaPramod gowda
    Jan 3, 2015 at 11:43 am
    Jan 4, 2015 at 6:12 pm
  • Hi, I am trying to write a class decorator that checks whether deprecated parameters with non-default arguments are used. More complete code is here: http://pastebin.com/ZqnMis6M. In the code below, ...
    Albert-Jan RoskamAlbert-Jan Roskam
    Jan 9, 2015 at 9:26 pm
    Jan 15, 2015 at 9:07 pm
  • I'm busy using something like pyodbc to pull data out of MS access .mdb files, and then generate .sql script files to execute against MySQL databases using MySQLdb module, but, issue is forms of ...
    Jacob KrugerJacob Kruger
    Jan 7, 2015 at 11:04 am
    Jan 7, 2015 at 1:56 pm
  • Court of King Arthur, I?d appreciate any help you can provide. I?m having problems passing command line parameters from Windows 7 into a Python script (using Python 3.4.2). It works correctly when I ...
    Ken StewartKen Stewart
    Jan 2, 2015 at 7:44 pm
    Jan 3, 2015 at 2:09 pm
  • If I have a class hierarchy like so: class A(object): def __init__(self, s): self.s = s def foo(self, s): return A(s) class B(A): def __init__(self, s): A.__init__(self, s) If I make a B: b = B(0) ...
    JasonJason
    Jan 14, 2015 at 4:45 pm
    Jan 15, 2015 at 4:44 am
  • Hi, I'm working on auto-generated python code with the exec function. I've done some performance benches : % python -m timeit '1 + 1' 10000000 loops, best of 3: 0.0229 usec per loop % python -m ...
    Jean-Baptiste BraunJean-Baptiste Braun
    Jan 13, 2015 at 5:02 pm
    Jan 15, 2015 at 1:51 am
  • Hi, I am currently implementing the LTE physical layer in Python (ver 2.7.7). For the qpsk, 16qam and 64qam modulation I would like to know which is more efficient to use, between an integer ...
    Austin aigbeAustin aigbe
    Jan 3, 2015 at 11:19 pm
    Jan 4, 2015 at 12:30 pm
  • Greetings, I've compiled a list of "python -m" tools at pythonwise.blogspot.com/2015/01/python-m.html. Did I miss something? What are your favorite "python -m" tools? Thanks, -- Miki
    Miki TebekaMiki Tebeka
    Jan 12, 2015 at 4:17 am
    Jan 16, 2015 at 9:57 am
  • I have a string that I get as an output of a command as: '\x01\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x0010232ae8944a\x02\x00\x00\x00\x00\x00\x00\x00\n' I want to fetch '10232ae8944a' from the above ...
    Shambhu RajakShambhu Rajak
    Jan 13, 2015 at 1:40 pm
    Jan 14, 2015 at 2:35 pm
  • I want search count of szukana in zmienna but code below counting all 12 letters from "traktorzysta" word szukana="t" zmienna="traktorzysta" def gen(): count=int(0) for a in zmienna: if szukana in ...
    Dariusz MysiorDariusz Mysior
    Jan 5, 2015 at 2:27 pm
    Jan 6, 2015 at 1:12 am
  • Some of you will recognize me as someone who pops up occasionally asking questions as I grope my way to a usable speech driven programming environment. My last set of experiments with a technique ...
    Eric S. JohanssonEric S. Johansson
    Jan 5, 2015 at 7:43 am
    Jan 5, 2015 at 9:37 pm
  • Not sure after quick skim/scan, but, I would generally use either for I in range(len(inlist)): or just for it in inlist, instead of using while, etc. Stay well Jacob Kruger Blind Biker Skype: BlindZA ...
    Jacob KrugerJacob Kruger
    Jan 1, 2015 at 9:10 am
    Jan 1, 2015 at 2:24 pm
  • I have a long-running python/CherryPy Web App server process that I am running on Mac OS X 10.8.5. Python 2.7.2 running in 32-bit mode (for now, I have the code in place to change over to 64 bit, but ...
    Israel BrewsterIsrael Brewster
    Jan 9, 2015 at 5:40 pm
    Jan 13, 2015 at 5:34 pm
  • I've never come across this before. Here's a minimal example (in Python 3.4): Code: --------------------------------------------------------------------- d = {0:"a", 1:"b", 2:"c", 3:"d"} e = [d[x] ...
    John LadaskyJohn Ladasky
    Jan 12, 2015 at 8:25 pm
    Jan 13, 2015 at 6:00 am
  • Given a matrix I want to shift the 1st column 0 (ie leave as is) 2nd by one place, 3rd by 2 places etc. This code works. But I wonder if numpy can do it shorter and simpler. --------------------- def ...
    Rustom ModyRustom Mody
    Jan 8, 2015 at 5:56 pm
    Jan 11, 2015 at 4:12 am
  • Hello, In the Python documentation, when opening the file in write mode, it mentions the following: *writing (truncating the file if it already exists)* What is meant by "truncating" here? Is it ...
    Abdul AbdulAbdul Abdul
    Jan 15, 2015 at 11:06 am
    Jan 15, 2015 at 5:16 pm
  • i consume a web service that return a element whose the type is "instance". but this element seem be a dictionary but when i want to use it like a dictionary, i got some errors. so this is the ...
    brice DORAbrice DORA
    Jan 13, 2015 at 9:03 am
    Jan 15, 2015 at 11:55 am
  • https://bpaste.net/show/93be9e15634b <--- Line 19 through 22 At all times, my program is assigning the object priority of 0, even if one already exists in the database with a priority of 0 (it's ...
    JoboppsgppJoboppsgpp
    Jan 12, 2015 at 9:19 pm
    Jan 13, 2015 at 2:29 pm
  • Please provide you input on the below questions: (a) I was expecting the string i.e day of week , example Saturday to be written in the file. what Iam I missing in the below program ? Program ...
    Ganesh PalGanesh Pal
    Jan 10, 2015 at 3:14 pm
    Jan 11, 2015 at 10:32 am
  • Hi friends, I'm trying to use threads to achieve the below work flow 1. Start a process , while its running grep for a string 1 2. Apply the string 1 to the command in step 1 and exit step 2 3 ...
    Ganesh PalGanesh Pal
    Jan 8, 2015 at 2:00 am
    Jan 10, 2015 at 3:17 pm
  • I've installed Microsoft Visual Studio 10.0. Here are the steps I've been taking. My python version is Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:16:31) [MSC v.1600 64 bit (AMD64)] on win32 ...
    Stephen BouletStephen Boulet
    Jan 9, 2015 at 2:58 pm
    Jan 9, 2015 at 11:16 pm
  • Hi I need some advice on managing data in the form of xml. I will have to repeatedly import a small xml file but with many complex attributes. If I want to retain data integrity and keep the import ...
    FlebberFlebber
    Jan 5, 2015 at 11:54 am
    Jan 6, 2015 at 3:59 am
  • Hello list, Let me first wish you all the best in 2015! Today I was trying to test for occurrence of a byte in a set ... '3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:15:05) [MSC v.1600 32 bit ...
    Patrick vrijlandtPatrick vrijlandt
    Jan 3, 2015 at 6:50 pm
    Jan 3, 2015 at 10:08 pm
  • Can anyone explain the rationale for numpy's allclose() semantics? help(allclose) says: allclose(a, b, rtol=1e-05, atol=1e-08) Returns True if two arrays are element-wise equal within a tolerance ...
    Steven D'ApranoSteven D'Aprano
    Jan 17, 2015 at 2:26 pm
    Jan 18, 2015 at 10:25 am
  • Hi All, I have made a script in which i have started two thread named thread 1 and thread 2. In thread 1 one function will run named func1 and in thread 2 function 2 will run named func 2. Thread 1 ...
    Robert CloveRobert Clove
    Jan 14, 2015 at 6:22 am
    Jan 14, 2015 at 6:55 pm
  • Folks, I've learned a lot today about python packaging and stuff, thanks to a couple of good websites. I've learned how to install a package from PyPi with pip, choose which version, upgrade it, ...
    FabienFabien
    Jan 12, 2015 at 10:35 pm
    Jan 14, 2015 at 11:08 am
  • Hi all, I'm working on a Python _3_ project that will be used to parse ISC DHCPD configuration files for statistics and alarming purposes (IP address pools, etc). Anyway, I'm hung up on this one ...
    Jason BaileyJason Bailey
    Jan 12, 2015 at 6:20 pm
    Jan 13, 2015 at 4:09 pm
  • Hello Team, Iam trying to generate a file which should have the contents in the below format # cat /root/schedule.conf Sunday 10:20 10:30 Sunday 10:30 10:40 Sunday 10:50 10:60 I have to build the ...
    Ganesh PalGanesh Pal
    Jan 11, 2015 at 11:47 am
    Jan 12, 2015 at 1:39 pm
  • I'm new to python and every time i type a command into the MS-DOS Commands it looks like this. Traceback<most recent call last: file "<stdin ";line 1 in <module name error:name strings'is not defined ...
    Jenacee OwensJenacee Owens
    Jan 11, 2015 at 10:13 pm
    Jan 11, 2015 at 11:57 pm
  • I am new to python. I downloaded python 2.7.8 tarball, successfully cross compiled it, to make sure that the subsystems are correctly built, I tried running the python test scripts on the MIPS based ...
    RameshRamesh
    Jan 11, 2015 at 3:07 am
    Jan 11, 2015 at 7:01 pm
Group Navigation
period‹ prev | Jan 2015 | next ›
Group Overview
grouppython-list @
categoriespython
discussions133
posts889
users183
websitepython.org

183 users for January 2015

Chris Angelico: 100 posts Steven D'Aprano: 60 posts Mark Lawrence: 39 posts Ian Kelly: 28 posts Marko Rauhamaa: 27 posts Dave Angel: 24 posts Rustom Mody: 23 posts Jacob Kruger: 19 posts Rick Johnson: 18 posts Gregory Ewing: 17 posts Ben Finney: 16 posts Steven D'Aprano: 16 posts Wxjmfauth: 15 posts Peter Otten: 15 posts Ganesh Pal: 14 posts Andrew Robinson: 12 posts Devin Jeanpierre: 12 posts Skip Montanaro: 12 posts Thomas 'PointedEars' Lahn: 12 posts Terry Reedy: 11 posts
show more
Archives