15,190 Topics

Member Avatar for
Member Avatar for lockettpots

Hi all My first time with this forum:). I'm running python 2.4.4 and unicode enabled wxPython on Windows XP. I'm writing a gui application which requires users to be able to type accented characters easily into a TextCtr. To this end I have built a set of tools on a …

Member Avatar for lockettpots
0
98
Member Avatar for seasou
Member Avatar for seasou
0
2K
Member Avatar for babutche

O.K. This is what I have changed in my [URL="http://www.daniweb.com/techtalkforums/thread65045.html#"]program[/URL]: import string import math class Student: def __init__(self, name, hours, qpoints): self.name = name self.hours = float(hours) self.qpoints = float(qpoints) def getName(self): return self.name def getHours(self): return self.hours def getQpoints(self): return self.qpoints def gpa(self): return self.qpoints/self.hours def addLetterGrade(self, LetterGrade, credits): …

Member Avatar for babutche
0
181
Member Avatar for jrcagle

Hi all, In the never-ending quest to master Tkinter, I wrote a small version of Notepad. Here is my "SaveAs" function: [php] def save_as(): if not mainw.filename: mainw.filename = tkFileDialog.asksaveasfilename(title="Save As...", filetypes=[("All Files","*.*"),("Text Files","*.txt")]) if not mainw.filename: return f = open(mainw.filename, "w") s = mainw.frame.edit.get("1.0",END) f.write(s) f.close() [/php] As you …

Member Avatar for Ene Uran
0
90
Member Avatar for babutche

Hi, I need help please. At first I was understanding the Python language but I got lost somewhere along the line. Can someone please guide me through implementing an addLetterGrade method? I am not very good with computers and I am having a very hard time. This is my first …

Member Avatar for babutche
0
200
Member Avatar for Matt Tacular

[php] import random availableCountries = [0, 1, 2, 3, 4, 5, 6, 7] firstTurnsCountries = [] secondTurnsCountries = [] def countryDivider(countryNum): counter = 0 while True: if counter == 8: break num = 7 if num > 0: countryToAdd = random.randint(0,num) if num == 0: countryToAdd = 0 if counter …

Member Avatar for Matt Tacular
0
111
Member Avatar for sneekula

I like to create a database of common chemicals with Python. How would I go about that? Any help welcome!

Member Avatar for Ene Uran
0
115
Member Avatar for sneekula

This came up on Chris99's bus ticket program thread. Would like to see any simple examples on how to pass variables between classes without using global variables.

Member Avatar for vegaseat
0
19K
Member Avatar for chupacabra

python 2.4.1 mySQLdb 1.2.0 kernel 2.6.12 Hi, How can I make the following statement so I can search for any string? Right now I need to input at runtime %whatever I'm looking for% between % signs to get all records matching that query. I want to have this statement set …

Member Avatar for locosway
0
134
Member Avatar for mruane

I am horribly (obssesed?) with writing a visually appealing game (simple) in python. My text adventures didn't appeal to my aufience (family), so I was looking at a tut on making a pac man clone, supposed to be line by line, it seemes choppy. Any ways, here is the code. …

Member Avatar for vegaseat
0
630
Member Avatar for mruane

I was wondering, if I wanted to attempt an ANSII dos game in Python, what would be the best way to do it? I would like to know how I would run it, i.e., would it run in the Python Interactive shell or could a make it run in dos? …

Member Avatar for mruane
0
262
Member Avatar for mattyd

I have been working on a GUI-based program using Tkinter; it is coming along nicely and I am very pleased with the results. I am at a point where I am trying to attempt a graphic manipulation of the GUI canvas. I have researched this but I am unsure what …

Member Avatar for jrcagle
0
2K
Member Avatar for sneekula

As you can see, I am playing around with the Tkinter GUI toolkit. How can I keep a number of widgets fixed in a location even when the user expands the window?

Member Avatar for sneekula
0
191
Member Avatar for sneekula

I am writing a small Python program for the use in our departments stockroom. This is what I have come up with (just starting): [php]# table of chemicals in stockroom # order --> stock number, chemical name, quantity (grams) # short version of the table table = [ ['ud-99137', 'm-chlorobenzoic …

Member Avatar for sneekula
0
152
Member Avatar for coder_gus

Hello! I am working nowadays at a little script that reads mail (gmail).Nothing fancy here.The only problem is that i want to check if pop is enabled and if not to enable it from my python script. Do you know some way[s] to do that?I've tried googling but all i …

Member Avatar for coder_gus
0
73
Member Avatar for mattyd

**[I]Note: This may not be the correct forum for this post; I posted here as I thought it may be related in at least an indirect way. Please move if necessary.[/I] I have never knowingly worked on any projects where I had to attempt to extend a language. I hear …

Member Avatar for Narue
0
125
Member Avatar for linux

Hello! In Visual Basic, there is a piece of code that can be used to see if a command starts with a certain text. For example, if I had a textbox, and I wanted to see if the user had started it with an "A" then I would use (not …

Member Avatar for vegaseat
0
208
Member Avatar for sneekula

Is there a way to make a Tkinter GUI window that the user can not change the size of?

Member Avatar for sneekula
0
160
Member Avatar for Haze

when i say basic i mean basic it doesnt store the encrypted string in a file or anything it just prints out what it would be and all i intend it to do is swap a for b, b for c and so on then turn the string round backwards …

Member Avatar for jrcagle
0
2K
Member Avatar for mattyd

Concerning Python Indentation Syntax: I have researched this and read some reasoning behind indentation-level enforcement. My question is: does this exist simply to ensure consistency when dealing with nested statements, a precaution against sloppy composition of code? I am not complaining about this, and actually I somewhat like this, but …

Member Avatar for jrcagle
0
240
Member Avatar for mattyd

I have been working on a somewhat small Python GUI for a few weeks now primarily focusing on the GUI and not giving much in-depth thought to the logic of what is to be a simple card game. I assumed the logic to be in my head and in general …

Member Avatar for jrcagle
0
305
Member Avatar for chris99

So the Text Adventure is lost. ;-;. I am working on a GUI to take a starting point and a destination input by the user, and scan a file to find a match for both. If it finds a match for Variable A + B then it will assign variable …

Member Avatar for Ene Uran
0
137
Member Avatar for shr2408

I am writing a small tkinter-app involving user keyboard-input, and want to control the range of acceptable input-characters. I'm currently using an Entry-widget, but haven't been able to access the individual characters AS THEY ARE ENTERED. What I (think I:confused:) need is somthing like the 'command=' option (as in the …

Member Avatar for shr2408
0
1K
Member Avatar for mattyd

I am trying code a single button that will fire two commands, that is, it will open two image files with one button selection. I have researched this and have not found much directly related to this question; what I found was to use a def within a def, thus …

Member Avatar for Mouche
0
4K
Member Avatar for William Connery

Hi, I have a small python program with e-mail capabilities that I have pieced together from code snippets found on the internet. The program uses the smtplib module to successfully send an e-mail with an attachment. I want to give users an indication of the percentage of the e-mail that …

Member Avatar for William Connery
0
185
Member Avatar for vegaseat

sharky_machine Offline Posting Whiz in Training Join Date: Oct 2006 Location: New York City Posts: 253 Rep Power: Re: Starting Python Today, 1:41 pm | Add to sharky_machine's Reputation | Add Infraction | Flag Bad Post | IP | #86 -------------------------------------------------------------------------------- Vegaseat: I have been reviewing this code you had …

Member Avatar for mattyd
0
304
Member Avatar for manukumar05

hi friends, help me in regarding , making a "setup " using py2exe, actually my project contains ( dlls,libs,and icons,sip file) so how can i wirte a steup for the project for example my pj name is : " manukumar " it cotains : m1.py,m2.py,m3.py etc files and it contains:: …

Member Avatar for Ene Uran
0
100
Member Avatar for DarkFlash

hey guys, I'm almost done with my newest project (PythonCMS) pretty much a simple, personal, python-based version of dreamweaver;) anyway, I can build webpages with it upload images, media, updates, anything like that. but what I"m trying to get to work now is something that will resize an image to …

Member Avatar for Ene Uran
0
82
Member Avatar for mattyd

I am interested in learning if it is indeed possible to sort a Python dict. What I have researched tonight points to that it is [B]not[/B] possible, although snippets were posted inferring that you can sort a dict; I tried some of this code and it did not seem to …

Member Avatar for jrcagle
0
79
Member Avatar for Matt Tacular

I would post this in my other thread, but I marked that as solved so I think less people would look at it. I want to say this: [code]if list1 is empty: do this elif list1 has any value in it: do this[/code] How do I word that in python?

Member Avatar for Matt Tacular
0
80

The End.