15,190 Topics
![]() | |
Hello all, How are you? Hope well. Just a quick question. I have a file which contains abstracts (small texts) and i am looking for certain keywords and their frequency. These keywords are provided from another file. I was thinking to read the keyword file first and the perform a … | |
Hello all Just joined the site - mainly due to the fact that 7/10 times I Google a problem this site comes up :) Not looking for an easy ride, but can someone point me in the direction of a site/tutorial that shows how to run a loop periodically? What … | |
[CODE]totalRows = int(raw_input ("Please enter a number: ")) for currentRow in range(1, totalRows+1): for currentCol in range (1, currentRow+1): print '*', print print for currentRow in range (1, totalRows+1): for currentCol in range(1, currentRow+1): print '*', print[/CODE] Output * * * * * * * * * * * * … | |
I am trying to use an event box with a label inside to create a custom button. I found an example online to create a button using an event box but when I tried to load the event box button into a VBox I ran into errors. Does anyone see … | |
ITunes Library Persistent ID Editor. Sample usage: [CODE]fxml = 'iTunes Music Library.xml' # path to xml file fitl = 'iTunes Library.itl' # path to itl file itk = ITunesLibKeys(fxml, fitl) print itk.file_xml # prints path to xml file print itk.file_itl # prints path to itl file print itk.xml_key # prints … | |
Hey, I've been not so active for the past months, but that's because I was working on a litle project called Deditor. It's a text-editor for linux. The thing that makes it special is that it is made for python and thus has some python-specific features like, syntax-highlighting, interactive interpreter, … | |
i did go thru a google search and found some functions .. but those results where horrifying , i guess i am using a wrong method of finding time . [code] def test(): "Stupid test function" L = [] for i in range(100): L.append(i) if __name__=='__main__': from timeit import Timer … | |
I have a forked child process running which executes a system command killing the child using os.kill(child_pid, SIGKILL) stops the child process but the system process continues ! Can something be done to stop the system process also? A part of the code is something like this: #Child child_pid = … | |
hi, i have this problem with wx.toolbook : this is the first page class : class newPanel(wx.Panel): def __init__(self, Parent): wx.Panel.__init__(self,Parent,id = -1) self.SetBackgroundColour('yellow') frame = wx.Frame(None,size=(400,400),pos=(500,300)) toolbook = wx.Toolbook(frame,-1, style=wx.BK_LEFT) il = wx.ImageList(32, 32) bmp = wx.Image(r'c:\python26\img.png',wx.BITMAP_TYPE_PNG).ConvertToBitmap() index = il.Add(bmp) toolbook.AssignImageList(il) toolbook.AddPage(newPanel(toolbook), 'xxxx', index) ------------------------ the 'img.png' is 32 … | |
I am looking for some ways to have my Python code access a video stream on ustream and have the program create a user account by entering a username, password, and email address, and then have it then send a message to be entered into the chat. Does anyone know … | |
Hi, I am a beginner in Python. I have created 1 script in notepad++ and trying to execute the script from command line but it's giving an error. I have set the PATH of Python in the environment variables also. Can anyone send me the complete steps for executing the … | |
Hi.. I've been trying to get this to work for hours now but I'm not understanding what to do. Basically I'm creating a quiz on python with 5 questions. I have a function that is only for the quiz. Another function is to display the highest quiz score. I want … | |
I am having a problem with the data I have collected. When I write the data to a file it is shown like this. (231.2314,32434.344,134.2342,345.345,1234.45) (2323.567,32.6754,12323.8776,12323.575,233.5673) now when I read data and put it in a list it looks like this. data = ['(231.2314,32434.344,134.2342,345.345,1234.45) \n','(2323.567,32.6754,12323.8776,12323.575,233.5673)\n'] is there any way i … | |
I am new in Python. I wrote a program that reads-in large text files using xreadlines, stores some values in lists (and arrays) and does some calculations. It runs fine for individual files, but when I try to consecutively process files from a folder, I get a memory error. my … | |
[CODE]import pygame from pygame.locals import * from sys import exit from random import randint pygame.init() screen = pygame.display.set_mode((640, 480), 0, 32) while True: for event in pygame.event.get(): if event.type == QUIT: exit() rand_col = (randint(0, 255), randint(0, 255), randint(0, 255)) for _ in xrange(100): rand_pos = (randint(0, 630), randint(0, 479)) … | |
How do I get a recursive function to return a value other than None? For example: [CODE]def function(depth): if depth > 0: function(depth - 1) else: return 10 function(5)[/CODE] returns None, and not 10. | |
Hi. So, I'm coding this GUI into a sort of quiz. I'm not sure how to explain what I plan to do so I will write it out in a pseudo code. I know this isn't the most efficient way at all to do this, but I'm just focused on … | |
Hey guys, I really appreciate your help so far! :) This one is a tough beast... I don't even know how to approach it. Let me give you a summary version and a detailed version. Summary version: There are all sorts of these XML files scattered within a bunch of … | |
I found one interesting site while I was fooling around ... I mean Googling around: [url]http://python-history.blogspot.com/[/url] Maybe you would like to check it out. One of the guys blogging is quite famous in these circles: Guido van Rossum. | |
Hi i'm stuck on this script that i'm busy writing and have no idea where to start. I need a script that connects to a secure ftp, downloads files and store it on my local pc. has anyone done something similar and which modules should i be looking at. | |
Hi, I have a file that has about 65000 lines and three columns. I need to read in the first 2 columns until line 112960. I then need to write the 12960 lines of 2 columns to a file. This needs to be repeated for about 600 files... I then … | |
hi I can change dictionary values but I can't figure out to change the keys.. here is the scenario I want.. A dictionary is coming like this {'fstn':'Tim','lstn':'Parker','mdl':'W','dob':'19801201'} now I need to change to {'FIRST_NAME':'Tim','LAST_NAME':'Parker','MIDDLE_NAME':'W', 'BIRTH_DATE':'19801201'} please help me to change the keys.. | |
Hi I'm very new to Python Language, I'm getting this error "AttributeError: 'str' object has no attribute 'internalSplit'" and don't understand why. please check the following code.. [CODE] sourceAction = str(sourceAction); identityInfoDict = dict(identityInfo); for key in identityInfoDict.keys(): if(key.find("GENESYS_DATA") >= 0): intDict = self.internalSplit(key,identityInfoDict)[/CODE] and the internalSplit is a function … | |
![]() | Evening all. I have decided to try my hand at programming in python. I have tried some of the tutorials on the web but none of them really hold my interest for long. I am looking for a tutorial that covers all the basics and goes quite indepth. All the … |
I'm new to Python and I'm having a problem I can't explain. While running: [CODE] >>> open('word.txt') [/CODE] it returns: No such file or directory: 'words.txt', even if I have both files saved in the same place. I've tried entering the entire file location, but still no luck. Any help … | |
When I try to run a C program that calls a Python function, I am getting this error: [QUOTE]ImportError: /usr/local/depot/python-2.5.1/lib/python2.5/lib-dynload/math.so: undefined symbol: PyExc_OverflowError[/QUOTE] Please help me resolve this. | |
Hello, I just finished my "Who wants to be a millionaire Game", (very basic coding), but I got some issues when I click somewhere out of the Boxes range(try it), and I'd like to add some sort of points to each question, and as they go further make the question … | |
When I run my code the program adds the following before the start of my program: >>> Warning (from warnings module): File "C:/Users/Steven/Documents/CA/CA python/CAMain.py", line 142 def maxgen(fname, worksheet=1,encoding='cp1251'): SyntaxWarning: import * only allowed at module level >>> [I]The first prompt of my program would be here[/I] The code it … | |
Is is possible to check if the execution of a java program from python gives any error during runtime and compile time ? Any help or sample code will be of real help.. Thanks in advance | |
Hii I am have suffering few problems in doing following assignment , please help me... Qtprogram using python to calculate addition, subtraction. please help me ...i am new python |
The End.