15,190 Topics
![]() | |
I'm trying to figure out how to input metadata into a tiff file, and my general web searches are just confusing me. Is there anyone that can point me in the right direction? I'm essentially trying to pull data from an excel file and use that as the metadata for … | |
Hey all, I'm new at programming with Python and thru reading different documentation, I built a small program (handler), that I want to accept calls from other scripts to log to file and console, depending on the level passed in. I'm able to get the error message to show up … | |
Hi all, hope you are well. Just a quick one here that you pythons will be able to answer in no time (I am new with python). What I am trying to do is read a text file and print only the first and last line of that file. Any … | |
Hi all, Im new to python and I need some help. I have tried to get this piece of code to work for quite some time now. I finally made it work by using two while-loops. [INDENT][B]THE PROBLEM[/B][/INDENT] What I really wanted to do at the first place was to … | |
I'm trying to automate a series of find/replace actions. I have an input file containing a large list of stemmed verb forms like this: apolog apologis becam apologis apologis apologis apologis becom becom aris arisen arisen I want to change every "apologis" to "apolog", every "arisen" to "aris" and so … | |
Hi there, This is a part of a project that i am doing.... the thing is that i want to link MS Excel with internet explorer in a manner such that whenever any page on the explorer opens it highlights the words that are present in the excel sheet.. I … | |
Hi, I have written a the following python code to analyse a function or a method. I am having a script which is having a python function (add) and a class (MyClass) with a method (multiply).When I analyse it using the following method(analyze_func) , I get an output like below. … | |
could anyone please tell me if pyTTS module is available in python version 1.4.0 3rd edition | |
Ok, I have been given this problem to code a solution with python Problem Definition The N.S.W. Bird Watching Library sends a reminder notice to its borrowers when it is found that a borrower has failed to return a book by the due date. It is possible that a borrower … | |
Im writing a game of scissors paper rock and have come up with this so far, but i cant get it to work. any idea's where ive gone wrong. print \ ''' a - Rock b - Paper c - Scissors ''' choice1 = raw_input("Choice: ") print if choice1 == … | |
I have been looking for a good plugin system for a while. I've found a few but they don't exactly match my needs. I wouldn't want to go ahead and reinvent the wheel (I'm sure someone has already done what I need). What I'm looking for: Plugin system that lets … | |
hello I've this python code: [CODE=python]import wx class MyFrame(wx.Frame): def __init__(self, parent=None, id=-1, title=None): wx.Frame.__init__(self, parent, id, title) self.panel_1 = wx.Panel(self, -1) self.panel_1.Bind(wx.EVT_PAINT, self.on_paint) self.image = wx.Image('foto.jpg') # Menu Bar self.frame_1_menubar = wx.MenuBar() self.File = wx.Menu() self.Test = wx.MenuItem(self.File, wx.NewId(), "Test", "", wx.ITEM_NORMAL) self.File.AppendItem(self.Test) self.frame_1_menubar.Append(self.File, "File") self.SetMenuBar(self.frame_1_menubar) # Menu Bar … | |
hi I am a beginner python user studying python is fun and i have learned many thing now a days I am working on a program to find prime numbers and non prime number in a list generated by range function. i am done with my work the problem is … | |
I want to create a method in Python that will read all of the text on a webpage and put it into a text file. Eventually I will have it distinguish between hyperlinks by having it exclude lines in the text containing href="....." Any help would be greatly appreciated. | |
Hi everyone, I'm new to daniweb and seems cool there are alot of nice helpful people on here. With my dad we are trying to script a simple poker game on python(and tkinter). There are 4 players ( 1 real and 3 artificiel intelligence players), each AI should be able … | |
Hi I try to copy a list to another list but it dosent work[code] def kopi(x,y): i=0 for i in range (1,len(x)-1): x[i]= y[i-1] i+=1 print y [/code] I dont know what is the problem with my code. thanks alot for your help. | |
Hey. I'm working on a simple project that requires a way to find all the empty grid cells accessible along a path that's <= n cells long (an analogy would be TBS movement), and I've got an [i]almost[/i]-working piece of code for it. Here's the function I wrote: [code=Python]def findArea(distance,origin,gridUsed,emptyChar): … | |
Hi to all, after two months I decided to give Python one more chance. Here is a little code snippet about counting number of words in text file. (Under word I assume any combination of letters and numbers delimited by standard separators " .,\n\t" [code] file = open ( "Test.txt", … | |
Hi guys, I have a simple question. I'm trying to import my modules from a different folder (the different folder is in the same place as the the program I'm importing from), but I don't know how. I've looked on Google, but I've had no luck so far. My question … | |
I'm new to Python and I'm working on a craps game. I got the basic code down, but I need to simulate a total of 200 games and track the number of wins. I need a counter in my program, but I can't figure out how to do this. Here's … | |
I'm currently creating a text based adventure game using python. One of the features in the game is that when you enter a room an enemy attacks you and takes off some of your health. I have an If loop to control if there is an item that you need … | |
hello, i'm a newbie programmer (and to python, double trouble :) and running into issues reading and writing files. i'm successfully running the code below to manipulate and remove the first few lines of a text file. The text file (file1.txt) is approx. 329kb but when i run the code … | |
I'm a linguist (Python newbie) trying to use Python to help me with some simple NLP processing. I have extracted verb + preposition + VBG triples from the British National Corpus, so I have large csv files containing stuff like this: plan,on,selling criticised,for,getting opened,after,receiving were,in,identifying visited,before,returning recruited,from,including attended,by,including given,by,joining ... … | |
Hi all I am brand new to python so if anyone could help that would be great. The trouble I have is that I am trying to call two other programs from within a parent program, and pass arguements to these children programs. Here is my code so far, but … | |
Enter initial capital: 2000 Enter percentage: 6.6 Enter number of years: 4 After Year 1 you’ll have 2132.0 dollars After Year 2 you’ll have 2272.71 dollars After Year 3 you’ll have 2422.71 dollars After Year 4 you’ll have 2582.61 dollars In 4 years, a total interest of 582.61 dollars is … | |
I don't know where to put quit.png. This result in errors. Is it put on SPE folder or somewhere in python? or Just in same directory as saved file? I appreciate your help! Steve Code import wx class MyFrame(wx.Frame): def __init__(self,parent,id,title): wx.Frame.__init__(self,parent,id,title,size=(700,600)) toolbar=self.CreateToolBar() toolbar.AddLabelTool(wx.ID_EXIT,'',wx.Bitmap('..\icons\quit.png')) app=wx.App() MyFrame(None, -1, 'Simple Toolbar') app.MainLoop() | |
Hi, I am new to phyton and now I have some problems in terminating my while loop. This loop runs infinitely, I tried to print both count and N and yes, the value of count does go way beyond N but the loop is never terminated. I am guessing this … | |
2. List Processing (10 Points) Write a program that asks the user to enter a list with an even numberof integers. The program then has to construct a new list by adding pairs of integers in the list. Hereis an example of a program run, where the user enters the … | |
Hi All, Is it possible to flush the buffer of "popen2.Popen3(cmd)"after some time interval? I am starting a server forever using the popen2 module. After some time the buffer gets full & it stops logging messages. As a workaround to this, I am redirecting the output of 'cmd' to a … | |
I recently bought a book on Python, and I'm working my way through it. However, I've come to a very simple program, but I can't understand a certain part of the code. Can someone explain? [QUOTE]# Print out a date, given year, month, and day as numbers months = [ … |
The End.