15,175 Topics
| |
Hi, I found a code that displays multiple images but you have to supply its filename first before it can access it. Is there a way to display an image as soon as it is captured by the camera? The GUI that I am creating is going to be interfaced … | |
Okay so I'm trying to do this programming assignment and my random function isn't working. It's exactly the same as in my other assignments, but it's not working, and I've spent hours searching it. Can someone help me? [code=syntax]import random repeat = 0 while repeat != "no": random = input("How … | |
[INDENT]Hey All, This is my first post, so I'll do my best... I'm writing a Python app (using wxPython for the GUI) to copy large amounts of files. Each file is about 8-15 MB and there could be as many as 150,000 files. I'm currently using shutil (either [icode].copy(), .copy2() … | |
This is program i made (basic mash); I want to make it so that the program will ask if you want to repeat it again. "n" = exit. and anything else makes it repeat.....can someone help me? I'm not sure how to do it ... [code=syntax] x = 0 import … | |
I have some strings like '/home/dir/file1/file2' , '/export/home/file1' '/home/dir1/dir2/folder1/file' I want to only to print the values that come after first two occurences of '/' like for first string '/home/dir/file1/file2' I want to print 'dir/file1/file2' How to do this Thanks | |
Hi, I'm trying to print two arrays to a file, these are pretty large. However I want to print them as two lists. This is an example of what my output is now: [ 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. … | |
Hi I'm new in this community. I am working on a GUI using wxPython and I would like to embed an Image-to-Video converter in my program by pressing a button. Is this possible? If yes, can someone please send me a code? I will really appreciate it. Thank you so … | |
i want to print string(given as input) as number(o/p) and i did it in c using switch case .i want to do the same in python... wat if python provides switch case??n do we have equivalent of it in python?? Examle: input:three hundred and fifty(string) output:350(number) | |
Hi I want to print something like this to the standard o/p I am currently doing sys.stdout.writelines("%s %10s %10s\n" %(Folders['Table']['Table'][i]['name'],Folders['table']['table'][i]['data']['Place'],Folders['table']['table'][i]['data']['Age'])) but is not very well formatted how do I maintain column structure here ====================================================== Name Place Age ====================================================== John US 11 Mary UK 12 Mike US 14 How to do … | |
I am trying to spilt a message in two, if the number of characters is greater that 600, so that each message has no more than 600 characters. How can i do this i know how to get the message length [CODE] Message = "sdkfhdslkfhdskfhsdlfjsdlk" print len(Message) [/CODE] but i … | |
Hi all! I can not find my way around disabling widgets in pygtk. Is there one way for all type of widgets to disable them? By disabling I mean not being able to edit an entry and it is "grayed out", or the same for a checkbox, combobox and so … | |
As the title says, I need help on how to generate random numbers. Like say, if the program asks the user "How many random numbers do you want?" and the user enters "4" It would generate 4 random numbers. How do I do that? the programs outputs random numbers on … | |
I am programming a folder synchronizer for my first python project. (I want to get it finished before school starts in about 2 months. heh heh) Anyway, up till now my synchronizer will only copy file from one folder to another. I want it to be able to copy entire … | |
As of this moment I have been switching back and forth between various iterations of my first foray into Python programming software, in any case part of my assignment calls for finding the count of even and odd numbers in a set of values that the user inputs, here is … | |
This is a assignment I have to do for school. The program is about attack and defend. This is how it suppose to look like when it outputs: [url]http://i43.tinypic.com/bew6q.jpg[/url] Mine is basically done accept the part where it says "Your Health is:" the health is suppose to be "health = … | |
Hi, I am having trouble installing python 2.5/2.6 correctly on my linux box. I am trying to install in my home directory as I do not have root access. The poor python documentation in this regard makes it impossible to get this right. I want to install python in $HOME/local/lib … | |
Starting on basic functions for python, and this is a assignment that I have to do... but I keep getting a Error.. but I tried, and still don't understand what is wrong. here is what it's suppose to output:[url]http://i39.tinypic.com/r1mv69.jpg[/url] This is what I've done: [code=syntax]def function1(french): print "Bonjour, comment allez-vous … | |
Is possible play waw, wma, mp3 with wxPython without oppening any window? Program will be based on Tk, only playing sounds on wx. | |
I would like to be able to display or print a count of the number of names that were inputted and display this when the user gets out of the loop by pressing any key other than "y". For example: Number of patients processed : 4 How could I create … | |
How do I put in default values in my def textbox code attached - | |
Hello everyone,i really need help with this big problem(to me its big).The project am writing requires a panel to display its current status information on.I figured that i will need to make that panel scrollable because it will contain multiple lines of the text.My problem is i do not know … | |
Is there an easy way of doing this? for example my list is: [code=python] nlat=10 mylist = [] for x in range(0,nlat): for y in range(0,nlat): disk=sphere(pos=(x*s,y*s), radius = r, color=(0,1,9)) mylist.append(disk) [/code] or is it impossible to place objects, such as a sphere from vpython into a numpy array?, … | |
Hello all, I have a very rookie question to ask. I am using Pyraf, Python, Sextractor, & a sextractor wrapper to do some automatic photometry on celestial images. The following code I have written is used to extract info from a sextractor catalog such as image positions, image magnitudes, etc: … | |
Hello, I was assigned the task of coding this program in python for homework and I recently ran into a problem. Basically the assignment asks that a program prompt the user for a series of numbers and will then output the smallest number, the largest (their respective locations) and finally … | |
| i have this code: [ICODE]import webbrowser, random import os import os.path running = 1 DIR="C:/Documents and Settings/Owner/My Documents/georges poopy/main music/" music = filter(lambda x: x.lower().endswith("mp3"),os.listdir(DIR)) music = list(music) choice = int(raw_input("Press 1 to play a new song")) while running == 1: if choice == 1: song = random.choice(music) webbrowser.open(os.path.join(DIR,song)) choice … |
Hi, I'm in first year computer science and could use some help on a program where I have to calculate the standard deviation from data on a txt file. Using some online help I've gotten somewhere but to be honest don't really know what's going on myself. The program is … | |
We have a Visual Basic script that communicates with an application through com. We like to translate it to Python and use win32com.client instead. We have everything working, except for the use of "Nothing" in the VB script for a couple of its function calls. What is the replacement of … | |
I am looking for a good example of the tarfile module, writing to and reading from an archive. Particularly the highly compressed filename.tar.bz2 format. | |
So this should be a really easy one, but i've spent a few hours searching and can't find anything that explicitly states how to do this. All i want to do is see the column names for a particular table. I created the tables like: [CODE=python] con = sqlite3.connect( ":memory:" … | |
Python 2.6.1: How would I write a user input validation statement scores < 0 or scores > 100 print error message and ask for input again? Where would I place it, in the below code? [CODE] num_test = raw_input("How many test would you like to average? ") scores = [] … |
The End.