15,181 Topics
| |
I want to make a program that outputs something like: Enter integer: 117 117 is lucky! Enter integer: 1003 1003 is not lucky! So, if the integer entered contains at least one 7 in it, it will output is lucky! And if it doesn't it will output the is not … | |
Hello, I've spent hours but can't seem to figure out how. This is the question: modify the program so that the prompts that ask the user to enter a transaction include the number of the transaction that should be entered next. Here's what the prompts should look like: Enter quiz … | |
I have just started getting into python and Tkinter and so far it's all been very interesting and the help good to, but now i have ran into a problem. I'm sure it's very easy to solve but i just can't seem to figure it out or find anything on … | |
Hi, I am stuck. I am trying to create a new file C:\HourlyATC\ATC101509\10-15-09 to 10-21-09 ATC.txt, and have a bunch of text wrote to this file to have it uploaded to a web site. At this point I would be happy if I could create the file and have the … | |
Hi guys. im new in this forum, getting used to python+turbogears and already have a doubt. i have a sql statement to do , that uses "like" . for example: sql = db.text("select name from users where name like '%Fernando%' and dt_birthday='%s'" %(dt_birthday)) and the server gives me the following … | |
hi, i am developing the django web framework on mac os. i have installed and configure the django. but i am getting this error. Request Method: GET Request URL: [url]http://localhost:1221/polls/[/url] Exception Type: AttributeError Exception Value: 'AdminSite' object has no attribute 'urls' Exception Location: /Applications/Django-1.0.2-final/mysite/../mysite/urls.py in <module>, line 21 Python Executable: … | |
hi, i got a problem for doing a proxy for binary files with python please kindly help #! python import cgi, os file_r = open('x.jpg', 'rb') file_w = open('y.jpg', 'wb') image_data = file_r.read() file_r.close() file_w.write(image_data) file_w.close() it works fine for duplicating x.jpg to y.jpg however, it doesn't work for me … | |
near the bottom of the code you see print statements there. The code executes fine however if they are removed the application locks until the operations finishes. It dos not destroy or add the appropriate widgets until it is completely done. Effectively defeating the purpose of changing them in the … | |
HI GUYS, I HAVE A PROBLEM IN FINDING OUT AN INTERFACE FOR PYTHON 2.6.3 AND MYSQL-5.1.31. IS THERE ANY COMPATIBLE VERSION FOR BOTH THE ABOVE???? WHEN I RAN THE setup.py file of MySQL-Python1.2.2 version, i got the following error. -[COLOR="Red"]-------------------------------------------------------------------------- [COLOR="Green"]This script requires setuptools version 0.6c5 to run (even to … | |
Every time I try to save data to my contacts database I get an error. The script runs fine, but when it come to clicking save I get this error. Traceback (most recent call last): File "C:\Users\Panic\Desktop\EminentGeekTechnology\Looking For Who\addnew.py", line 71, in OnSave self.database.execute('INSERT INTO contacts (fname) VALUES (null,?),' [fname]) … | |
So, I have a rather simple question today. I'll try to explain it by using an example. Let's say there is a line of HTML in the page "www.mywebsite.com/py" that says "<tr colData0='Friday'>". However, this line of code can change to be "Sunday", "Tuesday", etc. What would be the easiest … | |
ok so i was recently playing a game called ZORK a lot of older people will know what that is if you dont its a text based rpg that is realy addicting and amuseing so i wanted to attempt to figure out how they could have done something like this, … | |
I'm stuck trying to figure out how to find out which number in a range entered for a hailstone sequence has the longest length of numbers total including the starting number itself. This is what I have so far: elif choice is apart of a menu getValidInt() is a function … | |
Hi, There is a lot of code - so I have attached the entire thing as a zip file. This is for a function plotter. Basically, I need to track the changes in the root window size so I can resize the canvas and redraw all the plots. I'm very … | |
I have this example code of a program I am writing at the place I work as a 'time clock' of sorts. I want to come in, run the program and clock in. When I clock in, I want to write this to a csv file so I can send … | |
I am trying to make a program that reads from a "integers.txt" file which contains: 1 2 3 4 11 13 15 16 18 20 33 39 42 48 50 51 and finds all the even numbers in "integers.txt" and writes them to a new file "evens.txt" then finds all … | |
Hi, I have a problem. I basically have this python code, that generates a file. I'm trying to get it to output a html file with a chosen name (chosencategory) but the problem is the chosencategory variables are already defined so it attempts to name the html file the contents … | |
Why does this raise an error? I'm trying to add a value to the [0] index for the list [CODE]mylist=[] mylist[0]='hello'[/CODE] | |
Hi! I have a list of class objects, each object contrains a dictionary. Is it possible to sort my list based on a value within each object's dictionary? Can I use the list.sort() method to do this? Thx! | |
The html code of the form, and my code are below. I can't get the value to post/submit. Can anyone help? HTML Code of Form: [code]<form method='post' autocomplete='off'> <input type='hidden' name='action' value='grant-revoke' /> <input type='hidden' name='creator_badge_index' value='1' /> <input type='hidden' name='token' value='92dcd92a8bc16f73f330d118ae1ed891' /> <input type='hidden' name='do-grant' value='1' /> <div id='grant-div'><span … | |
Hi there, I'm trying to create a class with whats below. I made it and it works but i need to be able to withdraw an amount from the balance. I'm just having trouble with the layout and whether i got the right idea? Is the underlined area on the … | |
hello im learning twill,but have some problem with unicode. whenever i use twill's follow function which emulate webbrowser link click function,it can work well with english link,but can't work with unicode. does anybody some know about this probelm? thank in advance follow is sample # -*- coding: cp949 -*- import … | |
hi everyone. to put it plainly, I was writing some python code that used the itunes scripting interface to control itunes. so I got all of my functions down, and now I wanted to have these actions occur on a specific mouse press. thanks to Tech B, I used the … | |
hi everyone. just recently I've been messing around with controlling itunes with python (you should check it out on google; some pretty fun stuff to mess with :D). I've already got all of my functions down, but my questions is that how would I go about grabbing keyboard/mouse input (mouse … | |
I'm having a problem sizing down this block of code: [CODE] if POS == 1: POS1 = "->" else: POS1 = " " if POS == 2: POS2 = "->" else: POS2 = " " if POS == 3: POS3 = "->" else: POS3 = " " if POS == … | |
hello i have some problem to send POST value by use mechanize. i can't write my article to my blog site. here is full source. and what i want to do is, im posting my article to my blog site. thanks in advance. [code] # -*- coding: cp949 -*- import … | |
Hello! I've been messing with tkinter and now have tried to make a MPG calculator using sliders. My problem is that no matter how I move the sliders it does not update the mpg, I'm not sure what to tell the label to do for it to update. I know … | |
I have an application running on a server, which can be accessed through a web interface. For that I use the module BaseHTTPServer. On my LAN, this all works perfect without any flaw. However, when accessing throught the internet, only the first requested page is reaching the server (and honoured). … | |
I need to prompt a user to type in a text file name and then take that file and and count the amount of words in the file. I have this code which counts the words in a file(that may not be "perfectly" written). I cannot figure out how to … | |
Hi How do you find out the first letter or number of string in a list? I have a list and I want to find whether any of the strings in the list start with a capital or little C. The code I have is: [ICODE] def isCMD(self): for word … |
The End.