15,190 Topics
![]() | |
Hey guys again, but i got another question. With this code here: [CODE]if choice == 'help' or '/help': print "Test"[/CODE] what if you entered anything else besides '/help' or 'help' and you have defined other things in the code you want to go to from input? any ideas/suggestions, Thanks | |
This might be a dumb question. I don't know. I'm new to all this. How do you find icons for your programs? All GUI applications have cool icons that represent various things. For instance, to save is often represented as a disk, etc. You know, the small little picture references … | |
I would like to create a grid with Boa, but I dont know where to set the number of rows and columns. | |
I use this software called "LSmaker" but it has some glitches but I don't know python and that is what it is programmed in. The quirks that I found are; 1. When you export the animated file the same and another file in the folder lsmaker corrupts the file. 2. … | |
Hi guys, i'm new to sockets and find it pretty fun. But i got a question, in my code here: [CODE]import sys, socket import socket, sys dest = ('<broadcast>', 51423) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) s.sendto("Hi", dest) print "Looking for replies; press Ctrl-C to … | |
Hi, I have a cgi script in python that outputs a html table, but i also need to count the number of rows in that specific table. Any ideas on how i can proceed? Thanks in advance, ymf | |
ok, so when i create cube (pyopengl) and apply texture on it, some of the faces are transparent...how to make all faces to be solid? im new in python, and this really frustrates me, can someone help? | |
I want to make Python code to make a new directory then put you into it, same as typing md and cd yourself, but only one command typed. I can use os.chdir() but after Python program exits I return to original directory, not going to new one. How do I … | |
I created a webcrawler that holds a lot of data in a list and then outputs this data to a file. When I try to run 50 instances of this program at the same time using a batch file, the programs suddenly all terminate at once, without outputting the text … | |
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: … | |
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. … | |
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 … | |
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 … | |
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 … | |
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 … | |
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? | |
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. … | |
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 … | |
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? | |
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 = … | |
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 … | |
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 … ![]() | |
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 … ![]() | |
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 … ![]() | |
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'} >>> … | |
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') | |
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 | |
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 … | |
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 … | |
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 |
The End.