15,175 Topics
| |
Hi everyone, I have been fiddling around with a speech recognition program for a while now and i always had something that bothered me. Here is my code i have been using. It is the example code from code.activestate.com [code=python] from win32com.client import constants import win32com.client import pythoncom """Sample code … | |
I am trying to have the user of this script define what html tag they want printed from a document and then print all lines between those tags. e.g. [ICODE] <html> <p>;lasdjf;lsdakjf</p>[/ICODE] if users raw input is <p> I want to print ';lasdjf;lsdakjf' Right now it doesn't print anything but … | |
Hello all, I'll start by saying please bear with me, I am very new to python and I need some help takeing a string with mixed letters and numbers and converting it to a INT. For example [code=python] stringname = '105 mV' [/code] I would like '105 'striped from the … | |
Currently running python 2.6, wxpython 2.8 unicode win32 on the vista platform... When I try to run a sample app in the wx tutorial section the program stops responding as soon as I mouse over it. Heres the code. [CODE=python]import wx """Example with a 2D grid of sizers of sorts … | |
Hello all, greetings! I have been playing with DB, seom time ago and want to resume soon where i got stuck. I want to make MySQLdb to get working with wxpython GUI. I got stuck on how to attach the tuple I got from select command to series to the … | |
Hi , I have a question .. I would like to write/modify the my program ... i.e writing a function to find out which of the directories exists ..... for example : on my computer c:\\sam and in another mechine c:\\xyz ... only one dir should on my computer or … | |
Hello there Sorry in advance if this post is to big, not sure where else to go. I have just started out with python (last 2wks) with no previous Programming background. I have been really excited with the possibility of been able to program with python and to hopefully develop … | |
Greetings: I am chugging thru Boa Help Getting Started Guide for Boa Constructor , Kevin Gill , November 1, 2000 and am at Section: 2.7 Creating a Dialog Window doing everything as specified in Help, Save/Run and click on Help/About , no Dialog comes up. [Frame2.py , App2.py , Dialog2.py] … | |
I'm fairly new to making GUI's in tk so I downloaded activestates GUI builder from sourceforge. It has a very straightforward drag and drop interface and is easy to pick up. However I ran into a problem trying to edit the widgets it creates. It makes 2 files, the first … | |
Planning to Write a script that reads a Fasta-formatted file and writes the number of sequences in it, followed by the accessions of the sequences. For example, if the input is >Pig ACGT >Dog AGTG >Bunny TATA then the output should be 3 Pig Dog Bunny any idea? | |
I ve to Write a Python program that prints a random DNA sequence in Fasta format. That program should ask for the length of the sequence and suggest a reasonable sequence name. The session should look something like: > python randomdna.py Length: 34 >MySequence TGCGCATATTGTCTAACTATGGCTGTGGCCGGA The output must be in … | |
| Probley a really simple one ive got the basis of the Dijkstra’s algorithm [CODE] # findRoute - dijkstra's algorithm. # def findRoute(source, dest): global theGraph theGraph.reset(source) while theGraph.get () != []: u = theGraph.getBestChoice(source) theGraph.addVisited(u) if u == dest: return True for v in theGraph.getNode(u).getNeighbours(): theGraph.addChoice(v) alt = theGraph.getNode(u).getDistanceFrom(source) + … |
Hi all, im a beginner, and i need to have fields in a website , soh that users can write on them.. and then i need to get these values and process them in an python program... im lost.. no ideia where to start... anyone can give me a tip? … | |
Hi. I just joined this forum because I really need some quick advice on a Blackjack game I'm working on. It's my first major endeavor, and I can't quite get it to work right. Here's the code. #blackjack.py from cards import * from graphics import * import random DIM = … | |
Can any one help me in reading matlab file "test.m" file using python script | |
ok, so I have to write a program for computer science and I chose to do it in python (obviously) butI'm having trouble getting the program to open the file. here is just a snippet of the coding in question: [I]elif choice == 5: h = open("C:/Users/Dhyan/Documents/" + raw_input("Please enter … | |
Hi, I have 2 things I'd like help with: 1) is there a way to find the exact center of my screen? 2) a loop Here's what I need the loop for: [code] image = ImageGrab.grab((0,0,800,800)) box = (100,100,400,400) im = image.crop(box) im1 = im.save("screen.jpg") # at this point I … | |
>>> line = '2008-10-27 12:05:54........... >>> time = line.split(' ')[1].split('.')[0] >>> print time 12:05:54 i would like to add 45 or so minutes to the time i am parsing from a line i have tried print time.timedelta(minutes=45) Traceback (most recent call last): File "<pyshell#44>", line 1, in <module> print time.timedelta(minutes=45) … | |
Hi guys, I have written this program so far which reads and sorts numbers from a file...WITHOUT the sort function. It sorts from largest to smallest right now. [U][B]My Question:[/B][/U] [B]How do I make my program list the numbers from smallest to largest instead?[/B] [B]File contains the following:[/B] 2 1 … | |
Hi All' How can I embed images (.png, .gif, etc) into a single py file and call them in program I saw them in wxpy demo but how exactly to embedd them?? Appreciation, Steve | |
Hi I ahd one difficulty in plotting series charts using python ..I had so many sheets and need to generate charts , by running the script using python in excel can any body help me attached is my test file | |
Hi All, I am using the following code to populate a tree control. The dictionary currently I am using is ‘dictFolders’ and its structure is defined below. lstFolders=[] lstFolders = ["A","B","C","D"] dictFolders={} dictFolders = {"A":["Obj1","Obj2","Obj3","Obj4","Obj5","Obj6","Obj7","Obj8","Obj9"], "B":["Doc1","Doc2","Doc3","Doc4","Doc5","Doc6","Doc7","Doc8","Doc9"], "C":["Link1","Link2","Link3","Link4","Link5","Link6"], "D":["Obj1","Obj2","Obj3","Obj4","Obj5","Obj6","Obj7"]} # Setting the root node text to the Action ID entered self.treeAction.SetItemText(self.treeAction.GetRootItem(),”Parent … | |
Hi everyone, I'm new to programming and am building a very basic rss reader for my first major project with python and GUI. As it is, I have it set up so that if I input an exact rss feed address (ex [url]http://news.google.com/?output=rss[/url]) I can retrieve stories. Id like to … | |
Hi folks, I'm learning python this year, and I need a bit of help on an assignment. My program is supposed to be able to read from a file, which contains student numbers and their scores and it is supposed to compute their individual averages and the class average and … | |
I need help to get started with this. Any one that knows any examples I can get inspire from? :) Im going to create a game that plays Memory. The user should try to solve a 6x6 matrix by matching words in different cells in a matrix.It should look like … | |
I am currently embedding python in a C++ module. I have a problem in that one of the functions I am trying to build must be capable of accepting various structures for processing specific commands. The function should be declared in C++ as follows [code] void Write(char *cmd, void* mystruct, … | |
Hi all, I'm required to implement a method for a "[B]TernarySearchTree[/B]" object/class. Basically, a Ternary search tree is just like a binary tree except it has three children instead of two. Ternary Search Tree could only manipulate it's root. Now the method should create and return an alphabetically sorted list … | |
Okay heres my code... [ICODE] for swipeload in range (0, 15, 1): "E"+str(swipeload)+"_Path" = os.path.join("data","E"+str(swipeload)+".gif") "E"+str(swipeload) = pygame.image.load("E"+str(swipeload)+"_Path") [/ICODE] So basically I have a bunch of images called "E1, E2, E3, E4, etc..." and I want to load them all into the cache without having to type the code for … | |
hi, everyone, i am working on writing a program that can calculate the extrema of a polynomial function. i've got everything i need except the last step of the process. i need to be able to solve a polynomial equation for f(x)=0. please help. | |
Hi all im making a text game but first im making a test one and i was writing it and i came across this error: Traceback (most recent call last): File "/home/tom/Desktop/Python/Text game/main.py", line 98, in <module> main() File "/home/tom/Desktop/Python/Text game/main.py", line 93, in main print 'his attributes are:' + … |
The End.