15,181 Topics

Member Avatar for
Member Avatar for Seagull One

In the python script for my robot, I'm searching for a way to detect a variable change. After doing a search, I found this example in VB.NET. [URL="http://www.daniweb.com/forums/post610941.html#post610941"]http://www.daniweb.com/forums/post610941.html#post610941[/URL] I've tried to translate it into a python bit, but with no success. What I want my robot to do is this: …

Member Avatar for jrcagle
0
100
Member Avatar for ChrisP_Buffalo

I want to iterate through the rows in two csv files and test values. For every row in file 1 that has the same value in Cell A as a row in file 2, I want to check to see if the file 2 value in Cell C is larger. …

Member Avatar for ChrisP_Buffalo
0
121
Member Avatar for Novasie

Hello! Ive been working on a little python program on a newbie course in python and ive come this far that ive created a program that reads from a file and counts the lines of the file (each line a players name with some stats). Then it asks for how …

Member Avatar for jrcagle
0
105
Member Avatar for Mackjan

My first function returns (a, b). The second function must control it if (a, b) are True or False. If it is False call again the first function until the user put in right numbers. It dose not work. Is it a good idea to do that in this way …

Member Avatar for Mackjan
0
89
Member Avatar for frijole

I have just modified a script that notifies you when you have a new gmail message. Right now it just print out "you have a new gmail message" But, I would like to use some sort of graphics or something. I have zero experience with this though. Any ideas where …

Member Avatar for frijole
0
180
Member Avatar for FreezeBlink

At various points in my text-based programs, I've had to write a function for use in multiple-choice menus. It needs to have the following qualities: [list][*]Ignores non-number input, repeating the request if it is given a string. [*]Can be given upper and lower limits on the acceptable numbers, repeating the …

Member Avatar for rikxik
0
85
Member Avatar for FreezeBlink

This is probably totally absurd, but...is it possible to, through Python, access the command line and use it? For instance, write a program that outputted all of the files in a given directory, much like cd [directory] dir would?

Member Avatar for rikxik
0
188
Member Avatar for nclouse

I am working on a TCP socket server for a client and i am having a problem. Everything works except for one thing: i can't figure out how to have the server tell the client that the server is going down. I have the SocketServer running as a windows service. …

Member Avatar for ich1
0
198
Member Avatar for frijole

I have a script that I would like to repeatedly run every 30 seconds, does anyone know how to do this? Also, a side question. Is it possible to have the output form the previous run replaced by the new output? Instead of it all stacking up every time the …

Member Avatar for frijole
0
1K
Member Avatar for frijole

I hava s script that runs continuously and checks my mail but I would like to add some way to kill the script. With a control+something, is there any way to do that?

Member Avatar for Freaky_Chris
0
101
Member Avatar for JCsniper

I need to integrate this script to the web how i can do that? help me please! import sys import gammu import os import copy, re import commands message = "" number = "" message = raw_input("Write a message") number = raw_input("Enter the number to send d sms") gam = …

0
44
Member Avatar for LanierWexford

I was looking at the code snippets, specifically "Petals around the Rose” and I wanted to see how it runs, so I copy, pasted and saved the file in my text editor as Petals and now I am trying to figure out how to run the code. As always I …

Member Avatar for Freaky_Chris
0
81
Member Avatar for ivy47469

Hi everyone, I am new to Python, I am stuck with this problem. "If your initially deposit $10000 into the account, and earns 6% interest per year, to meet your monthly expense, at the beginning each month you withdraw $500, how long the account will be depleted? if you withdraw …

Member Avatar for kdoiron
0
121
Member Avatar for Tyrfing

Hello, I have a program that generates several 1-dimensional arrays that I would like to conduct data analysis on. I was wondering if there was some sort of python tool (or module, or anything) that could write these arrays to a column of a spreadsheet ( in OpenOffice formatting). Is …

Member Avatar for kdoiron
0
164
Member Avatar for athirar

While executing programs with large lists ,i am encountering an error message: Index error:List index out of range The program works well with small lists..Can anyone suggest me some efficient methods to handle this problem?or Is there any other efficient datastructure other than lists and dictionary to serve the purpose …

Member Avatar for kdoiron
0
115
Member Avatar for nuaris

Lists have the append() function to add an item to the end of the list. Is there a similar function to add to the end of dictionaries? Update() doesn't seem to work. Example: >>> a = {'a':'a'} >>> b = {'b':'b'} >>> c = {'c':'c'} >>> a {'a': 'a'} >>> …

Member Avatar for nuaris
0
746
Member Avatar for axn

i can write to the file with no issues, but cant read. i have defined the file to append so as not to overwrite data. then i write to it [B]log_file.writelines(lines)[/B] but the reading wont work?? [B]log_file.readlines(lines)[/B] and thought i could just use log_file = open('%s' % os.path.join(logfile_path, file), 'a+r')

Member Avatar for bvdet
0
101
Member Avatar for swaroopk85

Hi all, I am connecting to https site using proxy and certificates.I am getting the error as httplib.BadStatusLine: None.Can anyone help me how can we fix this issue???what is the reason for this error?? Thanks & Regards, Lalitha.K

-1
43
Member Avatar for ymf

Hi, I am writing a cgi script for a web database query "results" page and I need to display the results in an html table. My question: 'Is there a way to print out a list of words without the commas and the square brackets?' e.g if this is the …

Member Avatar for Freaky_Chris
0
99
Member Avatar for Shank89

Hey guys, I am creating a new mini battle tanks game in python. Not gui based as of now. What it does so far is show a tank moving around a grid size of -10 to 10 Currently i have set it up as this far, just defined the coordinates …

Member Avatar for Shank89
0
133
Member Avatar for tondeuse34

Hey guys, i got another question. say if you want to only write a few lines of code that can be called on at any time the while the script is running, i'm assuming its the pickle function or something similar to batch like the goto function? Thanks

Member Avatar for tondeuse34
0
127
Member Avatar for Mackjan

Hi I have got the TypeError. I use lists at the same way in my other programs it works excellent, but just in this program I have got problem don’t know how to solve it? [COLOR="Red"]Traceback (most recent call last): File "E:\extra_b.py", line 42, in <module> ordna(pile) File "E:\extra_b.py", line …

Member Avatar for woooee
0
149
Member Avatar for jascase901

i recently started python and i wanna learn how to implement modules in my program, but when ever i try to string modules together it says function not callable how do u make functions callable and if u cant then how would u put this code 'readTextfile.py--reads and displays text …

Member Avatar for woooee
0
90
Member Avatar for alivip

How can I get every Token (word) and PreviousToken(Previous word) From text file For example if the text file content is "Every man has a price. Every woman has a price." First Token(word) is "Every" PreviousToken(Previous word) is none(no previos) Second Token(word) is "man" PreviousToken(Previous word) is "Every" Third Token(word) …

Member Avatar for Freaky_Chris
0
242
Member Avatar for MikeyFTW

Ok heres the deal i need to make this program that will allow users to practice their addition and subtraction for whole numbers between 1 and 100, 1 and 200 and 1 and 500 (the levels of difficulty). The user will be allowed to choose which operation to have questions …

Member Avatar for kdoiron
0
119
Member Avatar for bosko

Hi! I have a class: [CODE=python]class A(object): calledMethod = None def a1(self): pass def a2(self): pass[/CODE] Now when I create an object and call some method: [CODE=python]a = A() a.a1() #or a.a2()[/CODE] I need somehow to save the name of called method in variable calledMethod. Could this be done with …

Member Avatar for bosko
0
99
Member Avatar for sarabhjeet

HI all, whenever we open any python/wxpython program there is one more window other than our application is running which is command line window that black window for showing any error or any output through print statement.So i want to remove that window from my wxpython's application,how to do this?please …

Member Avatar for sarabhjeet
0
136
Member Avatar for Capt.Micro

Hi everyone, I have looked through the ctypes documentation, but can't find anything about making the mouse click, I mean, I can get it to move, but not click. Thanks in advance.

0
60
Member Avatar for Tigairius

Well, I need a pretty simple code (Lempel-Ziv-Welch compression algorithm) converted from Python to Java. I don't want to run JPython because I don't need it to be interpreted as Java, I need to interpret it myself because I use a scripting language similar to Java, but not exactly the …

0
48
Member Avatar for Smythville

G'day all, I am just starting to teach myself python and in the program below I am reading in a CSV file and moving files from one directory to another. I would like to be able to ensure that the user enters a Y or an N only, if they …

Member Avatar for Freaky_Chris
0
88

The End.