15,190 Topics

Member Avatar for
Member Avatar for DustinS

I just started messing with Python, and was having a great time with entering Tkinter GUI commands into the Python shell (ActivePython 2.5). Its fun entering commands one at a time and seeing components appear real-time (instead of normal process of having to compile the whole thing first). Anyway, I …

Member Avatar for DustinS
0
7K
Member Avatar for jhartley3

[ICODE]def aquariumTicket(total = 0): age = input("What is your age?") if age < 3: price = 0 elif age >=3 and age <=12: price = 19.5 elif age >= 55: price = 21.5 elif age >12 and age <55: price = 26 print "Ticket price: $%.2f" % price others = …

Member Avatar for slate
0
104
Member Avatar for jhartley3

def divide(dividend, divisor): This function should return the calculated value of integer division of divisor by dividend. Calculate the solution by using subtraction recursively to divide the two numbers. You are not allowed to use the division operator for this problem. Explanation: note that 7 divided by 2 is 3 …

Member Avatar for slate
0
108
Member Avatar for dinilkarun

How to create a tree control with child nodes having check boxes? I want the check boxes to be preferably on the left side of the nodes.

Member Avatar for woooee
0
564
Member Avatar for Fuse

Hi there. I'm new to Python. I started learning it 3 days ago. I've figured out everything by myself so far, but this is stumping me: Whenever I load a file such as a html document or a text file, it loads fine. But when I load this gif or …

Member Avatar for woooee
0
406
Member Avatar for Timotei

Is there a way to overlay graphics in Python? I'm looking for functionality similar to X-fire. That is, I want to be able to press a set of keys in a game and a GUI screen with some options (possibly a shell script) that doesn't cover up the game should …

Member Avatar for Timotei
0
2K
Member Avatar for inkcoder

Hello Everyone, I just joined here hoping to increase my knowledge at python. I have been beginning to learn this language as of yesterday. I have decided that if I really want to increase my knowledge I should start on a project. Well here is my first project, a simple …

Member Avatar for sneekula
0
176
Member Avatar for eibwen

OK guys, I've hit a wall & can't find any info on what I'm wanting to do. Maybe someone can help me out here or point me in the right direction please? I have a shelve object- book. If I do book.keys(), naturally I get a list of the keys- …

Member Avatar for eibwen
0
136
Member Avatar for The_Rick_14

Hi there. I'm now to this forum hoping to get an answer that I feel shouldn't be too complicated but, with that said, I haven't been able to find a solution to this after doing some research for a few hours today. What I am looking to do is take …

Member Avatar for The_Rick_14
0
181
Member Avatar for olipals

Hi! I've got an assignment to read an input file and do some calculation and a graph and fancy stuff like that. The problem I am having is reading the file. I get a file that looks like this: [code] 0.00 1.776e-12 3.756e-07 0.000e+00 0.000e+00 0.20 1.769e-12 2.377e-07 0.000e+00 0.000e+00 …

Member Avatar for sneekula
0
271
Member Avatar for dinilkarun

we installed Openoffice.org 2.3 and i am tryingt to run the script by importing UNO and it is throwing up an error saying there is no module called pyuno. I am not able to find pyuno.py file in the location where i have installed open office Please assist.

Member Avatar for sneekula
0
74
Member Avatar for EAnder

I am trying to add user input using the raw_input function to string url_orig. I am attempting to replace the spaces with +'s to make a 'google search'. the replace function works fine in IDE but not when I excecute the program. Any help will be appreciated [code]url_orig = 'http://www.google.com/search?hl=en&q=' …

Member Avatar for woooee
0
93
Member Avatar for gtrashing

Hi, I'm tring to write a script that as to be executed by root on linux... This script execute other bash script normally like root, the problem was that I have to log what my script do. I choose the logging library... Perhaps I have to write the log in …

0
40
Member Avatar for JA5ONS

Okay, I appreciate everyone's help! i am trying to work out how to find a duration type thing.. i have created this as an example of what i am trying to do. [CODE] ### gaining inputs start= raw_input("What time did the tv show start: (Format = 14, 12) ") finish= …

Member Avatar for JA5ONS
0
117
Member Avatar for JA5ONS

just wondering if there is anything in python to give the date automaticly, just like excel has =today() cheers.

Member Avatar for lllllIllIlllI
0
145
Member Avatar for Potty391

Hi everyone, I just started working with Python and programming in general (i chose it as a school subject for this year) and i received a task(scroll a bit more down).. since im a total newbie with Python in general.. i was hoping someone could please explain this task in …

Member Avatar for woooee
0
99
Member Avatar for JA5ONS

well, after the help i have had already tonight, i thought i might come ask another issue i am having with saving the file with the .txt extention. i can save each file as the car model first name for each entry, however it wont put the .txt extention on …

Member Avatar for Ene Uran
0
44
Member Avatar for dinilkarun

listText=["Car","Bike"] for intkLoopIndex in range(0,2) f.write(str(listText[intkLoopIndex])+ '\n') i am using the above code to write a string onto a document. How can i display the text in [B]bold [/B]in the document? Can i set the font property when i write?

Member Avatar for woooee
0
103
Member Avatar for lllllIllIlllI

Hi I was wondering if there was any way i could use a module or some code to enable and disable my wireless network becuase i often have the problem that it wont connect and enabling and disabling it a number of times nearly always fixes it and i was …

0
48
Member Avatar for Mackjan

This function arranges a list of number. If we try z= [4, 4, 2 ] the result will be after some steps 4,3,2,1 but my list is z = [ 1, 1] and I want if a cycle of number coming up again and again the main program will discover …

Member Avatar for Mackjan
0
83
Member Avatar for FreezeBlink

Iterating over a list, possibly deleting elements. It's the bane of my existence. Suppose, for instance, we have a list of numbers, and want to iterate over it and delete each and every odd one. Sounds simple, right? Sorta. It's trivial, but the code you end up with is pretty …

Member Avatar for jrcagle
0
115
Member Avatar for sarabhjeet

Hi All, first of all thanks to all for helping me out till now, whenever i got stucked somewhere that time u all helped me out.I need some more help of u all.I am using python 2.5 along with wxpython,and i need to increase the visibility of the dialogs and …

Member Avatar for sarabhjeet
0
85
Member Avatar for msaenz

Greetings, I am trying to do a reconnect type of thing for when sqlserver disconnects me i check and reconnect to execute a query. here is some code that i wrote, I really don't know what to use since there is not isconnected method or reconnect method in pymssql. Any …

Member Avatar for jrcagle
0
2K
Member Avatar for bf2loser

can someone show me some code to convert rankine temperature to kelvin? rankine is in the same scale as fahrenheit, but it starts at absolute zero. so 0R = -459.67F, heres is what I have convert to kelvin [code=python] def __init__(self, value=0): Fah=value-459.69 Cel=(Fah-32)*5/9.0 value=Cel-273.15 Temperature.__init__(self, value) [/code] convert back …

Member Avatar for jrcagle
0
1K
Member Avatar for mruane

I am not sure how to word this question. If I am defining function() to be a user input prompt, does the [code] name_of_prompt = raw_input("") [/code] name of prompt equal the name of fucntion or could it be prompt_funct1? If so, when using if...elif statements to call on other …

Member Avatar for slate
0
298
Member Avatar for turnerca902

Hi all, I have a little project that I think would be possible to accomplish using python. I'm a beginner at this sort of thing, so I am posting the basic information in the hopes that someone out there could help me get started or point me in the right …

Member Avatar for woooee
0
153
Member Avatar for clouddragon

hello, I have to write a program that draws a chart from dictionary entries. I am able to make a draw a chart however it is unsorted. How can i get it sorted. Please help asap. THANKS in advance. [CODE]from random import shuffle from graphics import * def main(n): win …

Member Avatar for vegaseat
0
166
Member Avatar for joshuabraham

os version =windows xp hi guys i'm having problems using pygame the following code just does not seem to work. Code: ( text ) 1. clock=pygame.time.Clock() 2. while True: 3. sound1.play() 4. clock.tick(60) 5. pKeys = pygame.key.get_pressed() 6. Eves=pygame.event.get() 7. villian.face() 8. villian.hert() 9. if Eves[KEYDOWN] and pKeys[K_UP]: 10. hero.moveup() …

Member Avatar for joshuabraham
0
175
Member Avatar for ccandillo

I am still reading the learing python o'reilly book and not sure the best way to approch my problem. Given c:\dir1\dir2\dir3. I want to zip all files in dir3 if those files are older than 30 days using 1 zip file (ie. dir_3_files.zip). If all files in dir3 are older …

Member Avatar for woooee
0
1K
Member Avatar for jimbox123

hey everybody I'm taking a computer class right now and one of the projects I need to do is create a very simple pizza-ordering menu. At this pizzeria, there is only one kind of pizza you can order: regular (cheese) with no toppings. Your choices are what size of pizza, …

Member Avatar for vegaseat
0
1K

The End.