FAQ

Search Discussions

295 discussions - 1,924 posts

  • Hello, i decided to switch from embedding string into .html to actually grab the filepath in order to identify it: # ...
    Ferrous CranusFerrous Cranus
    Jan 22, 2013 at 10:07 am
    Jan 23, 2013 at 10:46 pm
  • See this code (understand why I commented out first line): # from OpenGL.GL import * from OpenGL.GL import glEnable, GL_DEPTH_TEST, \ glShadeModel, GL_SMOOTH, glClearColor, \ GL_CULL_FACE, GL_BLEND, ...
    SomeoneSomeone
    Jan 1, 2013 at 11:00 am
    Jan 6, 2013 at 12:46 pm
  • I use this .htaccess file to rewrite every .html request to counter.py # ================================================================================================================= ...
    Ferrous CranusFerrous Cranus
    Jan 18, 2013 at 8:48 pm
    Jan 24, 2013 at 12:53 am
  • Hello, I new in this python and decided to learn more about it, so i can make an own script :), for all senior can you suggest me the best, friendly and easy use with nice GUI editor for me, and have ...
    Hazard SeventyfourHazard Seventyfour
    Jan 24, 2013 at 9:43 am
    Jan 29, 2013 at 6:01 pm
  • an else statement is running when it shouldnt be. It is on the last line. Whenever i am in the math or game function, when i type in main, it goes back to the start of the program, but it also says ...
    Eli mEli m
    Jan 21, 2013 at 4:40 am
    Jan 25, 2013 at 8:15 am
  • http://www.tuxradar.com/content/save-time-gedit-snippets: To convert tab-separated text lines into a HTML-table: $< lines = $GEDIT_SELECTED_TEXT.split("\n"); output = '<table\ \n'; for line in ...
    Kurt HansenKurt Hansen
    Jan 6, 2013 at 12:42 pm
    Jan 11, 2013 at 4:35 am
  • When trying to open an html template within Python script i use a relative path to say go one folder back and open index.html f = open( '../' + page ) How to say the same thing in an absolute way by ...
    Ferrous CranusFerrous Cranus
    Jan 16, 2013 at 1:51 pm
    Jan 21, 2013 at 7:05 pm
  • I have a dataset that consists of a dict with text descriptions and values that are integers. If required, I collect the values into a list and create a numpy array running it through a simple ...
    Joseph L. CasaleJoseph L. Casale
    Jan 6, 2013 at 7:44 pm
    Jan 11, 2013 at 2:30 pm
  • I've written a small assembler in Python 2.[67], and it needs to evaluate integer-valued arithmetic expressions in the context of a symbol table that defines integer values for a set of names. The ...
    Grant EdwardsGrant Edwards
    Jan 3, 2013 at 11:25 pm
    Mar 15, 2013 at 3:02 am
  • try: cur.execute( '''SELECT URL, hits FROM counters ORDER BY hits DESC''' ) except MySQLdb.Error, e: print ( "Query Error: ", sys.exc_info()[1].excepinfo()[2] ) else: data = cur.fetchall() for row in ...
    Ferrous CranusFerrous Cranus
    Jan 26, 2013 at 5:51 pm
    Feb 4, 2013 at 6:39 am
  • I have strings such as: tA.-2AG.-2AG,-2ag or .+3ACG.+5CAACG.+3ACG.+3ACG The plus and minus signs are always followed by a number (say, i). I want python to find each single plus or minus, remove the ...
    SiaSia
    Jan 5, 2013 at 8:35 am
    Jan 7, 2013 at 7:07 am
  • [Python 2.7/3.3 (and hg tip) running on Windows. Not Windows-specific, though]. I use the python -mpackage incantation to run a package which has a __main__.py module and which uses relative imports ...
    Tim GoldenTim Golden
    Jan 22, 2013 at 9:24 am
    Jan 24, 2013 at 8:54 pm
  • I don't know what to call these, so for now I'll call them "training text movies" until I come up with a better name.. I hope these will be helpful, especially to new students of Python ...
    AKAK
    Jan 13, 2013 at 5:11 am
    Jan 21, 2013 at 10:31 pm
  • Python's module/package access uses dot notation. mod1.mod2.mod3.modN Like many warts of the language, this wart is not so apparent when first learning the language. The dot seems innocently ...
    Rick JohnsonRick Johnson
    Jan 11, 2013 at 6:01 am
    Jan 15, 2013 at 8:08 am
  • Here I have a code which basically reads a csv file, tries to compare the last 2 items in each line of the file. f = open(r"Z:\modules\Feature_Vectors_300_Pclass.arff") for l in f: sp = l.split(",") ...
    Inshu chauhanInshu chauhan
    Jan 24, 2013 at 10:37 am
    Jan 25, 2013 at 3:14 pm
  • I just need a way to CONVERT a string(absolute path) to a 4-digit unique number with INT!!! That's all i want!! But i cannot make it work :( And the best part is that "that" number must be able to ...
    Ferrous CranusFerrous Cranus
    Jan 22, 2013 at 4:15 pm
    Jan 23, 2013 at 8:44 am
  • hy everyone, for my exam this year i had to write a computer game on vpython (visualpython).we had to make a lunar lander game where the ship drops by gravity and is able to manouver to safely land ...
    JeltedeproftJeltedeproft
    Jan 4, 2013 at 6:23 pm
    Jan 14, 2013 at 4:01 pm
  • In the code below I am trying to read 2 files f1 and f2 , extract some data from them and then trying to write them into a single file that is 'nf'. import cv f1 = ...
    Inshu chauhanInshu chauhan
    Jan 28, 2013 at 1:31 pm
    Jan 30, 2013 at 1:58 pm
  • A programmer had a problem, and thought Now he has "I know, I'll solve two it with threads!" problems. -- Steven
    Steven D'ApranoSteven D'Aprano
    Jan 14, 2013 at 4:16 am
    Jan 17, 2013 at 7:26 am
  • This sounds so simple but being new to python I am finding it hard to get started. I want to create a module which I will call "B". There will be other modules called "C", "D", etc, which will most ...
    Kene MeniruKene Meniru
    Jan 3, 2013 at 4:32 am
    Jan 4, 2013 at 1:05 am
  • Hi, I have a problem which may fit in a mysql database, but which I only have python as an alternate tool to solve... so I'd like to hear some opinions... I'm building a experimental content ...
    Andrew RobinsonAndrew Robinson
    Jan 17, 2013 at 11:59 pm
    Jan 20, 2013 at 2:02 am
  • I have believed for a very long time that "class" was a poor choice of keyword to designate an "object definition". Firstly, the word /class/ does not transform smoothly into CS from English. NO ...
    Rick JohnsonRick Johnson
    Jan 14, 2013 at 6:46 am
    Jan 15, 2013 at 9:01 am
  • Hi, I've developed a website for beginners to Python. I'd appreciate any comments or criticism. It's still under development, and should be finished in the next few months. Oh, and it's free to use ...
    RikRik
    Jan 18, 2013 at 2:47 pm
    Jan 19, 2014 at 7:07 am
  • # insert new page record in table counters or update it if already exists try: cursor.execute( '''INSERT INTO counters(page, hits) VALUES(%s, %s) ON DUPLICATE KEY UPDATE hits = hits + 1''', ...
    Ferrous CranusFerrous Cranus
    Jan 24, 2013 at 11:04 am
    Jan 26, 2013 at 10:35 am
  • An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-list/attachments/20130117/163e45d2/attachment-0001.html
    iMathiMath
    Jan 17, 2013 at 12:34 am
    Jan 21, 2013 at 5:44 am
  • Python needs to trim the path to the source file from which the exception was caught and only display the relative path starting from your personal library folder. For example. Say your personal ...
    Rick JohnsonRick Johnson
    Jan 16, 2013 at 5:59 am
    Jan 20, 2013 at 4:08 pm
  • hi . . my name is usama khan i am the student of civil engeering and we got assignment to make a project program on flexible pavement design using python. i know very litle about programing. still ...
    UsamazohadUsamazohad
    Jan 1, 2013 at 3:40 pm
    Jan 2, 2013 at 2:44 pm
  • You have a loop here that can never terminate, because number_of_floors never changes. There are a couple of solutions to this. One would be to compare floor_number to number_of_floors, and stop the ...
    Chris AngelicoChris Angelico
    Jan 1, 2013 at 12:08 am
    Jan 1, 2013 at 10:34 pm
  • I have a working script which takes argv[1] as an input, deassembles each line, and then each word. Then after it capitalizes all its word (upcases the first letter) and then prints it out on the ...
    Santosh KumarSantosh Kumar
    Jan 19, 2013 at 10:13 am
    Jan 24, 2013 at 10:47 am
  • Hi Al I have Data file have below Data file V1 V2 V3 V4 V4 V3 How to using count number of data ? Output V1 = 1 V2 = 1 V3 =2 V4 = 2 # Global Veriable printque = {} in def have below printque[val] = ...
    MoonhktMoonhkt
    Jan 23, 2013 at 7:26 am
    Jan 24, 2013 at 6:30 pm
  • Hello fellow Python programmers, I'm building a 32-bit CPython 2.7.3 distro for Windows using the MS Visual Studio Professional 2008 SP1 (and all hotfixes) MSVC 9 compiler. My build works, ...
    Leonard, ArahLeonard, Arah
    Jan 17, 2013 at 3:29 pm
    Jan 21, 2013 at 9:03 pm
  • Hello people, Is there any built-in way to know if an object is a valid dictionary key ? From what I know, the object must be hashable, and from the python doc, an object is hashable if it has the ...
    Jean-Michel PichavantJean-Michel Pichavant
    Jan 18, 2013 at 10:36 am
    Jan 19, 2013 at 8:49 am
  • Hi all, I have recently started learning Python (2.7.3) but need a better explanation of how to use tuples and dictionaries. I am currently using "Learning Python" by Mark Lutz and David Ascher, ...
    Daniel W. Rouse Jr.Daniel W. Rouse Jr.
    Jan 30, 2013 at 2:55 am
    Feb 3, 2013 at 7:21 am
  • Hi guys, I am thinking of driving a DJ application from Python. I am running Linux and I found the Mixxx app. Does anyone know if there are python bindings, or if this is possible at all? or does ...
    MikprogMikprog
    Jan 28, 2013 at 3:10 pm
    Jan 30, 2013 at 3:43 am
  • I wish to add a key to a dict only if it doesn't already exist, but do it in a thread-safe manner. The naive code is: if key not in dict: dict[key] = value but of course there is a race condition ...
    Steven D'ApranoSteven D'Aprano
    Jan 19, 2013 at 4:07 am
    Jan 19, 2013 at 1:04 pm
  • Hello, How to *quickly* calculate large numbers. For example 11258999068426240000000000000000000000000L Regards. An HTML attachment was scrubbed... URL ...
    Nac TemhaNac Temha
    Jan 8, 2013 at 12:44 am
    Jan 8, 2013 at 4:33 pm
  • I read Wall Street Journal, and occasionally check articles on their Web site. It's mostly free, with some items available to subscribers only. It seems random, which ones they block, about 20% ...
    RichDRichD
    Jan 30, 2013 at 4:55 am
    Jan 31, 2013 at 1:40 am
  • Hi all, I have tried to use different interpolation methods with Scipy. My code seems just fine with linear interpolation, but shows memory error with quadratic. I am a novice for python. I will ...
    Isaac WonIsaac Won
    Jan 23, 2013 at 4:06 am
    Jan 24, 2013 at 10:30 am
  • Hi, I'm a bit stuck on this "INSERT INTO" syntax error. I have no idea why it's not working actually... I've tried changing column types to char but that didn't work. I've gone a bit blind looking at ...
    AndydtaylorAndydtaylor
    Jan 9, 2013 at 11:52 pm
    Jan 10, 2013 at 7:07 pm
  • pls I want to write a function that can compute for the sqrt root of any number.bt it not working pls help. from math import sqrt def squareroot(self): x = sqrt(y) print x An HTML attachment was ...
    KwakukwatiahKwakukwatiah
    Jan 9, 2013 at 9:03 pm
    Jan 10, 2013 at 3:01 am
  • my question is can we import newtonsmethod from nympy or sciPy?
    Usama KhanUsama Khan
    Jan 1, 2013 at 11:01 pm
    Jan 2, 2013 at 4:10 am
  • can someone give me a link to download pyrudp. I tried here http://code.google.com/p/pyrudp/ but didn?t worked. if someone can give me another idea it will be great to. I?m traying to make a reliable ...
    Jorge Alberto Diaz OrozcoJorge Alberto Diaz Orozco
    Jan 30, 2013 at 7:13 am
    Jan 31, 2013 at 12:14 am
  • 10

    help

    download wxpython but whenever I try to use it I get this I?m a beginner in python pls I need help. Traceback (most recent call last): File "C:/Python27/wxp.py", line 1, in <module import wx File ...
    KwakukwatiahKwakukwatiah
    Jan 7, 2013 at 11:35 pm
    Jan 30, 2013 at 10:20 pm
  • Dear Pythoneers, I've got a seemingly simple problem, but for which I cannot find a simple solution. I have a set of objects (say S) containing an object which is equal to a given object (say x). So ...
    Arnaud DelobelleArnaud Delobelle
    Jan 25, 2013 at 11:14 pm
    Jan 26, 2013 at 8:10 am
  • I want to write a program in Python that sends a broadcast message using raw sockets. The system where this program will run has no IP or default route defined, hence the reason I need to use a ...
    Peter SteelePeter Steele
    Jan 19, 2013 at 7:32 am
    Jan 23, 2013 at 1:21 am
  • def factorial(n): if n<2: return 1 f = 1 while n = 2: f *= n f -= 1 return f An HTML attachment was scrubbed... URL ...
    KwakukwatiahKwakukwatiah
    Jan 11, 2013 at 3:35 pm
    Jan 13, 2013 at 9:08 pm
  • Python's import resolution order is terrible.[1] The fact that Python looks in the stdlib _first_ is not a good idea. It would seem more intuitive for a custom "math" module (living in the current ...
    Rick JohnsonRick Johnson
    Jan 11, 2013 at 6:13 am
    Jan 13, 2013 at 3:56 am
  • I'm trying to import a python file it keeps saying: ImportError: cannot import name Circle Here is the file I'm trying to import: Circle.py import math class circle: #Construct a circle object def ...
    Su29090Su29090
    Jan 11, 2013 at 10:17 pm
    Jan 12, 2013 at 5:14 am
  • booleans ints, floats, longs, complexes strings, unicode strings lists, tuples, dictionaries, dictionary views, sets, frozensets, buffers, bytearrays, slices functions, methods, code ...
    Chaouche yacineChaouche yacine
    Jan 6, 2013 at 11:12 pm
    Jan 11, 2013 at 5:20 am
  • Several people have trouble understanding Python's while-else and for-else constructs. It is actually quite simple if one starts with if-else, which few have any trouble with. Start with, for example ...
    Terry ReedyTerry Reedy
    Jan 22, 2013 at 5:44 pm
    Jan 23, 2013 at 11:05 pm
Group Navigation
period‹ prev | Jan 2013 | next ›
Group Overview
grouppython-list @
categoriespython
discussions295
posts1,924
users378
websitepython.org

378 users for January 2013

Chris Angelico: 185 posts Steven D'Aprano: 112 posts Dave Angel: 78 posts Κώστας Παπαδόπουλος: 71 posts Terry Reedy: 51 posts Oscar Benjamin: 46 posts Mitya Sirenef: 43 posts Alex23: 42 posts Roy Smith: 38 posts Michael Torrie: 35 posts Peter Otten: 30 posts Someone: 28 posts Ian Kelly: 26 posts Rick Johnson: 26 posts Tim Chase: 23 posts iMath: 22 posts MRAB: 21 posts Leonard, Arah: 18 posts Joel Goldstick: 17 posts John Gordon: 17 posts
show more
Archives