FAQ

Search Discussions

284 discussions - 2,507 posts

  • I use arparse all the time and find it serves my needs well. One thing I'd like to see. In the help message, I'd like to automatically add the default values. For example, here's one of my programs ...
    Neal BeckerNeal Becker
    Nov 22, 2013 at 2:56 pm
    Nov 22, 2013 at 9:10 pm
  • Hello, If I have a class that has some member functions, and all the functions define a local variable of the same name (but different type), is there some way to use getattr/setattr to access the ...
    Catherine M MoroneyCatherine M Moroney
    Nov 21, 2013 at 11:12 pm
    Nov 22, 2013 at 4:07 am
  • If c = map(sum, zip([1, 2, 3], [4, 5, 6])) c Out[7]: [5, 7, 9] why then can't I do this? a = ([1, 2], [3, 4]) b = ([5, 6], [7, 8]) c = map(sum, zip(a, b)) ...
    FlebberFlebber
    Nov 20, 2013 at 10:06 am
    Nov 21, 2013 at 8:58 am
  • Hello everyone, I was hoping for some advice in dealing with an edge case related to Python's HTTP Header handling. Python is correctly assuming that the HTTP header field name (eg Content-Type) is ...
    Logan OwenLogan Owen
    Nov 18, 2013 at 2:25 pm
    Nov 21, 2013 at 12:49 am
  • H?llo Pythonistas from all over the world, I'm very proud to announce the immediate availability of Pythonium Core 0.2.5, a Python 3 to Javascript translator (the best) that generates *fast* ...
    Amirouche BoubekkiAmirouche Boubekki
    Nov 17, 2013 at 7:17 pm
    Nov 18, 2013 at 9:31 pm
  • Hi! I hope you can help me. I'm writting a simple piece of code. I need to keep asking for a number until it has all this specifications: - It is a number - It's lenght is 3 - The hundred's digit ...
    Arturo BArturo B
    Nov 16, 2013 at 2:15 am
    Nov 16, 2013 at 3:15 am
  • https://twitter.com/dabeaz/status/400813245532876800/photo/1 "Now THIS is a Python book I should get. I'm guessing it's about design patterns. Or maybe just the GIL. " --- Roy Smith roy at panix.com ...
    Roy SmithRoy Smith
    Nov 14, 2013 at 6:11 pm
    Nov 15, 2013 at 5:38 am
  • From http://docs.python.org/dev/whatsnew/3.4.html#optimizations "The UTF-32 decoder is now 3x to 4x faster.". Does anybody have any references to this work? All I can find is the 3.3 what's new which ...
    Mark LawrenceMark Lawrence
    Nov 11, 2013 at 9:41 pm
    Nov 13, 2013 at 7:14 am
  • Here's the code: from random import random from time import clock s = clock() for i in (1, 2, 3, 6, 8): M = 0 N = 10**i for n in xrange(N): r = random() if 0.5 < r < 0.6: M += 1 k = (N, float(M)/N) ...
    Pascal BitPascal Bit
    Nov 8, 2013 at 5:48 pm
    Nov 11, 2013 at 2:16 am
  • hiiii
    Kewl pKewl p
    Nov 7, 2013 at 3:18 am
    Nov 7, 2013 at 1:48 pm
  • Hi friends help me with the following code. Im able to execute the code but getting wrong output def sequence_b(N): N = 10 result = 0 for k in xrange (1,N): result += ((-1) ** (k+1))/2*k-1 print ...
    ChovdaryChovdary
    Nov 6, 2013 at 1:51 am
    Nov 7, 2013 at 1:08 pm
  • Hi, I am looking at three Github-like programs (Stash, Gitbucket and Trac) to see if they could be used in our company. I would like to test the reliability and stability of at least one of them (I ...
    Albert-Jan RoskamAlbert-Jan Roskam
    Nov 1, 2013 at 3:03 pm
    Nov 6, 2013 at 10:25 pm
  • Hi, I have cloned someone's repository on my local drive using git command: git clone http://github.com/xxx.git But I don't find any setup.py file. How do I install the package xxx? So that I can ...
    C. NgC. Ng
    Nov 4, 2013 at 9:56 am
    Nov 6, 2013 at 2:49 pm
  • Dear all, Suppose i have a variable such as : myVar = 'x' May be it initialized with myVar = u'x' or myVar = 'x' So i need determine content of myVar that it's utf-8 or not, how can i do it? --mohsen
    Mohsen PahlevanzadehMohsen Pahlevanzadeh
    Nov 5, 2013 at 1:02 pm
    Nov 6, 2013 at 6:03 am
  • I am learning Python and wish to develop GUI applications to run on Windows. I have installed the Visual Studio integrated shell (Ver. 12.0.21005.1 REL) IDE and the Python 3.3 interpreter. I have ...
    Ev JEv J
    Nov 20, 2013 at 4:03 pm
    Nov 21, 2013 at 4:14 am
  • the command label gets "stuck"
    Annmarina NagyAnnmarina Nagy
    Nov 19, 2013 at 1:50 pm
    Nov 20, 2013 at 2:52 am
  • I have written the script as: import os import MySQLdb as mdb os.chroot("/lxc/rootfs") os.chdir("/") con = mdb.connect(host="192.168.1.7", user="root", passwd="password") print "opened" con.close() ...
    Himanshu GargHimanshu Garg
    Nov 19, 2013 at 6:03 am
    Nov 19, 2013 at 6:31 am
  • Hi people! I am looking for a python library that does mailing directly through "sendmail". When I look into the docs, I see only an "smtlip" library but nothing that could serve with sendmail or ...
    Tamer HigaziTamer Higazi
    Nov 13, 2013 at 4:52 am
    Nov 19, 2013 at 12:04 am
  • We can convert from hex str to bytes with bytes.fromhex class method: But we cannot convert from hex binary: Traceback (most recent call last): File "<stdin ", line 1, in <module TypeError: must be ...
    Laszlo NagyLaszlo Nagy
    Nov 16, 2013 at 10:16 pm
    Nov 17, 2013 at 4:22 pm
  • ====================================================== root at secure [~/distribute-0.6.49]# pip install pygeoip Downloading/unpacking pygeoip Downloading pygeoip-0.3.0.tar.gz (97kB): 97kB downloaded ...
    NikosNikos
    Nov 17, 2013 at 3:32 pm
    Nov 17, 2013 at 4:01 pm
  • One thing I always liked about Perl was the way you can create a single installation directory which can be shared between archictures. Say what you will about the language: the Porters have an ...
    Paul SmithPaul Smith
    Nov 15, 2013 at 11:00 pm
    Nov 17, 2013 at 3:58 pm
  • ====================================================== root at secure [~/distribute-0.6.49]# pip install pygeoip Downloading/unpacking pygeoip Downloading pygeoip-0.3.0.tar.gz (97kB): 97kB downloaded ...
    NikosNikos
    Nov 17, 2013 at 2:11 pm
    Nov 17, 2013 at 3:39 pm
  • python3.4 is gone at this stage. Now if i only could install pip for Python 3.3.2 Here is what i have tried: root at secure [~]# which python3 /usr/bin/python3 root at secure [~]# which pip ...
    NikosNikos
    Nov 17, 2013 at 9:56 am
    Nov 17, 2013 at 1:19 pm
  • I am implementing an authentication system(in Django) using LDAP as the backend(django-auth-ldap). When we fetch the data from the LDAP server for a particular valid user, the data associated with ...
    Shyam Parimal KattiShyam Parimal Katti
    Nov 14, 2013 at 3:32 pm
    Nov 14, 2013 at 10:22 pm
  • Hi, I need to write a binary file exactly as written by fortran code below to be read by another code which is part of a model which is not advisable to edit.I would like to use python for this ...
    Sudheer JosephSudheer Joseph
    Nov 14, 2013 at 12:53 am
    Nov 14, 2013 at 2:46 pm
  • Hello, I am trying to build a structure to be passed down to an I2C device driver. The driver expects a struct that has a data array of size 512 bytes among other things. This is my code - rd_wr = ...
    Krishna2prasadKrishna2prasad
    Nov 13, 2013 at 6:31 pm
    Nov 13, 2013 at 8:47 pm
  • Hi all, I have an .py file with a simple assignment in it: foo = 'bar' Now, I want to set a conditional breakpoint in gdb, breaking on that assignment (I'm guessing the top of the stack would be ...
    Demian BrechtDemian Brecht
    Nov 9, 2013 at 2:03 am
    Nov 12, 2013 at 3:49 pm
  • Uses an example written in Ruby, but don't let that put you off: http://raganwald.com/2008/05/narcissism-of-small-code-differences.html -- Steven
    Steven D'ApranoSteven D'Aprano
    Nov 9, 2013 at 12:42 pm
    Nov 11, 2013 at 9:53 am
  • I am trying to help a student of mine install Python 3 on his MacBook Pro. The installation succeeds. However, upon opening the Python interpreter, he can only execute one Python command ...
    John LadaskyJohn Ladasky
    Nov 6, 2013 at 6:15 pm
    Nov 10, 2013 at 4:50 pm
  • hi. got a test file with the sample content listed below: the content is one long string, and needs to be split into separate lines I'm thinking the pattern to split on should be a kind of regex ...
    BruceBruce
    Nov 7, 2013 at 5:15 pm
    Nov 10, 2013 at 1:05 am
  • Hello Everyone, I'm writing a little helper script in Python that will access a JSON formatted argument from the shell when it's called. The parameter will look like this ...
    Anthony PapillionAnthony Papillion
    Nov 7, 2013 at 3:53 am
    Nov 7, 2013 at 5:11 pm
  • I'm playing with a BeagleBone Black running the angstrom distro. Of course, stock python is 2.7, I'd rather use python3. There isn't a python3 package available for angstrom. So I downloaded the ...
    Travis GriggsTravis Griggs
    Nov 4, 2013 at 5:22 pm
    Nov 5, 2013 at 9:25 am
  • Hi, who has some problems to practice using Python? Thx a lot!
    Yungwong SeuYungwong Seu
    Nov 4, 2013 at 2:06 am
    Nov 5, 2013 at 12:13 am
  • When I create stand-alone command-line scripts that take arguments, usually they're akin to version-control tools, so I have the form scriptname.py [--global-opts] <command [--command-opts] [args] so ...
    Tim ChaseTim Chase
    Nov 1, 2013 at 12:45 am
    Nov 2, 2013 at 8:37 am
  • I am currently using Windows 7 Sp1, Tkinter 8.5, Python 2.7.4 on a laptop with no attached monitor. I am attempting to use winfo_screenmmwidth, but the returned value is incorrect. Specs state 280 ...
    JosefgJosefg
    Nov 26, 2013 at 10:13 pm
    Dec 4, 2013 at 1:33 am
  • Hello! I'm using Jython to write a game with Python/Jython/LibGDX. I wasn't having any trouble, and everything was going well, but sadly I can't access items in enumerations. If you know about the ...
    Eamonn ReaEamonn Rea
    Nov 28, 2013 at 5:22 pm
    Nov 29, 2013 at 7:40 pm
  • I have the following script however when the clipboard contents are greek letters it fails to print them right. I have used all posible encoding for greek letters including utf8 but to no avail so i ...
    MefistofelisMefistofelis
    Nov 28, 2013 at 10:22 pm
    Nov 29, 2013 at 3:48 am
  • Hi Terry, Thanks for your comment. I use Python 2.7.5 Sorry, I will do it. File my_program.py import wx.aui import paramiko import telnetlib from LinuxHostPage import * from WindowsHostPage import * ...
    Hoàng Tuấn ViệtHoàng Tuấn Việt
    Nov 19, 2013 at 8:39 am
    Nov 27, 2013 at 3:19 pm
  • Hi, I'm trying to use Python's new style string formatting with a dict and string together. For example, I have the following dict and string variable: my_dict = { 'cat': 'ernie', 'dog': 'spot' } foo ...
    Victor HooiVictor Hooi
    Nov 27, 2013 at 12:01 am
    Nov 27, 2013 at 12:21 am
  • Hi all, How can we set the target folder for the package in Setuptools? Thanks & regards, Chandru **************** CAUTION - Disclaimer ***************** This e-mail contains PRIVILEGED AND ...
    Chandru RajendranChandru Rajendran
    Nov 25, 2013 at 8:35 am
    Nov 25, 2013 at 11:14 pm
  • Hi all I have a question arising from another thread, but on a different topic, hence the new thread. Under Python2, if you want to print a series of dots to the screen without a newline, you can do ...
    Frank MillmanFrank Millman
    Nov 23, 2013 at 1:26 pm
    Nov 24, 2013 at 2:39 pm
  • I'm trying to use sh (https://pypi.python.org/pypi/sh) for calling system grep command but it's now working as expected. An example: import sh sh.grep('abc', os.getcwd(), '-r') But I get the ...
    LucaLuca
    Nov 23, 2013 at 2:38 pm
    Nov 23, 2013 at 5:23 pm
  • is there anyway to run command line on Windows without showing DOS console window ? can you use the following command line to give a little example ? wget -r -np -nd http://example.com/packages/ the ...
    iMathiMath
    Nov 20, 2013 at 2:44 pm
    Nov 23, 2013 at 4:13 pm
  • I am new to programming python for JSON to SQL and I was wondering why this does not work. All the values for entering the DB are correct. The EnterpriseValue data is not entering the database ...
    Aaron G.Aaron G.
    Nov 23, 2013 at 5:54 am
    Nov 23, 2013 at 8:52 am
  • I'm thinking of porting a Python application that uses numpy for web, basically would like to upload a user-defined data, perform the calculations with numpy and plot charts with the general ...
    Renato Barbosa Pim PereiraRenato Barbosa Pim Pereira
    Nov 22, 2013 at 6:15 am
    Nov 22, 2013 at 10:24 am
  • Hi, I'm pretty new to python, I'm trying to figure out how a python module is supposed to make non-backwards-compatible changes without blowing up the applications that use it. In the C world this is ...
    Chris FriesenChris Friesen
    Nov 21, 2013 at 12:02 am
    Nov 21, 2013 at 11:56 pm
  • Hello all, I am getting above error when trying to import ssl module. In fact, the error showed up during the build and _ssl module was added to the failed module list. However, the compilation and ...
    DellairDellair
    Nov 20, 2013 at 8:21 am
    Nov 20, 2013 at 8:38 am
  • This will be very simple to most of you I guess but it's killing me! print ("Please type in your age") age = input () leave = 16 print ("You have" + leave - age + "years left at school") I want to ...
    Ed TaylorEd Taylor
    Nov 18, 2013 at 11:56 pm
    Nov 19, 2013 at 12:22 am
  • Hello, If someone is interested about a fast Python to Javascript translator (not a compiler like Brython which is another beast) Here is a link of a RapydScript Tester. For now it's only for ...
    Salvatore DI DIOSalvatore DI DIO
    Nov 17, 2013 at 7:16 pm
    Nov 18, 2013 at 11:52 pm
  • Hi all, I use Python telnetlib on Windows 7 32 bit. Here is my code: def telnet(self, host, os, username, password): connection = telnetlib.Telnet(host) connection.read_until('login: ') ...
    Hoàng Tuấn ViệtHoàng Tuấn Việt
    Nov 18, 2013 at 4:55 am
    Nov 18, 2013 at 1:16 pm
Group Navigation
period‹ prev | Nov 2013 | next ›
Group Overview
grouppython-list @
categoriespython
discussions284
posts2,507
users357
websitepython.org

357 users for November 2013

Chris Angelico: 300 posts Mark Lawrence: 178 posts Νίκος Γκρ33κ: 129 posts Steven D'Aprano: 100 posts Ned Batchelder: 61 posts Antoon Pardon: 57 posts Roy Smith: 49 posts Alister: 45 posts Rusi: 43 posts Joel Goldstick: 42 posts Terry Reedy: 41 posts Rick Johnson: 40 posts Tim Chase: 40 posts Denis McMahon: 33 posts Νίκος: 33 posts Grant Edwards: 32 posts MRAB: 31 posts Dave Angel: 28 posts Ben Finney: 27 posts Ian Kelly: 26 posts
show more
Archives