Search Discussions

152 discussions - 1,031 posts

  • import math import random import sys b=[] steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] for x in steve: print (steve[x]) Traceback (most recent call last): File "C:\Functions\blank.py", line 7, in ...
    Sep 3, 2014 at 6:10 pm
    Sep 5, 2014 at 3:08 am
  • I have created my first python program and I have learnt a lot about python from this group and wanted some feedback. I am still improving it and trying to tackle some performance and GUI stuff so ...
    Nicholas CannonNicholas Cannon
    Sep 20, 2014 at 1:16 pm
    Sep 23, 2014 at 3:59 am
  • I'm still doing practice problems. I haven't heard from the library on any of the books I have requested. http://www.practicepython.org/exercise/2014/04/16/11-check-primality-functions.html This is ...
    Sep 5, 2014 at 4:48 pm
    Sep 8, 2014 at 3:23 am
  • What is the rationale for gcd(x, y) in Fractions returning a negative value when y is negtive? For example gcd(3, -7) returns -1, which means that a co-prime test that would work in many other ...
    Sep 23, 2014 at 8:16 am
    Sep 25, 2014 at 11:03 am
  • I know I can get a list of the characters in a string by simply doing:- listOfCharacters = list("This is a string") ... but how do I get a list of integers? -- Chris Green ?
    Sep 3, 2014 at 12:27 pm
    Sep 8, 2014 at 7:41 am
  • While debugging my code I found that the bug was because I assumed that something like `divmod(float('inf'), 1)` would be equal to `(float('inf'), float('nan'))`, while Python returns `(float('nan'), ...
    Sep 16, 2014 at 9:40 pm
    Sep 19, 2014 at 6:48 am
  • greetings, i'm a long time perl programmer who is learning python. i'd be interested in any comments you might have on my code below. feel free to respond privately if you prefer. i'd like to know if ...
    David AlbanDavid Alban
    Sep 18, 2014 at 6:11 pm
    Sep 22, 2014 at 11:06 pm
  • Hi all I know there some Git experts on this list, so I hope you don't mind me posting this question here. I am slowly getting comfortable with Git, but there is something that confuses me. You are ...
    Frank MillmanFrank Millman
    Sep 16, 2014 at 6:22 am
    Sep 17, 2014 at 4:00 pm
  • I am using jsonpickle to store instances of an object into separate data files. If I make any changes to the original class definition of the object, when I recreate my stored instances, they are ...
    Josh EnglishJosh English
    Sep 3, 2014 at 8:32 pm
    Sep 15, 2014 at 7:30 pm
  • My function gets an iterable of an unknown type. I want to check whether it's ordered. I could check whether it's a `set` or `frozenset`, which would cover many cases, but I wonder if I can do ...
    Sep 18, 2014 at 11:55 am
    Sep 20, 2014 at 5:01 am
  • I'm following a tutorial about Flask using Python 3.4.1, but I'm getting an error with a dead simple example: generator.py: from flask import Flask, render_template app = Flask(__name__) ...
    Juan ChristianJuan Christian
    Sep 23, 2014 at 9:32 pm
    Sep 26, 2014 at 6:20 pm
  • I am on a mac running 10.8.5, python 2.7 Suddenly, many of my scripts started failing with: ValueError: unsupported hash type sha1 Googling this showed that it's an issue with hashlib with a common ...
    Larry MartellLarry Martell
    Sep 18, 2014 at 4:27 pm
    Sep 19, 2014 at 3:09 pm
  • I?ve been reading lots of systemd docs. And blogs. Etc. At this point, I think I would benefit from learning by example? Does anyone have an example .service file that they use to launch a long ...
    Travis GriggsTravis Griggs
    Sep 11, 2014 at 5:48 pm
    Sep 13, 2014 at 2:48 am
  • Python's input() or raw_input() function is good for getting a single line of text from the user. But what if you want a more substantial chunk of text from the user? Here's how to call out to an ...
    Steven D'ApranoSteven D'Aprano
    Sep 1, 2014 at 4:11 pm
    Sep 3, 2014 at 8:06 am
  • I am still kind of shooting in the dark. I wanted to try your example and it doesn't seem to work. This is the latest version of changes I have made so the entire program looks like this: newex='Hey ...
    Sep 1, 2014 at 12:04 am
    Sep 1, 2014 at 7:25 am
  • Greetings, Before I start writing my own. Is there something like collections.Counter (fore frequencies) that does "fuzzy" matching? Meaning x is considered equal to y if abs(x - y) < epsilon. (x, y ...
    Miki TebekaMiki Tebeka
    Sep 23, 2014 at 12:34 pm
    Sep 26, 2014 at 7:36 pm
  • Hello, I've made a long-time running daemon, which uses threads. Looks like that works perfectly, now I'm looking at the exceptions :). In the log, I found an interesting message: Exception in thread ...
    Ervin HegedüsErvin Hegedüs
    Sep 11, 2014 at 7:30 pm
    Sep 16, 2014 at 8:53 am
  • I built a small application using PyQt4 and pyqtgraph to visualize some data. The app has 32 graphs that plot deques of size 512. The plots are updated when 200 ints are cycled through each deque ...
    Sep 7, 2014 at 6:42 am
    Sep 10, 2014 at 2:15 am
  • - Hard drives have been the secondary storage of choice on computers for many years. They have improved in speed, in capacity, and in cost for over 50 years. It's interesting to look at how the ...
    Abohfu venant zinkengAbohfu venant zinkeng
    Sep 26, 2014 at 6:53 pm
    Sep 28, 2014 at 1:14 am
  • The csv.reader(f) object creates an iterable that will create lists from lines in f. The list will have values at indexes based on the commas in the file. EX: my_header_1, my_header_2 111, 0001 101, ...
    Sep 14, 2014 at 2:51 am
    Sep 23, 2014 at 7:59 am
  • I have googled for a solution to this problem. None I have tried worked. I have a very short program that runs for a count of 20 and ends. What I do is click on the IDLE window and without making any ...
    Sep 17, 2014 at 2:17 am
    Sep 19, 2014 at 7:47 pm
  • Dear all, I have trouble to implement crc algorithm in python 3.3 c version work perfect. I try to use bytes, int and c_types without any success can some who help me: c version: unsigned short ...
    Sep 2, 2014 at 5:50 pm
    Sep 3, 2014 at 2:31 pm
  • I have learned python for some time now. I am developing apps using django. I need some advice. I want to be able to write big programs using python. I have not been able to do that as of now. I need ...
    Ngangsia akumboNgangsia akumbo
    Sep 22, 2014 at 8:09 am
    Sep 23, 2014 at 3:08 pm
  • I wrote a small program that copies some files between directories. This is a special utility program for a particular customer. I could compile the program into a portable exe with cx_freeze, and ...
    Nagy László ZsoltNagy László Zsolt
    Sep 12, 2014 at 4:35 pm
    Sep 23, 2014 at 2:09 am
  • import random nums=range(1,11) print (nums) samp=random.sample(nums,10) top=nums newlist=nums[::-1] tail=newlist for x in range(10): print ("Top {:2d} Tail {:2.0f} Sample {:2d} ...
    Sep 15, 2014 at 2:40 am
    Sep 15, 2014 at 4:16 pm
  • "We made from water every living thing"... http://upload.7hob.com/images2014/www.7hob.com1370521056748.jpg Allah (s.w.t.) said in the Holy book (... We have made from water every living thing.) ...
    Sep 4, 2014 at 8:44 pm
    Sep 8, 2014 at 6:51 pm
  • https://www.python.org/ seems to be down when I last checked on 06:45 UTC on 26th Sep 2014. Anybody else experiencing this problem?
    Sep 26, 2014 at 6:46 am
    Sep 26, 2014 at 7:37 am
  • I have a certain calculation which can be performed two radically different ways. With the first algorithm, let's call it SHORT, performance is very fast for small values of the argument, but ...
    Steven D'ApranoSteven D'Aprano
    Sep 23, 2014 at 2:48 pm
    Sep 26, 2014 at 3:11 am
  • x={'f1':1,'f2':2,'f3':3} how can i create the following html file automatically with python to display x ? <table border=1 <tr <td f1 </td <td f2 </td <td f3 </td </tr <td 1 </td <td 2 </td <td 3 ...
    Sep 23, 2014 at 2:18 pm
    Sep 24, 2014 at 9:27 am
  • Dear all, since a few days, when I select Help - Python Docs from the IDLE menu, the link to the documentation that it tries to open in my browser isn't working anymore. The URL IDLE uses (copied ...
    Wolfgang MaierWolfgang Maier
    Sep 17, 2014 at 8:31 am
    Sep 20, 2014 at 3:28 am
  • Hi All, Greetings ! I am bit familiar with Django and Python. I want to create ERP on python. Initially I feel Django will be good option for My Own ERP, but after working bit on that I feel it ...
    Vimal RughaniVimal Rughani
    Sep 9, 2014 at 8:25 am
    Sep 11, 2014 at 7:20 pm
  • Hello, In the ThreadPoolExecutor (TPE), is the callback always guaranteed to run in the same thread as the submitted function? For example, I tested this with the following code. I ran it many times ...
    Praveen GollakotaPraveen Gollakota
    Sep 24, 2014 at 2:44 pm
    Sep 25, 2014 at 4:04 pm
  • I do not know what these three filesare doing, but suddenly they have caught in a loop every time I try to run some code. I grabbed the trace decorator from the python library and this is the last ...
    Josh EnglishJosh English
    Sep 14, 2014 at 6:44 am
    Sep 16, 2014 at 1:39 am
  • (I realize that this may be seen as off topic for as a general python question, but given my historical experience with the Debian community?s predilection to answer all questions with a grumpy ?go ...
    Travis GriggsTravis Griggs
    Sep 8, 2014 at 7:04 pm
    Sep 13, 2014 at 10:40 am
  • I have a list with a fixed number of elements which I need to grow; ie. add rows of a fixed number of elements, some of which will be blank. e.g. [['a','b','c','d'], ['A','B','C','D'], ['', 'aa', ...
    Sep 9, 2014 at 5:50 am
    Sep 9, 2014 at 12:07 pm
  • I have gone ahead and set it all up by using pip install psycopg2 but I would still like to determine why Pycharm couldn't find the $PATH variable
    Sep 1, 2014 at 12:20 am
    Sep 1, 2014 at 11:13 pm
  • Hi, I made simple test program using the subprocess module (see attached: exec_cmd.py). I ran it passing variations of 'ls' command options. I encounter exceptions every time I use '-l' options ...
    Earl LapusEarl Lapus
    Sep 1, 2014 at 3:28 am
    Sep 1, 2014 at 7:45 pm
  • Yes, it's another "how can I see if two numbers are approximately equal" thread, but this time I have a concrete definition of "approximately equal"... and they're Decimals, not floats. I have a ...
    Chris AngelicoChris Angelico
    Sep 24, 2014 at 4:54 pm
    Sep 25, 2014 at 12:46 pm
  • There is a file named analyse.py in the D:\Python34\Lib\site-packages. import sqlite3,os,jinja2 db = r'F:\workspace\china\data\china.sqlite' con = sqlite3.connect(db) cur = con.cursor() class ...
    Sep 24, 2014 at 1:55 pm
    Sep 25, 2014 at 6:44 am
  • 'L\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f' Traceback (most recent call last): File "<stdin ", line 1, in <module File "<stdin ", line 1, in <lambda TypeError: can't concat bytes ...
    Nagy László ZsoltNagy László Zsolt
    Sep 20, 2014 at 10:00 am
    Sep 20, 2014 at 12:37 pm
  • The latest version of the Zeus IDE adds Python autocomplete using the Jedi package. Details about Jedi can be found here: http://jedi.jedidjah.ch/en/latest/ Details of how the autocomplete works can ...
    Jumppanen JussiJumppanen Jussi
    Sep 17, 2014 at 12:52 am
    Sep 18, 2014 at 1:12 am
  • ************************************************************* This message has been checked for viruses by the Birmingham Grid for Learning. For guidance on good e-mail practice, e-mail viruses and ...
    D MoorcroftD Moorcroft
    Sep 10, 2014 at 11:14 am
    Sep 16, 2014 at 6:50 pm
  • A better way to do this is with a list comprehension: x = [e for e in foo if e %2 == 0] Modifying something that you're iterating over is unspecified, I believe. Certainly it's not a good idea. ChrisA
    Chris AngelicoChris Angelico
    Sep 13, 2014 at 6:22 am
    Sep 16, 2014 at 3:19 pm
  • Here is a screenshot of me trying Dave Briccetti's quiz program from the shell and it (the shuffle command) works. https://www.youtube.com/watch?v=VR-yNEpGk3g http://i.imgur.com/vlpVa5i.jpg Two ...
    Sep 13, 2014 at 11:47 pm
    Sep 15, 2014 at 2:30 pm
  • Hello group members, I have worked with languages like C, C++, C#, Java and Objective C before. Now I want to learn Python. Most of the resources that I have seen online are oriented mainly towards ...
    Sohi Khushi7Sohi Khushi7
    Sep 4, 2014 at 6:13 pm
    Sep 4, 2014 at 8:21 pm
  • Hi, is there any reliable and inexpensive way to inspect a callable from running Python code to learn whether it is implemented in Python or C before calling into it ? Thanks, Wolfgang
    Wolfgang MaierWolfgang Maier
    Sep 26, 2014 at 7:47 am
    Sep 26, 2014 at 6:42 pm
  • Hi, I am learning to use unittest with python and walkthrough with this example http://agiletesting.blogspot.com/2005/01/python-unit-testing-part-1-unittest.html so my test script is like this ...
    Milson MunakamiMilson Munakami
    Sep 24, 2014 at 7:33 pm
    Sep 24, 2014 at 9:39 pm
  • Hi, When a class is defined within a function, the class generation function's '__qualname__' attrbute is not qualified a name. For instance: def test(): class T: def method(self): pass t = T() ...
    ISE DevelopmentISE Development
    Sep 6, 2014 at 4:13 pm
    Sep 7, 2014 at 10:25 pm
  • I still can't get the syntax test='Hey buddy get away from my car' if test[0].alpha(): return True
    Sep 2, 2014 at 8:13 pm
    Sep 2, 2014 at 8:50 pm
  • Hi, I am writing this program from https://docs.python.org/2/library/email-examples.html but getting the error as singhom at debian:~/pythons$ python send_email.py Traceback (most recent call last) ...
    Om PrakashOm Prakash
    Sep 1, 2014 at 11:35 pm
    Sep 2, 2014 at 3:28 am
Group Navigation
period‹ prev | Sep 2014 | next ›
Group Overview
grouppython-list @

209 users for September 2014

Chris Angelico: 150 posts Steven D'Aprano: 58 posts Seymore4Head: 35 posts Terry Reedy: 35 posts Mark Lawrence: 34 posts Ian Kelly: 33 posts Peter Otten: 32 posts Rustom Mody: 25 posts Dave Angel: 17 posts MRAB: 16 posts Michael Torrie: 15 posts Cameron Simpson: 14 posts Larry Martell: 14 posts Ned Batchelder: 14 posts Dieter: 13 posts Juan Christian: 13 posts Marko Rauhamaa: 13 posts Blindanagram: 12 posts Nagy László Zsolt: 12 posts Chris Kaynor: 10 posts
show more