15,185 Topics

Member Avatar for
Member Avatar for RogerI

Short version: How can I provide a GUI over the web to a user to allow them to select a file from a directory on the server? Explanation: I need to process data files stored on the server and generate some graphs of the results. I have (as my first …

0
102
Member Avatar for Tcll

I'd like to know how to program a hex editor in python, using just tk with the main installation. (no add ons like wx or any others) if anyone can help, this would be gladly appreciated. I'm not really "good" at python yet, so please try to be detailed. (not …

Member Avatar for Tcll
0
1K
Member Avatar for Tcll

as well as my last thread (hex editor) I need help knowing how to program a 3d model viewer that reads obj format, and supports texturing... unlike the hex editor, I have some code if you want to play around with it... you must set everything manually before you run …

Member Avatar for Tcll
0
200
Member Avatar for jjrrmm

hi so for my project we were asked to ask the user to input a width and height for the dimensions of turtle screen. i asked for a user input then split it, and put in into a list then converted the two separate numbers into integers. so for example …

Member Avatar for vegaseat
0
176
Member Avatar for kjock002

[CODE]# PURPOSE: to see if a user entered number (n) is prime or not prime # # INPUT(S): a number greater than 2. (n>2) # # OUTPUT(S): prime or not prime depending on what (n) is. # # EXAMPLES:input: ;output: # input: ;output: ################################################################################ import math def prime(n): for i …

Member Avatar for vegaseat
0
183
Member Avatar for vsagarmb

Hi, I am hosting a UDP server as part of my application on a thread. The problem is when I close the application it doesn't exit completely because the server is still running on the thread. [code=python] class pdu_parser(Thread): run_parser = True sock = None def __init__(self): Thread.__init__(self) def run(self): …

Member Avatar for jcao219
0
134
Member Avatar for dilbert_here00

Hi All, I have a popup window, which shows up after double clicking an installer. This window has 3 buttons: Back, Next & cancel. Using win32api I am able to get the window handles for all three buttons. I need to find out which of the buttons is enabled or …

Member Avatar for dilbert_here00
0
179
Member Avatar for nichedge

hey, im having trouble making a python program run using a window, honestly i dont even know where to start. I have to make a coffee program where there is a menu and the user has to choose between adding, modifying, searching, showing, and deleting any entrys made to the …

Member Avatar for nichedge
0
592
Member Avatar for kenji

Hi, I'm trying to use the built in gcd method to calculate the gcd for two values. Unfortunately I can't seem to import the right module to get the method. [code=python] from fractions import Fraction ... x = gcd(a,b) [/code]

Member Avatar for kenji
0
179
Member Avatar for toll_booth

I'm trying to code the game of minesweeper. For some reason, the image won't display properly--and it isn't a case of a missing file, b/c I have a try-except code snippet that is set to print out an error message should this occur, and that isn't happening. So either it's …

Member Avatar for toll_booth
0
470
Member Avatar for snake03

Hi I've been give a task to create a text based game (multi user dungeon) in python but am unsure where to start. All I know is I have to use tcp and udp or something like that. I am very unfamiliar with this so I hope someone can help …

Member Avatar for ultimatebuster
0
281
Member Avatar for Felulah

Hi everybody, I'm new at Python and this forum has been a great help so far, so I hope someone is willing to help me on the following problem. It can count the number of sentences and words in a text, but after I have split up a text into …

Member Avatar for Felulah
0
2K
Member Avatar for ihatehippies

I have a wx app that I would like to actively debug (even after it is compiled via py2exe). Is there a way to hook all methods(without having to manually add code to each one) and have it print their names' as they execute. I've looked into both the "inspect" …

Member Avatar for Gribouillis
0
357
Member Avatar for adarshcu

[CODE=python ]while 1: tracking.update() for obj in tracking.objects(): allobjs=[] allobjs.append(obj.xpos) allobjs.append(obj.ypos) allobjs.append(obj.xmot) allobjs.append(obj.ymot) allobjs.append(obj.sessionid) aobjlist.append(allobjs) [/CODE] In the above snippet of code tracking.objects() returns a list of objects with above mentioned properties. tracking.update() continuously updates obj attributes and adds new objects. Our requirement was to have an Multi dimensional list …

Member Avatar for adarshcu
0
200
Member Avatar for daemion

Hi, I was wondering if there was a way to set a directory in python code when I read/write files. For example, if I have [CODE] import scipy def test_io(): scipyArray1 = scipy.array([[1.0,2.0],[3.0,4.0],[5.0,6.0]]) outFile = file('tmpdata1.txt', 'w') scipy.io.write_array(outFile,scipyArray1) outFile.close() inFile = file('tmpdata1.txt', 'r') scipyArray2 = scipy.io.read_array(inFile) print 'type(scipyArray2):', type(scipyArray2) print …

Member Avatar for vegaseat
0
157
Member Avatar for G_S

Hi people! I need your help with a find function for a glossary program that I'm writing for my own use. I'm using python 3.x and have already made a find function, but I don't like how it came out. Let me explain with an example: First, let me show …

0
281
Member Avatar for kjock002

the question is: "Sum of a series of numbers entered by the user until the value 999 is entered but 999 should not be a part of the sum" at first i thought the question was asking for the sum of user entered numbers until the sum reaches 999. after …

Member Avatar for craig_ka
0
72
Member Avatar for kjock002

[CODE]# PURPOSE: to calculate the sum of the first (n) odd counting numbers # # INPUT(S): the number (n) which will be the last number added to the sum # # OUTPUT(S): the sum of the first (n) counting numbers # # EXAMPLES: input: 23 ; output: 144 # input: …

Member Avatar for The_Kernel
0
3K
Member Avatar for tkpanther

Hello, it is me again with another homework assignment. I am having issues starting this one. Every draft I make for it feels way too long and that I can make it much, much shorter. First, I am using Python version 2.3.2. I am using graphics.py, buttons.py, and am basing …

Member Avatar for tkpanther
0
168
Member Avatar for gunbuster363

The title maybe a little bit confusing, I will explain it. I am using opensuse. Usually I work in a shell like this: $vim test.py $python test.py >>>running... >>>running... >>>running... >>>running... $ Here the program end, but I cannot make further change nor access to the variable. I know I …

Member Avatar for gunbuster363
0
116
Member Avatar for cairn1

Hey whats up I'm new to this forum so I hope I'm posting this right. Ok so my problem is that I have created a server in python that is on a certain port, and I have setup port forwarding so that all traffic on the specified port is sent …

0
74
Member Avatar for adam321

(a) [CODE]def main(): maze= open('maze.txt','r+') for line in maze: line = line.strip() print line maze.close() print start(maze,x,y) print maze[y][x][/CODE] (b) [CODE]def start(maze,x,y): for x in range(0,len(maze)): if maze[y][x] == "s" print maze[y][x] return x, y[/CODE] question (b): write a function that walks through the maze and attempts to find exit. …

Member Avatar for adam321
-2
197
Member Avatar for mattloto

Thanks to another post of mine, I found out about itertools.product(). What I was wondering how to do is to code it so that I can use as many arrays as parameters as possible, with the number of arrays being defined by user input. for example, If the user inputted …

Member Avatar for vegaseat
0
1K
Member Avatar for wutwutwut

I know how to get a program to read a raw text file that has been piped to it, and do some simple things like counting letters, but I don't know how to read the actual words and store the entire word as a string. For example, if a text …

Member Avatar for vegaseat
0
200
Member Avatar for n.utiu

Let's take this: [CODE]f = open ('myflie.txt', 'w') f.write ('12345');[/CODE] I always get the length of the output printed on the console. Is there any way to prevent it from printing it?

Member Avatar for n.utiu
0
81
Member Avatar for mattyd

I have addressed this problem sometime ago; I have either misplaced, misunderstood, or never received a response to this issue so therefore I am again attempting to deal with a Python issue: I am towards the end of a build, and I am dealing with button commands, something that was …

Member Avatar for TrustyTony
0
376
Member Avatar for systemsbiology

Hello Everyone, I am an intermediate developer in programming languages. I have developed some python script and some java applications. In my project, I need to integrate the python script with a java application to put all the tools in a single pipeline to function as a continuous workflow. This …

Member Avatar for ~s.o.s~
0
978
Member Avatar for mattloto

I need a way to get all the possible combonations of two lists. I looked into map(), but it only loops through the first array. I tried to do a map function inside a map function, but I couldnt figure out how. Heres an example: [CODE]>>> a=[1,2] >>> b=[3,4] >>> …

Member Avatar for mattloto
0
263
Member Avatar for Siyabonga Gama

Dear help I am struggling to figure out why the following sorting algorithm doesn't work. Please help if you can. :) >> #myList is a list of arbitrary length for i in range (len(myList)): for j in range (i, len(myList) - 1): if myList[i] < myList[j]: myList[i], myList[j] = myList[j], …

Member Avatar for woooee
0
76
Member Avatar for andreski

I am working with a keyloger procedure to capture user inputs even mouse has no focus on my app windows. I make it work using that code, the problem is that [CODE] event = handle.read(6)[/CODE] only reports clicks when buffer is full. Its not working ok because there is a …

Member Avatar for andreski
0
305

The End.