15,190 Topics

Member Avatar for
Member Avatar for grahhh

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 …

Member Avatar for grahhh
0
147
Member Avatar for trudge

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 …

Member Avatar for trudge
0
148
Member Avatar for jobs

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?

Member Avatar for vegaseat
0
361
Member Avatar for jobs

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 …

0
50
Member Avatar for bd1234
Member Avatar for spinaltoad

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 …

Member Avatar for spinaltoad
0
174
Member Avatar for jonamasa

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 …

Member Avatar for jrcagle
0
261
Member Avatar for Haze

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 = …

Member Avatar for jrcagle
0
2K
Member Avatar for laseredd

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 …

Member Avatar for freddypyther
0
231
Member Avatar for rjmiller

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 …

Member Avatar for rjmiller
0
186
Member Avatar for grahhh

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 …

Member Avatar for paddy3118
0
183
Member Avatar for StrikerX11

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 …

Member Avatar for jrcagle
0
110
Member Avatar for Gumster

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 …

Member Avatar for paddy3118
0
108
Member Avatar for ian14

hi,there i am at debue with python,can anyone help me finding any link,or some guide to start with

Member Avatar for woooee
0
91
Member Avatar for jrcagle

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, …

Member Avatar for vegaseat
0
122
Member Avatar for coolmo

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 …

Member Avatar for jrcagle
0
159
Member Avatar for davidjhay

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 …

Member Avatar for davidjhay
0
138
Member Avatar for ufwt

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.

Member Avatar for vegaseat
0
176
Member Avatar for gratefulluke

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 …

Member Avatar for sharma_vivek82
0
609
Member Avatar for bsdixon21222

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 …

Member Avatar for jrcagle
0
94
Member Avatar for kaze139

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

0
41
Member Avatar for kaze139
Member Avatar for jrcagle
0
134
Member Avatar for mbassa

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

Member Avatar for stymiee
0
70
Member Avatar for mbassa

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

Member Avatar for Lardmeister
0
73
Member Avatar for Lardmeister

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?

Member Avatar for Lardmeister
0
91
Member Avatar for Lardmeister
Member Avatar for Lardmeister
0
113
Member Avatar for fonzali

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 …

Member Avatar for fonzali
0
1K
Member Avatar for CelestialDog

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 …

Member Avatar for ffao
0
133
Member Avatar for CelestialDog

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 …

Member Avatar for CelestialDog
0
213
Member Avatar for php111

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? …

Member Avatar for vegaseat
0
179

The End.