473,554 Members | 2,908 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python Forum

Python programming language - Ask questions about python interpreter, control flow, data structures, modules errors, classes, standard library, gui, databases, unit testing, object oriented, structured programming and more.
2
17,890
thread by: fartknuckle | last post Aug 10 '07 by: fartknuckle
When I try to build and install python from source It configures and makes fine but upon 'make install' I always get to this point: Listing /usr/local/lib/python2.5/xml/sax ... Compiling /usr/local/lib/python2.5/xml/sax/__init__.py ... Compiling /usr/local/lib/python2.5/xml/sax/_exceptions.py ... Compiling...
16
17,913
thread by: Stef Mientki | last post Feb 1 '07 by: Ben Finney
If I create a large array of data or class, how do I destroy it (when not needed anymore) ? Assign it to an empty list ? thanks, Stef Mientki
3
17,961
thread by: abcd | last post Feb 19 '06 by: John Zenger
i want to create a CGI script which simply prints out values given via the URL (such as when a GET is performed). So if I have a script named, foo.cgi ....and I access it by going to: http://www.somesite.com/cgi-bin/foo.cgi?name=john&age=90 I want foo.cgi to print out: name: john age: 90
6
17,965
thread by: max(01)* | last post Jul 18 '05 by: stewart.midwinter
hi people. when i create a widget, such as a toplevel window, and then i destroy it, how can i test that it has been destroyed? the problem is that even after it has been destroyed, the instance still exists and has a tkinter name, so testing for None is not feasible: >>> import Tkinter >>> fin = None >>> fin1 = Tkinter.Toplevel()
9
17,965
thread by: thorley | last post Jul 4 '06 by: Simon Forman
Greetings, since there was no reponse to my previous post about an existing FastCGI server in python, I've taken to writing my own. (which of course I'll share--*if* there's something to share ;) My problem now, is that I need to send certain binary data over a socket. That is, I want to make some bytes, and stuff them in a TCP packet, send...
3
18,015
thread by: Netwatcher | last post Sep 15 '08 by: iamgame
im try to activate the tutorial code for wxPython, it is working properly when i tell it to import * from wxPython.wx but with an error about the package, i've done as i was told to change the import to wx and change all wxsomething to wx.something but when i start it it gives me an error that say Traceback (most recent call last): File...
1
18,025
thread by: SwortClash | last post Feb 22 '23 by: Vanisha
With a python program, I saved a ics file to a json one.The json file contains calendar info. My purpose is to replace a few specific strings (hours) by different ones (Keywords). basically 8:00 to Meeting1 ; 9:00 to Meeting 2 and so on. The Json content looks something like this "11/18/21 09:00 UTC-12/19/25 09:45 UTC Meeting-boss: - None". This...
9
18,041
thread by: Sreeraj | last post Sep 7 '07 by: Marc 'BlackJack' Rintsch
hi, I am a beginner in Python. I wish to know how can i filter a list of strings using wild characters.ie Lets say i have list countries = . I need only the list of string starting with 'a'. thank you
23
18,044
thread by: Florian Lindner | last post Oct 20 '07 by: Gabriel Genellina
Hello, can I determine somehow if the iteration on a list of values is the last iteration? Example: for i in : if last_iteration: print i*i else:
5
18,096
thread by: Noah | last post Jul 18 '05 by: Noah
Does anyone have a function to convert back and forth between NT style paths and POSIX style? It seems trivial, but I want to make sure I don't overlook some obscure detail. Is it a simple matter of translating / and \ characters? FYI, I need a Python function that does what cygpath does so that I can run a script on either NT or UNIX or...
476
18,176
thread by: Xah Lee | last post Dec 18 '05 by: John
Microsoft Hatred, FAQ Xah Lee, 20020518 Question: U.S. Judges are not morons, and quite a few others are not morons. They find MS guilty, so it must be true. Answer: so did the German population thought Jews are morons by heritage, to the point that Jews should be exterminated from earth. Apparently, the entire German population cannot...
3
18,182
thread by: Lukas Kasprowicz | last post Jul 18 '05 by: Jack Diederich
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Folks, My Proglem is, I get after a query on a mysql database with module MySQLdb a tuple but I need this output from database as a string. can anybody help? - -------------- database ---------
4
18,206
thread by: Harlin Seritt | last post Jul 19 '05 by: Harlin Seritt
I looked all over the net but could not find if it is possible to insert wildcards into strings. What I am trying to do is this: I am trying to parse text from a Bible file. In case you're not familiar with the way the Bible organizes itself, it is broken down into Books > Chapters > Verses. The particular text I am working with are organized...
4
18,226
thread by: rozniy | last post Aug 7 '07 by: Jim Langston
I am using Python's CTypes module to import functions from a DLL into Python. Some of the DLL's functions take enum type arguments, eg: olDaGetDASS (HDEV hDev, OLSS OlSs, UINT uiElement, PHDASS phDass); //(this function is in C form) typedef enum olss_tag
2
18,243
TMS
thread by: TMS | last post May 4 '07 by: bartonc
Schools over!!! Now its time to play. I would like to learn how to make objects move from one location to the next on a canvas widget. For example: from Tkinter import * class square: def __init__(self, canvas, xy, color, change): self.canvas = canvas self.id = self.canvas.create_rectangle(-10-abs(change),
4
18,251
thread by: Jeffrey Barish | last post Jul 18 '05 by: klappnase
I'm confused about how to use the update_idletasks method. In my program, I have a handler for a button in which execution will linger. During that time, I would like for the GUI to continue to show signs of life. I have a Pmw MessageBar in which I display a status message. I figured out that if I run update_idletasks on that MessageBar,...
12
18,257
thread by: Karlo Lozovina | last post Jun 27 '08 by: Matthew Trevor
I'm not sure if Python can do this, and I can't find it on the web. So, here it goes: try: some_function() except SomeException: some_function2() some_function3() ...
8
18,258
thread by: Summercool | last post Jan 28 '08 by: Paul McGuire
somebody who is a regular expression guru... how do you negate a word and grep for all words that is tire but not snow tire or
7
18,273
thread by: Michael Onfrek | last post Jul 19 '05 by: Michael Onfrek
Hi! I'm playing with entry again and trying to restrict length of entry widget to certain number of character, so users cannot enter more character into it. Any ideas? Reg. Michael Onfrek
11
18,275
thread by: dwelden | last post Jan 4 '07 by: Neil Cerutti
I have successfully used the sort lambda construct described in http://mail.python.org/pipermail/python-list/2006-April/377443.html. However, how do I take it one step further such that some values can be sorted ascending and others descending? Easy enough if the sort values are numeric (just negate the value), but what about text? Is the...
2
18,278
thread by: darktemp | last post Sep 7 '10 by: darktemp
I have a line of characters that need to be separated. One example is like this: 513413;dialog_513413;Sally Mae has some jobs for you.; Three sets of data all split into three groups placed in one line. What I would like to do is be able to read each group up to the semicolon (obviously without including it when it becomes displayed or used...
4
18,288
thread by: qwweeeit | last post Jul 18 '05 by: Duncan Booth
The standard split() can use only one delimiter. To split a text file into words you need multiple delimiters like blank, punctuation, math signs (+-*/), parenteses and so on. I didn't succeeded in using re.split()...
6
18,291
thread by: globalrev | last post Jun 27 '08 by: Gabriel Genellina
i ahve a program that takes certain textsnippets out of one file and inserts them into another. problem is it jsut overwrites the first riow every time. i want to insert every new piece of text into the next row. so: 1. how do i write to a new line every time i write to the file? 2. if i dont want to write to a new line but just want...
4
18,293
thread by: Omid Fatemi | last post Jul 18 '05 by: Steve Holden
I followed discussion in the group about this problem: ImportError: No module named fcntl I found out there are two modules: FCNTL fcntl the first one is obsolete and shouldn't be used. But the second one is usable.
3
18,294
thread by: sithlordkyle | last post Dec 15 '11 by: sithlordkyle
Hopefully I can explain this correctly. I am trying to take a MySQL select statement, get the output into a list, then upload that list back to the MySQL server. cursor.execute("SELECT stuff FROM place WHERE thing = 3 ORDER BY track_id ASC") This spits out a tuple of integers ... ((1L,), (2L,), (3L,), (4L,), (5L,), (6L,), (7L,), (8L,),...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.