15,181 Topics

Member Avatar for
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
133
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
202
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
179
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
458
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
156
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
97
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
259
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
87
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
808
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
105
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
694
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
Member Avatar for pythonbegin

Hi All I have two tab-delimited files. I want to compare first column of testfile1 to first column of testfile2 to find if items in file2 are in file1 and write it to the new file. I have a following code but not working!! :(. [CODE]f1 = open('testfile1.txt') #f2 = …

Member Avatar for TrustyTony
0
762
Member Avatar for acrocephalus

Hello! I am trying to write a function that looks for a desired string pattern within a table (Countries). Look at the code. [CODE]def selectCountry(): print 'Enter country:' country = raw_input('> ') sql = '''select idCountries,CountryEn from Countries where CountryEn REGEXP '%s'''' cursor.execute(sql,(country)) result = cursor.fetchall() rowHead = 'Country ID','Country …

Member Avatar for acrocephalus
0
350
Member Avatar for acrocephalus

Hello! I have this simple funcion [CODE]def newUser(): print 'Choose a username?' Username = raw_input('> ')[/CODE] The variable 'Username' has to be used by other functions. How can I do it? Cheers! Dani

Member Avatar for acrocephalus
0
10K
Member Avatar for acrocephalus

Hello! I have written a program where you have to give the path to directories and files as input. Is it possible to enable any kind of auto-completion when running the program? Cheers! Dani

Member Avatar for cronos4d
0
89
Member Avatar for bettersaid

i need help in controlling mouse click in python. Example would be 'clicking File menu --> Save Us--> Save' on its own. I have this code for launching an app, for example a textfile. but i dont know how to control its mouse click. Advice please. [CODE]import os class LaunchApp: …

Member Avatar for bettersaid
0
108
Member Avatar for dush0805

Hi, I am trying to find this string "QuickSearchResultsCOnfig" in a text file. The text file will contain this in several places. I need the following var QuickSearchResultsConfig = ['a','b','v','d','e 'f','f']; I need to replace the above with var QuickSearchResultsConfig = [['a',{hidden:true}],['b', {hidden:true}],'v','d','e 'f','g ']; My original approach: Store a,b,c,d,e,f,g …

Member Avatar for griswolf
0
134
Member Avatar for jenzilla

Hello! I'm fairly new to Python. Hopefully you can understand what I'm trying to accomplish here. I'm making a GUI that prints Parking Garage Tickets. I want to be able to post an expiration date on the ticket. I found out about timedelta, and it works if I put in, …

Member Avatar for jenzilla
0
3K
Member Avatar for spac_e

Hey- First time posting here so hopefully I explain everything correctly. [CODE] class sendbackcurricula(app.page): def GET(self): query = models.Curricula.query.all() map = dict() for x in query: x = x.to_dict() map[x['owner_id']] = x['title'] return json.dumps(map); [/CODE] The above code will return the last element held in the database at 'owner_id' and …

Member Avatar for TrustyTony
0
77
Member Avatar for Musing888

The basic idea for this program is to for me to enter a code to a corresponding website (which is already in a dictionary in the body of the program) and search that webpage for a specific phrase and return a value. This is so that I can check number …

Member Avatar for Musing888
0
232

The End.