15,190 Topics

Member Avatar for
Member Avatar for barabass

Hello everybody, I'm new to Python wx and I'm trying to make an application which requires the use of database content. I've already made the input data frame. I need to make a frame where to list the database content. I need to create a label for each row like …

Member Avatar for barabass
0
381
Member Avatar for Lylywhatever

can anyone help me draw a five star using graphics.py?? i keep trying, but it comes out unbalance. Thank you so much for your help!

Member Avatar for vegaseat
-1
103
Member Avatar for Dan08

Each time I create a new GUI, the bit that I always hate, is the bit where the buttons and entries look like I am working on a Windows 98 machine, isn't there a way to make my buttons and entries look like Qt would look like? They're well squary …

Member Avatar for snippsat
0
119
Member Avatar for Kruptein

I have a code in which the user should pass something through raw_input, this works fine for strings less then one line, but when I copy-paste a longer string, only the first line is passed by raw_input, how can I also past the rest of the string?

Member Avatar for Kruptein
0
2K
Member Avatar for Kruptein

I'm using the rsa module (easy_install rsa), and if I use it from command line: [code=python]import rsa public,private = rsa.gen_pubpriv_keys(3) cipher=rsa.encrypt("test",public) rsa.decrypt("cipher",private)[/code] this will return test again. (like expected) but in my code it gives a zlib error -3 incorrect headers [code=python]def RSA(txt): global crypt if crypt=="en": key=raw_input("Public key:") ciphertext=rsa.encrypt(txt,eval(key)) …

Member Avatar for Kruptein
0
111
Member Avatar for ssmokincamaro

I'm stuck on this part of my program, im using graphics.py to implement a linear regression line. I think I'm making a stupid error but cant wrap my head around it. The BIG part I'm stuck on is that im supposed to make a "button" in the lower left corner …

0
93
Member Avatar for jeffery12109

UnboundLocalError: local variable 'gold' referenced before assignment ...[CODE]if chooseItem == "1": gold, arrows, whip, cannnonballs, heartPotions, megaHeartPotion, infinityPotion, infinityXPotion, duelBloodXXHealer, bloodXHeal, energyYPotion, basicRainbowHealer = bloodXHealerZZ.buy(gold, arrows, whip, cannnonballs, heartPotions, megaHeartPotion, infinityPotion, infinityXPotion, duelBloodXXHealer, bloodXHeal, energyYPotion, basicRainbowHealer)[/CODE]

Member Avatar for Stefano Mtangoo
0
214
Member Avatar for ssmokincamaro

I'm making an archery game and I need to shoot 5 arrows and assign a point value to each spot of the target. Bulls eye is worth 9 and each ring out from there is worth 2 less. I am having trouble figuring out how to assign a score to …

Member Avatar for ssmokincamaro
0
2K
Member Avatar for pythonNerd159

just need some advice on making a list containing values for Tkinter buttons. thankyou :)

Member Avatar for pythonNerd159
0
131
Member Avatar for nasridine

I have this list, all the elements are float. Now i want to join them together with certain format for example exponent notation, so that I can print them out in one line. So I did this [CODE] for line in fileinput.input(filename): old_line = line.split() new_line = [float(s) for s …

Member Avatar for vegaseat
0
93
Member Avatar for jeffery12109

can you guys please shorten this code for me... I need to do the same thing for all 8 potions [CODE]def fightItems(yourHp, yourHpMax, heartPotion, megaHeartPotion,bloodXHealer, duelBloodXXHealer,energyYPotion, rainbowBasicHealer, attackXXXPotion, defenceXXXPotion): while karidQuest1chooseFightOptiion == "2": print '1. Heart Potion(',heartPotion,'remaining)' time.sleep(0.5) print '2. Mega Heart Potion(' , megaHeartPotion ,'remaining)' time.sleep(0.5) print '3. Blood …

Member Avatar for jeffery12109
0
135
Member Avatar for aks1810

hi all, actually i have made a gui in my application..there is a button in it. i want that when the button is clicked,a file should open up and i can see through its contents..how will that be done...please give ideas..thanks in advance..:)

Member Avatar for vegaseat
0
30
Member Avatar for Malinka

Dear Community, hopefully someone can explain this to me in simple terms: I would like to store raw input from a User without waiting for him to press Enter. And would it be possible to still check if the response is one of the predefined options? My raw input consists …

Member Avatar for Malinka
0
2K
Member Avatar for smithy40000

Im trying to get this menu to be inside my of my canvas but so far ive only had 2 windows open and now all im getting is an error, any help is greatly appreciated Im using Tkinter as my GUI [CODE] from Tkinter import * def startMenu(): top_tk = …

Member Avatar for SgtMe
-1
211
Member Avatar for Tops

how do i create wall tiles like the one in the attachment below using turtle graphics in python and loops? sorry, i dont know how to post the picture directly :(

Member Avatar for Dan08
0
95
Member Avatar for Alq Veers

I'm using Tkinter as the GUI for my Software Design and Development Major Project, This is only to be a 'screen' shot of what the final GUI interface might look like, however. I have been having quite a hard time with Tk. My reference manual is from New Mexico Tech …

Member Avatar for Alq Veers
0
2K
Member Avatar for punter999

hello, i have completed making the wx python csheet and now i need to enter data in it and save it and than print it as well.but i am not sure how to do that:( any help or example regarding this problem will b highly appreciated. Thank you Regards punter

Member Avatar for Stefano Mtangoo
0
92
Member Avatar for gangemia

I have a CSV file where fields are delimited with a comma. The fields of this CSV file contains the attributes of Permanent Survey Marks and I’ve created a GIS python script to convert it to a table that is stored it in our Enterprise GIS Spatial Database (SQL Server). …

Member Avatar for gangemia
0
217
Member Avatar for clibbon

Hi I am relatively new to Python so forgive me if I have missed an elephant in the room so to speak. My code has worked for the whole day, but this afternoon I have begun receiving the error [CODE]Traceback (most recent call last): File "C:\Documents and Settings\King Alex\My Documents\Summer …

Member Avatar for Maxim13
0
1K
Member Avatar for jeffery12109

I'm not sure what this means... TypeError: 'NoneType' object is not iterable here's the code [CODE]day, season, help4, myGame = karidInn(day, season, help4, myGame)[/CODE] that's where are call the def function [CODE]def karidInn(day, season, help4, localGame): if chooseLocation == "13": print chooseLocation while help4 == 2: print 'Welcome back to …

Member Avatar for jeffery12109
0
4K
Member Avatar for pietromarchy

Hi guys, this is my first post. In the past I found a lot of answers here so I decided to join you. My problem is this: I am using scapy in my software and It works fine using Ethernet connection. But I have to use a 3G key and …

0
90
Member Avatar for web_test

Hi, Can someone help me how to test the webpages with W3C validator using python script..? I need to test company url with [url]http://validator.w3.org/[/url] and need to fetch the results back. I am using urllib and urllib2 modules . For urlencode, I can give the value for the 'Address', but …

Member Avatar for web_test
0
57
Member Avatar for cp123

Hello all, I just bought a book on Python, and started to go through it (bought it for my children and myself). I'm having a problem importing 'easygui'. I am new to programming. I am trying to program on my Mac. I downloaded easygui to the following:/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/ When I go …

Member Avatar for sofiH
0
3K
Member Avatar for shivaaprs

what is the program to find the given number is python or not? using only for loop.

Member Avatar for vegaseat
-1
44
Member Avatar for ojulla julius

write python function,which takes one argument, which is a file name [as a string],and computes and prints out each word,followed by alist of lines(numbers),which contain that word. eg the file is called("sample-text,txt") and then prints something like: all:[20,30,40,48,50,59] code:[34] consider:[7] found:[48]

Member Avatar for ojulla julius
-1
125
Member Avatar for SoulMazer

Hi, so I'm in the process of writing a music player with a GUI. I would like to be able to print a statement after I am done playing a song. I originally through I could just get away with getting the song's length and time.sleep'ing for that long. Since …

Member Avatar for Stefano Mtangoo
0
110
Member Avatar for jeffery12109

hey I'm making my own adventure text game and I need help. [CODE]def getEnergyAndMana(magicExp, energyExp, maxYourMana, bonus, energyLevel, bonus1): magicLevel = 0 if magicExp >= 0: magicLevel = 0 maxYourMana = 50 + bonus if magicExp >= 550: magicLevel = 1 maxYourMana = 100 + bonus if magicMax >= 1150: …

Member Avatar for jeffery12109
0
94
Member Avatar for emma.parsons

Hi, I am now trying to extend my program to allow the events in the file to be sorted by any of the fields (date, time, title, description, location and to have an optional list of attendees) Whether the attendees are present or not I need to allow either an …

Member Avatar for woooee
0
155
Member Avatar for jgehlot09

Hello I am new to python...I met with this simple problem [CODE] def search(path,filename,extension): name=' ' listdir=os.listdir(path) print listdir flname=filename+'.'+extension i=0 match='' while(i<len(listdir)): if(listdir[i]==flname): match='YES' print 'got the match' break i=i+1 if(match=='YES'): assign(filename) else: name = filename+'.'+extension print 'the filename is',name return name lets_text=search(path,filename,extension) print 'the name we gt is',lets_text …

Member Avatar for woooee
0
156
Member Avatar for Kruptein

I have found a module pycrypto which has an AES encryption and decryption function, in commandline everything works fine both encryption and decryption, but if I want to implement it in my program, it fails =( [code=python]def aes(txt): global crypt message="".join(txt) #format the message which has to be encrypted/decrypted to …

Member Avatar for jcao219
0
222

The End.