15,185 Topics

Member Avatar for
Member Avatar for AutoPython

As the title suggests, there are some major flaws in my new program, though it still functions nonetheless. Here's the code: [CODE] POS = 1 try: import Tkinter as tk except ImportError: import tkinter as tk import os def clear(): if os.name == "nt": os.system("cls") else: print ("\n"*40) def key(event): …

Member Avatar for masterofpuppets
0
120
Member Avatar for sravan953

Hey guys, I have made a small program called 'Py-mailer' which allows you to login with your Gmail credentials and send text-only messages to anyone. I uploaded it on SourceForge( [url]http://www.tinyurl.com/m4ans4[/url]). The next step I had to take was to make a GUI for it. So, I started with wxPython: …

Member Avatar for vegaseat
-1
3K
Member Avatar for wajih

Hello all, i want to save the variables present in python workspace to text file.I have used file.write() option but it converts the variables(and also arrays) to string.I want to store them as they are present in IDLE. Is it possible? Thanking all in anticipation. regards wajih

Member Avatar for vegaseat
0
534
Member Avatar for princessotes

Hi, I have a list of positive digits in a file. All I want to do is to add the negative sign (-) to each digit. Is there a code for this. eg list of digits 1 correspond -1 2 correspond-2 3 correspond -3 etc

Member Avatar for vegaseat
0
28K
Member Avatar for saikeraku

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 …

Member Avatar for vegaseat
0
156
Member Avatar for rociel

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 …

Member Avatar for rociel
0
126
Member Avatar for paulo3k

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 …

Member Avatar for masterofpuppets
0
86
Member Avatar for Joe Hart

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 …

Member Avatar for baki100
0
138
Member Avatar for fferrandini

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 …

Member Avatar for fferrandini
0
104
Member Avatar for mohankumar554

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: …

0
58
Member Avatar for loki1234

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 …

0
34
Member Avatar for kingofkya

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 …

Member Avatar for kingofkya
-1
136
Member Avatar for girishmsampath

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 …

Member Avatar for Stefano Mtangoo
-2
244
Member Avatar for Megabyte89

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]) …

Member Avatar for Stefano Mtangoo
0
478
Member Avatar for SoulMazer

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 …

Member Avatar for SoulMazer
1
158
Member Avatar for skylar

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, …

Member Avatar for lllllIllIlllI
0
98
Member Avatar for scrace89

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 …

Member Avatar for scrace89
0
278
Member Avatar for marshall31415

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 …

Member Avatar for marshall31415
0
3K
Member Avatar for Dlsqueak

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 …

Member Avatar for Dlsqueak
0
78
Member Avatar for etypaldo

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 …

Member Avatar for woooee
0
105
Member Avatar for qadsia

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 …

Member Avatar for qadsia
0
261
Member Avatar for mahela007

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]

Member Avatar for mahela007
0
74
Member Avatar for zyrus001

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!

Member Avatar for jice
0
242
Member Avatar for SuperMetroid

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 …

Member Avatar for SuperMetroid
0
171
Member Avatar for thehivetyrant

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 …

Member Avatar for Gribouillis
0
137
Member Avatar for james27

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 …

-1
60
Member Avatar for fallopiano

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 …

Member Avatar for fallopiano
0
103
Member Avatar for fallopiano

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 …

Member Avatar for fallopiano
0
326
Member Avatar for AutoPython

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 == …

Member Avatar for AutoPython
0
144
Member Avatar for james27

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 …

0
60

The End.