15,185 Topics

Member Avatar for
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
876
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
114
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
101
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
268
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
105
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
332
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
Member Avatar for hughesadam_87

Hey everyone, I tried a site search but it turned up cold. Has anyone here ever written a small method to take a list of names and sort them in alphabetical order? If so, would you mind posting it up, or directing me to a tutorial that would explain this …

Member Avatar for lllllIllIlllI
0
94
Member Avatar for Jintu

Write a Python program to show the temperatures starting at zero degrees Celsius, up to 100 degrees Celsius, in steps of 2 degrees, with the corresponding Fahreneit temperature shown in the next column. Temperatures should be shown as floating point numbers to two decimal places. Use a for loop for …

Member Avatar for vegaseat
0
228
Member Avatar for sedampatil

I am new to python program, don't know much about the syntax of python. I have written a program which will extract the csv data as below. <html> <body> import csv, sys filename = "inputfile.csv" reader = csv.reader(open(filename, "rb")) #rownum = 0 try: for row in reader: #if rownum == …

Member Avatar for shadwickman
0
193
Member Avatar for bluetie

Hi, i would like to know if someone can help to sort out a doubt aboty python, first of all i'm pretty new to python. [B]Problem description:[/B] the programs i wrote do not run in the same way in console than script, if i type the whole program in the …

Member Avatar for vegaseat
0
75
Member Avatar for funfullson

hello all. I have python 3 and want use mysql but i dont find mysqls modouls please say me a link.

Member Avatar for Stefano Mtangoo
0
85
Member Avatar for sravan953

Hey guys, I use Python 2.6.2, and have made a program; here's the code: [CODE]import subprocess import time def open_program(): time.sleep(s) print 'Opening the program...' subprocess.call(c) h=input("Time: ") c=raw_input("Enter the full location of the program you want to open after the desired time: ") s=(h*60*60) open_program()[/CODE] I also have some …

Member Avatar for Stefano Mtangoo
0
225
Member Avatar for rasizzle

Hey guys, I'm trying to create a buy and sell program where I have two lists of numbers. Eventually I want to shorten the lists so that the program buys at a lower number, and sells at a higher number, ignoring all other numbers in between. The solution would be …

Member Avatar for shadwickman
0
297
Member Avatar for Nidhi G

Hi I wish to write a program that will perform some action on a key press event but if there is no key press in a certain period of time say 10 seconds, it should display an error message and exit. I am working on windows and am using the …

Member Avatar for Hummdis
0
317
Member Avatar for harsha_kusam

Hi All, We have beenn migrated from 9i to 10g and one of our python script is still pointing out to 9i libraries [B]import cx_Oracle[/B] when it's trying to import this library my script is failing ImportError: ld.so.1: python: fatal: libclntsh.so.9.0: open failed: No such file or directory Could some …

0
71
Member Avatar for harsha_kusam

Hi All, We have beenn migrated from 9i to 10g and one of our python script is still pointing out to 9i libraries [B]import cx_Oracle[/B] when it's trying to import this library my script is failing [B]ImportError: ld.so.1: python: fatal: libclntsh.so.9.0: open failed: No such file or directory[/B] Could some …

Member Avatar for harsha_kusam
0
110
Member Avatar for tomtetlaw

i am making a game and i am getting a strange error heres the relevant code [code=python] items = {'sword':['sword', 3, 15], 'axe':['axe', 5, 25], 'bow and arrow':['bow and arrow', 4, 20]} for item in items: print items[item[0]] print '\tprice:' + items[item[1]] print '\tdamage:' + items[item[2]] [/code] Heres my error: …

Member Avatar for woooee
0
136
Member Avatar for Kenny.Devon

Hi forum, I'm a very old dog trying to learn some new tricks, and could use some help. I want to do some sophisticated web page scraping which involves, among other things, analysing the [U]format[/U] attributes of web page text. The formating of course can be specified inline using HTML …

0
46
Member Avatar for reedie

All, i have a pretty simple task but for some reason i cannot for the life of me figure out how to do it in Python. I have a matrix of numbers, this matrix has a variable number of rows depending on the dataset but always 30 columns. first things …

Member Avatar for sneekula
0
134
Member Avatar for MONODA

Hello, I am writing an application which uses the trig functions of the math module in python but for some reason, the float values that some of the calculations return are obviously incorrect. for example [code=python]math.cos(90*math.pi/180)[/code] returns 6.1230317691118863e-17 rather than 0. Does anyone know of a way which I cant …

Member Avatar for MONODA
0
303
Member Avatar for Zaffron

So I have been playing with classes, seeing that they are more efficient than globals, and I wrote this hopefully simple test program to see if I properly reverse engineered tetlaw's simple rpg. For the life of me I cannot figure out what is wrong with it. If an expert …

Member Avatar for Zaffron
0
100
Member Avatar for abhigyan91

hey i just started python.. i know this is a useless stupid program but i still cant get it right..:( here i want the user to enter date in dd/mm/yyyy fashion and return the date in words. eg. 12/12/1912= 12th December,1912 but it doesnt work.. it only works for 29 …

Member Avatar for sneekula
0
104
Member Avatar for jcmeyer

Let's say a user of my application opens two or more MDIChildFrames. How can I get access to any one of the child frames? If I keep track of the names of the child frames in a list is there a way to use the name to call upon a …

Member Avatar for jcmeyer
0
85
Member Avatar for jcmeyer

When I run this code: [CODE]sql = "SELECT Name FROM nameDatabase" self.cursor.execute(sql) list=self.cursor.fetchall() print list[/CODE] I get: >>> [(u'Joe',), (u'Katie',), (u'Bob',), (u'Ian',)] However, if I try to make a SingleChoiceDialog with wxpython it does not like that list. Is there any way to get those values in a so it …

Member Avatar for jice
0
108
Member Avatar for rustysynate

I tried the first post on wxpython by fuse. The code is as follows # import wx # # always add this line, or your code won't compile - the wx module contains the GUI code you'll use # """The start of our wxPython GUI tutorial""" # # app = …

Member Avatar for rustysynate
0
171
Member Avatar for besktrap

Hi all. Is there any way that if I give python a string, it can convert it into code? Example, say I am given this string: [CODE=python]string = "Class( 0,100 )"[/CODE] Now I want to convert it into code: [CODE=python]Class( 0,100 )[/CODE] Any ideas? Thanks.

Member Avatar for abhigyan91
0
11K

The End.