15,406 Topics

Member Avatar for
Member Avatar for alex-VX

is there any way to disable a loop when the user is inactive / when the screen saver is on?

Member Avatar for alex-VX
0
108
Member Avatar for s.praneeth

Two up is a historically popular Australian gambling game ([url]http://en.wikipedia.org/wiki/Two-up[/url]) Two up was played at Crown Casino for a time with the following rules: •Spinner nominates “heads” or “tails” •If the spinner nominates “heads” and spins a series of three heads before being eliminated he/she is paid at odds of …

Member Avatar for lllllIllIlllI
0
204
Member Avatar for blueness25

Hello, I know this is a very simple problem, but I am about to give up... Why couldn't I get the control keys do their job? Maybe someone whose eyes are more rested than mine can tell me. I will appreciate any help. I am dealing with pygame, and I …

Member Avatar for blueness25
0
804
Member Avatar for DrakeMagi

Just want to create a flexible desktop that is independent from system. For my linux system. Like to have Clean Window and Transparent. 1. Looking for the basic on Xlib. Most of what i found is unclear where i start. I like to start simple and expand. a. Want to …

Member Avatar for DrakeMagi
0
442
Member Avatar for s.praneeth

Chapter 9 of your textbook (and your lecture notes) refer to a racquetball simulation program (which is attached for your reference). Make the following modifications to the program: a) Ensure that to win a game (in addition to scoring 15 points) a player must obtain a 2 point margin from …

Member Avatar for gerard4143
0
246
Member Avatar for The-IT

hello I have been doing a lot of Tkinter lately and I was wondering of there is a way i fit a scroll bar into a text wdiget using the .grid() method. right now the code i have writen is: [code]from Tkinter import * root = Tk() text = Text(root) …

Member Avatar for The-IT
0
6K
Member Avatar for esash

Hello everyone.. I'm a new user of python.. I have encountered a problem while trying to find the inverse of a matrix even after importing numpy and scipy. The error is: >>> a=[[[1, 2, 3], [2, 3, 4], [3, 4, 5]], float] >>> print a [[[1, 2, 3], [2, 3, …

Member Avatar for vegaseat
0
157
Member Avatar for sgarber

Oops, bad title... Better title: Python Serial Output Works Only Conditionally Hi, I am working on having python send commands to a microcontroller via the serial port. I want to write a python script that will send a single byte to the serial port and then quit. The script I …

0
44
Member Avatar for simonches

Hi, I'm trying to make a program in python that solves word puzzles like this: "nj" (the answer to that is "ok") where each letter is off by one, for example a or c instead of b. the program is supposed to generate a list of possible words which will …

Member Avatar for simonches
0
158
Member Avatar for jmn0729

I would like to execute a script within a "form post" that downloads a python script. This is for the academic field, the python script is a grading script. The student must configure a case study and click a grade button (form post) that runs the python script against their …

0
74
Member Avatar for racshot65

Hello, This is driving me crazy so here it goes. I'm trying to create a program that finds the 1000th prime number. This is the code I started with to check if a number is prime: [code] numberofprimesfound = 0 numbertotest = 303 divisor = 2 if numbertotest%divisor == 0: …

Member Avatar for jlm699
0
119
Member Avatar for etypaldo

I am currently learning Python and how to work with start and stop indexing. I am doing a project from the book I am learning from and I'm stumped...I need to display a full deck of cards, with [CODE]numbers = ("A", "2", "3", "4", "5", "6", "7", "8", "9", "10", …

Member Avatar for sneekula
0
166
Member Avatar for Friktion

hey everybody i just upgraded from 2.5 to 2.6 and im having problems with building pymedia since there is no binaries out there -.- this is what im doing and getting [CODE] C:\pymedia>python setup.py build Using WINDOWS configuration... Path for OGG: ..\pymedia\libogg-1.1.4 Path for VORBIS: ..\pymedia\libvorbis-1.2.3 Path for FAAD: ..\pymedia\libfaad2 …

Member Avatar for Friktion
0
256
Member Avatar for Warkthogus

I'm attempting to write a program that will take a word entered by the user and give a concatenation of the corresponding triple quote strings. I've looked at [URL="http://www.daniweb.com/forums/thread189881.html"]http://www.daniweb.com/forums/thread189881.html[/URL], but didn't quite find the piece I'm missing. The idea is fairly simple: User inputs a word (or numbers) Exchanges letters …

Member Avatar for Warkthogus
0
228
Member Avatar for awa

Hi, I have the following problem: I would like to read from a file between to keywords (KEY1 and a line consisting of ------), skipping 4 lines after the first keyword. What I have is the following: [CODE]import re import string infileName = raw_input("filename ") infile = open(infileName, 'r') data …

Member Avatar for awa
0
305
Member Avatar for Stefano Mtangoo

I have been thinking if this is only possible to very very very advanced wxPyees. I have tried and tried to understand this but with no success. I have seen Mike saying the same in wxpy listing and many more. I have started this to hear your experience with printing …

0
72
Member Avatar for mahela007

I'm a bit confused as to how variables (or fields) of classes are handled in python. I'll give a small example of what I mean. [CODE] class Cow: # the first class that popped into my head legs = 4 moo = cow() [/CODE] now, moo.legs will return 4 and …

Member Avatar for djidjadji
0
175
Member Avatar for blunsky

Hi, I'm running a PCM-9375 system with Linux Debian 5.0.0. I am currently running a a python application on the system continuously, and our system seems to be resetting approximately every 24 hours (not at midnight, but 24 hours from whenever the system was started). I am not sure whether …

0
42
Member Avatar for AutoPython

I have a weird glitch or something, whenever I try to start turtle graphics from the shell it goes unresponsive, but when I run the program in a console window it works. This is really annoying me! Any help would be appreciated.

Member Avatar for vegaseat
0
69
Member Avatar for AutoPython

Okay, I am confused on the global statement. To my knowledge it lets you easily access variables from a function to be used in the session. Now someone said that it's useless and you shouldn't use it in your code. Is this true?

Member Avatar for AutoPython
0
331
Member Avatar for vlady

hello, pls can somebody show me a way how to solve the following exercise: A number, a, is a power of b if it is divisible by b and a/b is a power of b. Write a function called is_power that takes parameters a and b and returns True if …

Member Avatar for vlady
0
3K
Member Avatar for i are smart

in Vista, cTurtle worked like a charm, but in Ubuntu, when i downloaded the cTurtle to my desktop and moved it to site-packages, it still won't work. When i clicked on the downloaded cTurtle.py file, what i get is a text file with chinese characters, and it closes within a …

Member Avatar for sneekula
0
252
Member Avatar for chico2009

Hi All Could you please help me with the following, #Convert C to F def Tc_to_Tf (): Tc = input ("What is the Celsius Temperature ? " ) Tf = 9.0/5.0 * Tc + 32 print 'The temperature is ', Tf, ' Degrees Fahrenheit' I get NameError: name 'Tf' is …

Member Avatar for chico2009
0
195
Member Avatar for Benderbrau

Hello, I'm posting this code so that maybe it will help someone else in the future. I spent about a week trying to figure this out, and Google searches were not helping. Hopefully anyone else wondering about this will see this post on a Google result. The program I finished …

Member Avatar for Gribouillis
0
161
Member Avatar for Barefootsanders

Hi all, I have a php/mysql based site set up. I want to keep my database layer updated via a python script that will query some other systems, parse data and make the appropriate CRUD calls to my database. My question is might be a simple one but I'm wondering …

Member Avatar for Stefano Mtangoo
0
157
Member Avatar for Tommy_101

Hi, I've been trying to create a program that gets wikipedia pages, and lists all the links found in the page source. I've used the urllib.urlopen() method to do this, and unfortunately I've run into a little problem. Instead of getting the actual page like say the main page, or …

Member Avatar for Tommy_101
0
208
Member Avatar for optikali

So below is my first attempt at using user input, but I can't figure out how to get the input (at the bottom) to plug into my function definitions. I have no proper python training and am attempting to learn on my own with some books. I would appreciate any …

Member Avatar for sneekula
0
190
Member Avatar for sneekula

If you own a stopwatch, here is your chance to benchmark the various versions of Python on recursion performance. The Ackermann function gives the old computer quite a workout.

0
234
Member Avatar for leegeorg07

HI, I recently looked at sneekula's ticker code, and I was wondering about any good graph extras, to show it in a simpler form, also any tutorials if at all possible, thanks in advance

Member Avatar for leegeorg07
0
91
Member Avatar for ravi_72

Hello all We are using subversion as our source repository and trying to backup the repo using Subversion hotbackup.py script I am very much new to python scripting and trying to understand the below error message IOError: [Errno 13] Permission denied Exception IOError: (13, 'Permission denied') in <bound method ZipFile.__del__ …

Member Avatar for Stefano Mtangoo
0
108
Member Avatar for PYGUY

HI, I've got a list of 10 websites in CSV. All of the sites have the same general format, including a large table. I only want the the data in the 7th columns. I am able to extract the html and filter the 7th column data (via RegEx) on an …

Member Avatar for PYGUY
0
1K
Member Avatar for AutoPython

The title doesn't really make sense, as a number with some thing like .23238382 attached to the back of it isn't an integer, but that's not the point. I want to make a program that places commas in the correct position in a number you give. Well, in some of …

Member Avatar for AutoPython
0
192
Member Avatar for computerfreak97

I am trying to develop a program using pygame that will let you "paint." There is just one problem, when I change the RGB values, all of the pixles change!!! Please HELP!!! Code: [CODE] import pygame, os pygame.init() pygame.display.init() screen = pygame.display.set_mode((830, 620)) draw = 0 selected = 0 points …

0
50
Member Avatar for dbmikus

I am writing a function to extract decimals from a number. Ignore the exception and its syntax, I am working on 2.5.2 (default Leopard version). My function does not yet handle 0's. My issue is, the function produces random errors with certain numbers, and I don't understand the reason. I …

Member Avatar for dbmikus
0
237
Member Avatar for lllllIllIlllI

This code shows an example of using recursion to simply solve a problem. Note though, it can take a long time to do larger numbers such as the 50th fibonacci numbers this way. Hope this helps! :)

Member Avatar for sneekula
0
211
Member Avatar for klabak85

Hi all, I'm a completely new user of python (and by new I mean I started using it yesterday) but I've been programming for a couple of years now in other languages such as Java. I have a question to ask you all. So what I want to do is …

Member Avatar for jice
0
150
Member Avatar for Caleb2419

I was given an assignment to create a high/low program (well, the first part anyway) that fulfills the following pseudocode: • Print instructions to the user • Start with the variables high = 1000, low = 1, and tries = 1 • While high is greater than low ◦ Guess …

Member Avatar for Caleb2419
0
241
Member Avatar for ihatehippies

My app works fine when its a .py file, however as soon as I compile it with py2exe 0.6.9 I get LookupErrors when using the email MIME library. I tried including the "packages": ["encodings"] option in py2exe but to no avail. I'll post the relevant code and traceback. (note: not …

Member Avatar for ihatehippies
0
135
Member Avatar for stratodavius

Hello everyone: This is my first post on the site -- so if you think this post is misplaced or not formatted correctly or whatever, please let me know. Please accept my apologies in advance. My issue? I'm trying to integrate a Python script to help automate tasks we use …

0
56
Member Avatar for hwd888

I am new one for python web service. I need to switch the below java webservice client source code to python.Two services. One is systemService, the other is queueService. It needs to maintain session for queueService to use the connection to inews server in systemService . Who can help me? …

0
87
Member Avatar for somekid413

so I have a script that is taking input from a text file and using it to populate an excel spreadsheet. it keeps giving me a UnicodeDecodeError, dying on the ± symbol, I'm assuming its not in the codec that is being used: im using the xlwt package for writign …

Member Avatar for god0fgod
0
349
Member Avatar for lifeworks

Hi Ive been working with PHP, AS3 and some javascript for a while now, and want to move into something that allows me to develop desktop apps... I considered Java, but have become used to PHP's loose typing or whatever the technical name is, and so after some investigation Python …

Member Avatar for sravan953
0
168
Member Avatar for edward_pedro

Hey all. I'm new to this forum and Python. I need a program that can search an inputted keyword through all the files that end with the ".txt" extension inside a given folder. The output should include the name of the files which contain the keyword, the sentences which contain …

Member Avatar for vegaseat
0
150
Member Avatar for chase32

I am trying to combine two multi-element dictionaries but am running into a problem. From the example below, what I expected was the dictionary x to contain all three unique combinations. What seems to have happened is that the y dictionary overwrote the x dictionary. Am I just using this …

Member Avatar for vegaseat
0
204
Member Avatar for furblender

Hi, I have a minor website that I wish to maintain that I do for gratis (for free). It is for a school. I wish to be able to automate the task of adding links and photos and text body. I already use a css template to maintain the look …

Member Avatar for leegeorg07
0
128
Member Avatar for gmilby

How can I hand off variables from web form to python, process then post back to a response page? PHP Form Code: <form method="post" action="test.php"> Mobile <input type="text" name="mobile"/> <input type="submit" value="Submit"/> </form> and test.php (that the form was posted to) $mobile=$_POST["mobile"]; **pass to python to process, write to db, …

Member Avatar for gmilby
0
142
Member Avatar for bolter

I'm not a python programmer, I'm mostly a hobbist that lately is developing a project in php/Mysql. Now I find myself in need of sending two python variables to one mysql table. I found the wonderful MySQLdb module but unfortunately only supports 2.3-2.5, while to run this specific python script …

Member Avatar for jice
0
98
Member Avatar for cherrypy

Hello, I am new to the IIs server6.0,I don't the process of configuring python files in IIS server6.0.I want to run my python file using IIs server6.0.How can i do this one. Please help me in this issue.

0
42
Member Avatar for csgirlie

I'm trying to store or arrange three sets of two-dimensional data into three 2xN matrices that are stored as NumPy arrays. [CODE] 1. import os # for file handling functions 2. import numpy as np # for array/matrix processing 3. import matplotlib.pyplot as plt # for general plotting 4. from …

Member Avatar for woooee
0
317
Member Avatar for gianniszaf

Hi there, I am running a program in order to generate some reports. The program starts connects to the database takes the first customer and then calls a method in order to create a report for this customer. When it completes takes the second customer generates the report etc etc. …

Member Avatar for woooee
0
239

The End.