15,190 Topics
![]() | |
I have another problem. Same dataset as before. I have a huge collection of floats. I have a multi-dimensional list. About 37 per list, and over 60,000 lists. So something like: [[16166.00, 4123.15, ...], [761.1364, ...]]. I'm trying to find the [url=http://en.wikipedia.org/wiki/Euclidean_distance]Euclidean distance[/url] between one list with each of the … | |
I know there have been several posts concerning Python and CGI / HTML, but I can't get my little script to even print a web page. [code] #!/usr/bin/python print "Content-Type: text/html\n\n" print import sys sys.stderr = sys.stdout import cgitb; cgitb.enable(display=0, logdir=".") print """ <html> <body> <div align="center"><font style="font-family:verdana; font-size:18px">Hello from … | |
test = [random.randint(1,10) for i in range(20)] Can someone what does the random.randint(1,10) fron to for loop does, and the square brackets around it means, make it a list? | |
I need to create python script that is threaded. So the main program will run in infinite loop and just retrieving messages and putting them in a queue. (Main thread) I need child threads from a pool to process the queue. When there is no stuff in the queue, they … | |
name = raw_input("What is your name (Last, First)?") first = name.find(', ') print "Hi", first, "!!!" | |
I cannot figure out the correct way to de-serialize a string passed via xml-rpc. If I print out the string I get [code] {'params': ['123', 3], 'methodName': 'function'} [/code] I could split the string, and then drop unwanted characters. But, that seems like the wrong way. Any help would be … | |
Hi, I have a class [inlinecode]SubDevice[/inlinecode] with a function [inlinecode]action[/inlinecode]. For each instance of SubDevice I want to define another action, so it's a parameter of SubDevice's class constructor. Now some of the action functions need additional parameters, but that's normally not a problem because I can write something like … | |
Ok so I'm trying to use menu bars to grey out different widgets in my gui il show you all the lines that i think are important and the error messages for each command i have tried. [CODE]root = Tk() input_text = Text(root, height = 10, width = 25).grid(row = … | |
I recently installed Linux (Slackware Linux 12) on my laptop. On Windows I used IDLE for my python development, but on Linux, IDLE looks HORRIBLE. I tried tweaking the settings but it still looks bad, and is hard to program in. Can anyone recommend a good IDE for Python that … | |
Alright, So I am rather new to programming and Python and I had a couple of questions that maybe you guys could help me with... I currently have a .txt that when read in Python is a list, now i want to be able to split it up into seperate … | |
I'm new to Python, and need a bit of help. I have a large data set that is tab delimited but annoyingly also has some extra spaces in it and I can't seem to get it in a nice array to perform computations on it. This is a simplification of … | |
Hi, How can i create a ref to a string ? it doesn't work like lists :S List : (IDs are the same!) [CODE] >>> li=[1, 2, 3, 4, 5] >>> li_ref=li >>> id(li) 13545800 >>> id(li_ref) 13545800 >>> li.pop() 5 >>> li [1, 2, 3, 4] >>> id(li) 13545800 … | |
Well, the title pretty much explains it, I want to read a CSV file and print the file into a GUI Text area. Or other suitable Widget, while im at it is there any widget that can display csv Files in a excel sort of syle, in the sense of … | |
hi,there i am at debue with python,can anyone help me finding any link,or some guide to start with | |
So today was the first day of class, and I started it as I did last year: by logging in all students as admin temporarily, then having them drag over the installer from the network and running it, then logging off. It's slightly insecure, but the class is for beginners, … | |
Consider the following extended BNF grammar for a subset of the Python programming language, called MicroPython. program ::= import list f funcdef g funcdef ::= def func-identi er ( [ identi er f , identi er g ] ) : suite return add-expr suite ::= statement f statement g statement … | |
I am working with PyScripter and WxPython. When I mess up a part of the WxPython code it will run and stop to tell me the error but the debug session will continue. I have to restart PyScripter each time. What am I doing wrong? (apart from not putting the … | |
depython [[url]http://www.depython.net[/url] depython online service] could decompile python bytecodes. Depython online service supports Python versions from 2.4 up to 2.5.You can freely test its function online. | |
I am at a real loss for what to do. My boss wants me to devise a way to extract user data from a Plone installation and I don't know how to do it. The best option I've found so far is the following piece of Python code. Below it … | |
Hello all, I have a unique situation. I am currently trying to save a complete web page that requires you to login with a user name and password. To be more specific, here is the web page I want. [url]www.eventid.net[/url] This site requires you to have a subscription in order … | |
Hi all. am trying to get a library which doesnt come default with scipy, so form the scipy webisite it says to rebuild or install sicpy after modifying a specified file(which i've done) but i've got no idea of how to rebuild scipy. Am using sidux btw.. Thanks.. many cheers | |
Hi guys, could anyone tell me what segmentation fault means? Thx | |
hello I am new in python.I would like to know how to play a sine vector using the sound card through python . I would really appreciate your help thanks | |
hello I am new in python.Can anyone show me away to play sine wave through sound card usind python? please give me some help thanks | |
Right now I have a mixed list of different types of elements: [code=python]mixed_list = [1, 0.5, 0, 3, 'a', 'z'] print max(mixed_list) # shows z, but would like it to be 3 [/code]How can I find the maximum numeric element of the list? | |
Can I display animated images like an animated GIF file using Python code? | |
hi guys , I am interested in writing a code to do the soduko ( or sudoku ) , I found this code on the internet which is supposed to be the shortest soduko solver but it is so short that I can not undrestand it . can any one … | |
Hi all, hopefully someone may be able to help me out here. Is there anyway I can take a sequence of numbers and add them together? For example say i have this sequence [1,0,2], what i want to do is basically add each number so in this case the final … | |
I'm trying to write a class containing some code i want to reuse in other projects, but I just cant seem to get it right. I'm hoping someone out there can offer a helping hand. Here is the original code: [code] def Numero(name): 'A function which converts a string to … | |
Hello gang, I was actually really my old topic on this forum. I heard that Python and Ruby would be for me to start with. Does that sound right instead of jumping right in to C and C++? What is required in Python? Is there free tutorials on that language? … |
The End.