14,945 Topics

Member Avatar for
Member Avatar for zagrijs

Hi I am new to the forums and to Python! I am having trouble displaying a text menu in the following format 1: Name 2: Name 3: Name It displays it correctly but then it gives an error message: Below is the code with output and error message. #CreateMenu.py #Create …

Member Avatar for zagrijs
0
107
Member Avatar for AnjaliThukral

Can anyone help me anything related to --- how to draw 3D objects like sphere, cone, arrow, ring etc. I am new to python but know the basic language. Thanx, Anjali

Member Avatar for AnjaliThukral
0
222
Member Avatar for kdikert

I am developing an application that will run on a PDA and it requires some special layouts and looks for the widgets. The PDA has a touch sensitive screen and the application is used by pressing on the display with the finger tips. Because of this I need to make …

0
84
Member Avatar for deck55

Currently I have a list that I have read from a file and it looks similar to... file = [S,D,S,D,S,D,N,S,D,S,D,N] What I was wondering is there a way to loop through the list so that I get multiple lists. For Example.... List1 = [S,D,S,D,S,D,N] List2 = [S,D,S,D,N] If someone could …

Member Avatar for deck55
0
89
Member Avatar for City one

Hi, (by the way, this site is one of the best forum (display) I 've seen). I have a big issue I would like to resolve, let me explain; I have built a script where I can put IPs into a list and then once I press 0, this list …

Member Avatar for City one
0
86
Member Avatar for thompsongunner

I am trying to use the bit fields in a useful way to create packed fields that can be sent out as packets. Let's see if my code can help explain: [code] from ctypes import * class myPacketHeader(Structure): _pack_ = 1 _fields_ = [("seqnum", c_ubyte, 8), ("is_command", c_uint, 1), ("address", …

Member Avatar for thompsongunner
0
3K
Member Avatar for rjmiller

ok, I have a list of numbers and i want to return values in a range that are not in the list of numbers... I'm thinking of something like this: [ number for number in range(1, 10) if != nums ] However, This always prints all the numbers in that …

Member Avatar for rjmiller
0
99
Member Avatar for OLer94

Im trying to figure out how to compute a product of ordered pairs. So if I have two sets (1,3) and (2,4), I want to generate the following tuples (1,2), (1,4), (3,2), (3,4). Now I wrote the following [INLINECODE]def orderedproduct(set1, set2): op=[set()] for x in set1: for y in set2: …

Member Avatar for OLer94
0
139
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
147
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
359
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
49
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
172
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
247
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
230
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
185
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
182
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
108
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
107
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
89
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
120
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
136
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
172
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
590
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
93
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
40
Member Avatar for kaze139
Member Avatar for jrcagle
0
132

The End.