15,185 Topics

Member Avatar for
Member Avatar for Kruptein

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, …

Member Avatar for redyugi
0
100
Member Avatar for rahul8590

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 …

Member Avatar for Beat_Slayer
0
841
Member Avatar for anurag.kyal

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 = …

Member Avatar for jcao219
0
157
Member Avatar for personx1212

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 …

0
55
Member Avatar for ryuurei

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 …

0
71
Member Avatar for deeapk_kapdi

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 …

Member Avatar for TrustyTony
0
9K
Member Avatar for jenzilla

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 …

Member Avatar for Beat_Slayer
0
4K
Member Avatar for ish13

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 …

Member Avatar for TrustyTony
0
189
Member Avatar for fekioh

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 …

Member Avatar for TrustyTony
0
155
Member Avatar for lewashby

[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)) …

Member Avatar for vegaseat
0
258
Member Avatar for teddypwns

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.

Member Avatar for ultimatebuster
0
11K
Member Avatar for jenzilla

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 …

Member Avatar for ultimatebuster
0
2K
Member Avatar for PythonNewbie2

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 …

Member Avatar for Beat_Slayer
0
185
Member Avatar for TrustyTony

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.

Member Avatar for TrustyTony
0
151
Member Avatar for baki100

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.

Member Avatar for baki100
0
105
Member Avatar for newyawk

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 …

Member Avatar for woooee
0
178
Member Avatar for kuchi

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..

Member Avatar for kuchi
0
357
Member Avatar for kuchi

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 …

Member Avatar for kuchi
0
4K
Member Avatar for jtaylor-bye

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 …

Member Avatar for lrh9
0
137
Member Avatar for rhodi

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 …

Member Avatar for vegaseat
0
83
Member Avatar for krishna_sun82

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.

Member Avatar for Gribouillis
0
46
Member Avatar for gonzigg

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 …

Member Avatar for tbone2sk
0
324
Member Avatar for Musing888

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 …

Member Avatar for Musing888
0
1K
Member Avatar for anurag.kyal

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

Member Avatar for Gribouillis
0
83
Member Avatar for pradeeppatil110

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

Member Avatar for -ordi-
0
148
Member Avatar for Archenemie

While doing a project i decided to do a mechanism in a panal of its own class, so i could manage the sizers and layout better, then i wanted to take the end result of that panel and display it in my window. Although when i run this code as …

Member Avatar for vegaseat
0
113
Member Avatar for j3nny

How do I convert the integer -2 to its hex 0xfe??? I tried hex() but it gives me -0x2

Member Avatar for jcao219
0
92
Member Avatar for rahul8590

I have various list being generated by a mapper function in this format >>> mapper("b.txt" , i["b.txt"]) [('thats', 1), ('one', 1), ('small', 1), ('step', 1), ('for', 1), ('a', 1), ('man', 1), ('one', 1), ('giant', 1), ('leap', 1), ('for', 1), ('mankind', 1)] >>> mapper("c.txt" , i["b.txt"]) [('thats', 1), ('one', 1), ('small', …

Member Avatar for ultimatebuster
0
258
Member Avatar for sks57

Hi Friends, I want to parse a header file and auto generate a .cpp file. Can any one please suggest me good link in doing so or provide me a sample python script which will automatically generate a .cpp file. I planning to using VC++ pre-build event to call this …

0
17
Member Avatar for lewashby

I'M learning python and I can write very small simple programs with Tkinter or play sound through pygame. I've just started the book "Beginning Game Development with Python and Pygame". I'M in the earlier part of the book and I've just been given the program below. The thing is, even …

Member Avatar for TrustyTony
0
220

The End.