15,175 Topics

Member Avatar for
Member Avatar for Jintu

[code=python] total = 0 max_score = -1 min_score = 100000000 total_numbers = 0 x = 0 y = 0 print("Enter a list of numbers, (Enter -1 to stop) ") print ("Press the enter key after entering each number") print ("End the list by entering -1") print () number = int(input("")) …

Member Avatar for vegaseat
0
138
Member Avatar for MK12

Hi. Before I start I'll just let you know that this isn't for school, I'm just doing python as a hobby which I have pretty much taught my self. I'm working on a project, it is the "cheat!" card game written in python, currently CLI but when it is bug-free …

Member Avatar for scru
0
2K
Member Avatar for dude93

Hey, I'm not new to python but I wouldn't say I'm use to python either, I am very limited to what I can do, but I was wondering if anyone could give me some ideas for some simple programs that will teach me usefull things to learn. Thank you very …

Member Avatar for vegaseat
0
110
Member Avatar for tomtetlaw

Is there a different version if IDLE for Python 3.0(Python 300, Py3k)?? If there is, how do I download it?

Member Avatar for vegaseat
0
155
Member Avatar for sravan953

Can anybody gimme a link to a good msvcrt tutorial, because I want to learn getch() badly!

Member Avatar for vegaseat
0
120
Member Avatar for winmic

Hey all, I just recently got into wxpython for my job and I ran into a snag. When print previewing (using the demo code) there seems to be an insane amount of pages, yet only a few of them are viewable. So my questions are: 1) Why is there an …

Member Avatar for vegaseat
0
99
Member Avatar for sravan953

I wanted to make a Python prog just for fun, to get a pattern like: [CODE] * ** *** **** ***** ****** ******* ******** ********* **********[/CODE] So, basically, I started off by making a script to simply print [CODE] *****[/CODE] using a loop. Here's the code I used: [CODE]import time …

Member Avatar for vegaseat
0
93
Member Avatar for tomtetlaw

How do you specify a certain path for the import thing to import? such as [icode]import "E:\Tom's Personal Project\engine\shared.py"[/icode] Any help would be appreciated :)

Member Avatar for vegaseat
0
157
Member Avatar for poeticinsanity

I'm running a portion of code in a loop. It accesses a global variable only to print it, and that variable is never changed after it is set in the __init__. However, the first print statement occasionally will fail, but the second one does not. Any ideas as to why …

Member Avatar for vegaseat
0
102
Member Avatar for hughesadam_87

Hey guys, When using the glob import, I want it to scan all of the files in a directory, but not scan other directories in that directory. For example, say I am in a directory with the following files: [CODE]file, file1, file2, DIRECTORY1, DIRECTORY2[/CODE] When I use the glob command: …

Member Avatar for vegaseat
0
150
Member Avatar for Mclovin

I want to create subfolders in already existing subfolders. For example, I have a rootdir with about 50 subfolders in it. In each subfolder I want to create about 5-6 new folders depending on the filename in the subfolder. Confusing? YeahIknow.. I think I know how to create new subfolders …

Member Avatar for jlm699
0
3K
Member Avatar for gsingh2011

Hi, I want to make a program that opens a url, finds the data I need, and returns it to me. The problem is I have to login to the website, and I don't know how to do this. I've looked at some examples, and this is what I have …

Member Avatar for siddhant3s
0
107
Member Avatar for iambinary

where does the print() subroutine, subprogram, or function exist? sure, you "call" it so it can return a value or result, but from where? from where do you "call" it? where does it exist? i don't understand!!

Member Avatar for vegaseat
0
114
Member Avatar for gislik

Hi, I'm new to both python and Wxpython so I was wondering if someone could help me with a problem I have. I made a button that runs the UpdateNebula function. the function takes a string called path but I haven't been able to find a way to have the …

Member Avatar for vegaseat
0
131
Member Avatar for hughesadam_87

Hey guys, A while ago, with your help, I was able to create a code which scans a data file for names, and when a new name is found, it appends it to a list. For each entry is the list, the code then opens a new file for each …

Member Avatar for jlm699
0
1K
Member Avatar for tehbrozor

Hello, I am creating a figure with matplotlib and want the legend background to be transparent, I did this with: [code] lg = matplotlib.pyplot.legend(labels,markerscale=0) lg.legendPatch.set_alpha(0.0) [/code] And when i ran it it works but when I save it to an eps (which is the format I need it in) The …

0
54
Member Avatar for pymatio

I have this html: [CODE] <html> <body> <form action='super.py'> <input type=text name=person value="New User" size = 15> <input type=submit></form> </body> </html> [/CODE] & this python script: [CODE] <html> <body> <form action='super.py'> <input type=text name=person value="New User" size = 15> <input type=submit></form> </body> </html> matio@matio-desktop:~$ cat /var/www/py/super.py #!/usr/bin/env python import cgi …

Member Avatar for shadwickman
0
151
Member Avatar for JDCyrus

Hi. I'd like some help with a program that runs over a network. My program uses queue-based distributed computing. Because the computers are all on a LAN and differ greatly in processing power, they receive objects to process only when they request them. (Some can process more than one object …

0
59
Member Avatar for sravan953

Hey, I have a simple progam at hand....what I need now is a WYSIWYG(What You See Is What You Get) GUI Editor with which I can create good user interfaces without(or with very less) coding! Any ideas for such a program? Thanks

Member Avatar for sneekula
0
2K
Member Avatar for gudivada213

[code] #!/usr/bin/env python import MySQLdb file=open("capgps.txt",'r') #Open database connection db = MySQLdb.connect("localhost","root","8868","myproject") # prepare a cursor object using cursor() method cursor = db.cursor() #line is like below #$GPRMC,111503,A,0833.6323,N,07652.7685,E,0.1866,256.540,220609,,*2A for line in file: data=line.split(",") if data[0]=="$GPRMC" and data[2]=="A": if data[4]=="N": latitude=str((data[3])/100.0) else: latitude=str((-data[3])/100.0) if data[5]=="E": longitude=str(data[5]/100.0) else: longitude=str((-data[5])/100.0) linedata = {'time':data[1], …

Member Avatar for gudivada213
0
5K
Member Avatar for bryancan

I have a potentially very large csv file that I need to read in and display, but only a few records at a time. I want to be abe to page thru the file using offset and records variables. What I have is the following, but it really doesnt work …

Member Avatar for jlm699
0
146
Member Avatar for dantheman3141

Hello. I have come across many scripts for rebooting remote computers using python, but what about the computer the script is running on? If possible, I would also like my script to run in the background so the little cmd box is not visible. Thanks in advance for your help.

Member Avatar for dantheman3141
0
875
Member Avatar for shadwickman

If anyone is still interested in those old, nostalgic text-based games to run in the console, there's Python Universe Builder by Joe Strout. Yes, it's a dead project as the last release dates back to 2006, but it still works fine if anyone is interested. On the [URL="http://py-universe.sourceforge.net/"]Sourceforge page for …

1
112
Member Avatar for rasizzle

Hey all, Here is what I'm trying to do. I have a list whose output is: [['4/18/94', '29.125', '442.46'], ['4/19/94', '29.336', '442.54'], ['1/20/04', '75.175', '1138.77'], ['1/21/04', '75.711', '1147.62'], ['1/22/04', '75.595', '1143.94']] Item [1] in each list, the middle item, is the number I want to focus on. Currently, I have …

Member Avatar for rasizzle
0
100
Member Avatar for hughesadam_87

Hey guys, I have been trying to search for this answer on online tutorials, but cannot figure out just what I am doing wrong. I have a list of names, and some of them have the character '/' For example: [CODE]list = [adam, bill, jon/juan][/CODE] Because later in my code, …

Member Avatar for hughesadam_87
0
128
Member Avatar for happymadman

Is there an easy way to handle input from an entry box, in my project I am working on I have to call functions twice which ends up making a large mess of everything. Like if I call the [code=python] import tkMessageBox from Tkinter import * def yes_no_ask(answer): guidisplay.actiondisplay.configure(state=NORMAL) guidisplay.actiondisplay.insert(INSERT, …

Member Avatar for woooee
0
176
Member Avatar for sravan953

Hey guys! I just wanted to make a simple Python Keylogger to know whether some on is fiddling with my laptop while I'm away or not...also, I want it to write the keys pressed to a file... Oh, and, do to this is pyHook easier or Threading? And, BTW, what …

Member Avatar for sravan953
0
267
Member Avatar for happymadman

So I have this simple list and scroll bar combo and I have been trying to make it stay at the bottom of the scroll bar as the text is added so it looks like the scroll bar is just to look back over the previous text. Like in a …

Member Avatar for kolosick.m188
0
104
Member Avatar for txwooley

I have written a poker game in Python and have it fairly well finished. My hang-up now is an option to play again. Most of the game is in a function called playHand() which re-runs as long as you still have money, but if you lose all of your money, …

Member Avatar for txwooley
0
331
Member Avatar for MONODA

Hello, I am not sure if anyone will understand what I am asking for, but here goes anyway: I am looking for a way to generate a list of tuples with random values; something like the range function except I want to have a list of tuples rather than integers. …

Member Avatar for MONODA
0
10K

The End.