14,962 Topics

Member Avatar for
Member Avatar for student_

I am a student about 4 weeks into learning python, so i do not know a lot, and am hoping someone can help me understand what i am doing wrong, here is the code: [code=python] def main(): name = "TEST" age = 50 makename() makeage() print "You are" ,age ,"years …

Member Avatar for student_
0
80
Member Avatar for technocratic

Hello, I'm playing around with some Python and tKinter and have been wrestling with the idea of an on-screen keyboard that outputs keys-pressed to a text field. I'm familiar with calculators and button input, but would anyone have some thoughts on designing an on-screen keyboard? I'm thinking that I will …

Member Avatar for vegaseat
0
5K
Member Avatar for matto.g1456

Any ideas on how one would force inno to include folders without extracting the data to the program folder, in other words I have support data for my pygame in various folders, the exe I made works fine but when I install the .exe inno takes all the data out …

Member Avatar for matto.g1456
0
79
Member Avatar for lewashby

Could someone please tell me why this code will not close my app when the [X] at top right corner is clicked? [CODE]def shutdown(): track.stop() app.destroy() app.protocol("WM_DELETE_WINDOW", shutdown)[/CODE] If you want to see the whole code it's on an earlier post called "Tkinter Scale". Thanks.

Member Avatar for vegaseat
0
2K
Member Avatar for timrichardson

The python module python-gdata includes an pretty comprehensive example of using python to fetch google calendar events (calenderEvents.py) No matter what I do, I only get 25 events returned. This is the default value of the maximum number of records returned. The example script includes these comments [code] In reality, …

Member Avatar for timrichardson
0
356
Member Avatar for WildBamaBoy

In this program I have a lot of game directories in a list like so: [CODE]base = "C:/Program Files/Game" expansion = "C:/Program Files/Game/Expansion" Games = [(base, "Base Game"),(expansion, "Expansion 1")] Installed = [][/CODE] The program then sees if they are installed like this: [CODE]for path, name in Games: #For every …

Member Avatar for WildBamaBoy
0
112
Member Avatar for Fluffybunny

Hi I am sending a text file to a remote app using urllib2. It all works well, but it just seems to take a very long time to send the data. My code is basically doing : TxData = open('OutputFile.txt') data = {'name': 'value', 'file': TxData } f = urllib2.urlopen(url, …

Member Avatar for TrustyTony
0
2K
Member Avatar for sanv

Hi, I have written a script that checks whether a line has been added to a file. Whenever, a line gets added to the file a thread is created to process that line. And if a certain conditions holds for that read line, the thread should sleep for 1h and …

Member Avatar for woooee
0
129
Member Avatar for hisan

I need to get the info available devices in my LAN network. My logic is as follows: 1.Send a UDP packet/s to the IP 255.255.255.255 and wait for the response from the available devices, once the devices repond back need to analyze the response.. Please help me out in implementing …

0
58
Member Avatar for linuxoidoz

I need to show a '&' symbol on a button and I don't understand this - how come [CODE] self.l1 = QLabel("&", self) self.l2 = QLabel(unichr(int("0026", 16)), self) [/CODE] both of these show it on a label but [CODE] self.b1 = QPushButton("&", self) self.b2 = QPushButton(unichr(int("0026", 16)), self) [/CODE] none …

Member Avatar for -ordi-
0
2K
Member Avatar for darknessamman

Hi ppl,,,,how r ya...hope u r fine.. Just have a lil problem with my program. Im studying civil engineering . And i have problem with my registrations So my friend creatred a program for me ,,but there is something missing in it The main job for this program is to …

Member Avatar for darknessamman
0
132
Member Avatar for vulcano224

Hi Guys, I am currently working on the following project: Write a PYTHON function that takes the time as three integer arguments (for hours, minutes, and seconds), and returns the number of seconds since the last time the clock “struck 12.” Use this function to calculate the amount of time …

Member Avatar for vegaseat
0
195
Member Avatar for vulcano224

Hi, I'm working in the following project: Write a function in python that displays at the left margin of the screen a solid square of asterisks whose side is specified in integer parameter side. For example, if side is 4, the function displays **** **** **** **** I did this …

Member Avatar for vegaseat
-3
178
Member Avatar for lewashby

file = hfmix2.py error is on line 3 [CODE]# imports from Tkinter import * from sound_panel2 import * import pygame.mixer # create gui app = Tk() app.title("Head First Mix") # create mixder mixer = pygame.mixer mixer.init() # call functions panel1 = SoundPanel(app, mixer, "50459_M_RED_Nephlimizer.wav") panel1.pack() panel1 = SoundPanel(app, mixer, "49119_M_RED_HardBouncer.wav") …

Member Avatar for vegaseat
0
188
Member Avatar for ITGeEk2020

I have a project due at the end of the quarter. This is my first quarter in programming and we have to create a single player game with at least three modules. I want the game to ask the user to choose heads or tails, then a coin flips and …

Member Avatar for vegaseat
0
457
Member Avatar for ultimatebuster

This is the folder structure: [CODE]root common.py module1 somescript.py module2 someotherscript.py[/CODE] i need to import common.py from somescript.py and someotherscript.py I also need to import somescript.py from someotherscript.py

Member Avatar for lrh9
0
155
Member Avatar for pendo19

Hi all, Does anyone know how to search for a string or substring within a list. I have [CODE] def searchfilt(self): f = open("timeline1.csv", "r") reader = csv.reader(f) text = enterbox(msg='Please choose a highlighter search term', title='Highlighter ', default='', strip=True) lines = [] i = -1 self.listbox2.delete(0, tk.END) for i, …

Member Avatar for TrustyTony
0
237
Member Avatar for Tommymac501

I'm trying to make a fixed length output record, and I'm using a Dictionary as a lookup table to find a code based on the kind of car a person drives. The routine works fine; I the search the key for the car type, and the value returned is the …

Member Avatar for woooee
0
4K
Member Avatar for kametolearn

I am trying to find a way to search a filename.rc file for a particular string. For now lets just say I am searching for the string PARTYHOST. After finding PARTYHOST in the file I would like to replace anything after it(so 192.168.0.1) with a new string which I have …

Member Avatar for Beat_Slayer
0
358
Member Avatar for abcdr

I need to write a loop that traverses the list and prints the length of [B]each element[/B]. So far I have this: [code] def countEachElement(): elements= ["spam!",'1',['Brie','Roquefort','Pol le Veq'],['1','2','3']] i=0 while i < len(elements): print len(elements[i]) i=i+1 [/code] But it's not counting each element of the lists inside the list. …

Member Avatar for jcao219
0
96
Member Avatar for gonzigg

Hello, Im trying to get this program to display a receipt of the items bought with its price and total, but so far this is what I've acomplished, I've been trying for a long time now, to make it print the receipt in the win2 but I haven't been able. …

Member Avatar for gonzigg
0
4K
Member Avatar for cmalkmes

Howdy, I'm a GIS guy trying to get my hands dirty with some Python. What I'm trying to do is iterate through a file (shapefile), reading specific fields from each row of the file's associated table. The table has thousands of rows, which is why a Python script is handy …

Member Avatar for cmalkmes
0
241
Member Avatar for hisan

Hi, I want to know how to read the binary file from 10th byte to 90th byte in a file size of 100 bytes and need to write the read data into new binary file. please help me in doing this.

Member Avatar for hisan
0
86
Member Avatar for lllllIllIlllI

Hi I have been trying to install the ERIC python IDE [url]http://www.die-offenbachs.de/eric/eric-links.html[/url] for a while now to no sucess. I could not i kept getting errors when installing the QT module [code] Determining the layout of your Qt installation... Error: Make sure you have a working Qt v4 qmake on …

Member Avatar for Tommymac501
0
804
Member Avatar for Jothe

hallo people, i want to start learning python and ruby for some projects i have anyone who knows a good resource site or books for this two languages. any books and where i can get them will be highly appreciated thanx in advance

Member Avatar for anurag mishra
0
104
Member Avatar for pythonbegin

Hi all I am newbie in python. I have a csv file with two columns first as source and second as target. There are multiple values assigned to keys in successive rows such as follows 1 -->4 1 -->5 1 -->8 1 -->12 2 -->4 2 -->17 2 -->14 2 …

Member Avatar for Beat_Slayer
0
3K
Member Avatar for pendo19

Hi all I have written code there are two definition functions but the only way I can get the whole thing to work is to put some code outside the definitions. Does anyone know how to fix the code so that I can call it from another module. Please help …

Member Avatar for pendo19
0
232
Member Avatar for Tightmopedman9

I'm trying to write a gui which will continually update values obtained from a data measurement device. Orginally this was accomplished using a TKinter .after loop with a specified refresh time of 500ms. This snippet of code is called from the mainloop and updates the values once when it is …

Member Avatar for Tightmopedman9
0
689
Member Avatar for vegaseat

The code is shamefully short, but here it is. Now you can listen to the many sound files in wave (.wav) format and boing, chirp, chime, bark, booh, laugh and mooh at the people around you.

Member Avatar for jbronen
3
1K
Member Avatar for manzati93

Hi All! I'm creating a program using Python and compiling it with py2exe. I've the same problem of this topic, but I can't solve it because GUI2exe is not supported by Python26. [url]http://www.daniweb.com/forums/thread224403.html[/url] How could I solve this problem?

Member Avatar for manzati93
0
141

The End.