15,181 Topics

Member Avatar for
Member Avatar for gianniszaf

Hi there, I am totally new in Python. What I am trying to do is the following: I have in a file various email addresses. The file look like [email]manolis@gmail.com[/email] [email]giannis@gmail.com[/email] [email]kostas@yahoo.com[/email] [email]eirini@yahoo.com[/email] [email]ssss@aol.com[/email] [email]wertza@yahoo.gr[/email] [email]xristhanthi@gmail.com[/email] and I want to count how many addresses belong to each provider. Eg. aol.com: …

Member Avatar for ZZucker
0
128
Member Avatar for volcs

I have been scripting with Python for a few years but I just recently decided to start using some OOP to make my life a bit easier. Although I've read many examples and some chapters and websites, some of the most rudimentary basics still elude me. Here is an example …

Member Avatar for katharnakh
0
102
Member Avatar for nish88

hi am writing a program and there a oval moving towards a big blue oval. i want when the red oval arrive at the blue oval is stop.can anyone tell me hoe to do this???? [code=python] from Tkinter import * import Tkinter import time frame=Tkinter.Frame() frame.pack() canvas =Tkinter.Canvas(frame,bg = 'white',width=500, …

Member Avatar for katharnakh
0
108
Member Avatar for pythoxine

I don't know what to do with this xlib error I get from the code below (please paste it into the python console and see it for yourself). I got some advice from some guy, but I am a newbie to wxpython so I don't know how to follow it …

Member Avatar for pythoxine
0
150
Member Avatar for isinc

I have an assignment that I'm working on and am having trouble. Not too familiar with graphics. Any help/guidance would be much appreciated to see if what I have so far is okay and what I should do for the loop part. I will post assignment details and what i …

Member Avatar for isinc
0
408
Member Avatar for sarabhjeet

I have created one application as well as i have created help or documentation file in a .chm format for my application.Whenever i click on help menu this documentation file should open but at a time only one instance of help file should open,how to do this...I think it will …

0
70
Member Avatar for mcenley

Hi friends, I have written the following program to display a specific o/p: [code=Python] def square_root(a): if a>1.0: x=a-1.0 elif a==1.0: return 1.0 else: pass while True: y=(x+a/x)/2 if math.fabs(y-x)<0.0000001: break x=y return x import math i=1.0 while i<=9.0: print i, sqrt=square_root(i) print sqrt, math_sqrt=math.sqrt(i) print math_sqrt, print ''*4, difference=math_sqrt-sqrt …

Member Avatar for mcenley
0
119
Member Avatar for LanierWexford

The function below will take a string(s) and rotate it a given amount(num). i.e cheer rotated by 7(cheer,7) will return jolly, and (melon, -10) will return cubed. This is an attempt at exercise 8.10 from "How to think like a (Python) programmer, and it works just fine. The issue is …

Member Avatar for jrcagle
0
197
Member Avatar for sarabhjeet

Hello all, Actually i need to close a dialog automatically after 5-6 seconds. For it what should i do,please help me.I am using wxTimer self.MB = wx.Dialog(self,-1,"hello",pos=(-1,-1),size=(200,100),style=wx.NO_3D) self.SB = wx.StaticBox(self.MB,"Here description of atelier will come") self.MB.Show(True) self.timer = wx.Timer(5,self.Step(self)) self.timer.Start() def Step: if self.timer.IsRunning(): print "" else: self.MB.Close(True) Is this …

Member Avatar for jrcagle
0
156
Member Avatar for enigmaenigma

I have txt files in russian which i need to read and trim out all the special characters like !,digits, blankspaces and write it into another file in the encoded form. Below is the code i am using for for fname in filelist: if fname.endswith('.txt'): count = 0 path = …

Member Avatar for enigmaenigma
0
97
Member Avatar for a1eio

Hi all, Just wondering if there is a way to see if a window has been destroyed or not. eg: [code] root = Tk() bla ... bla ... if root has been destroyed: do something... [/code] thanks in advance a1eio

Member Avatar for a1eio
0
278
Member Avatar for Zelores

Hi, I just joined today and i need some help with python. I just started using python not to long ago in my intro programming class. We have an assignment coming up and i need some help. How do you get the sum of an integer. ie: you put in …

Member Avatar for Zelores
0
195
Member Avatar for asrekdal

Hi, I am working with a wx.Python ListCtrl attempting to edit data in the second column. Is there a way of detecting which column,row has been clicked? thanks -- andrew

Member Avatar for asrekdal
0
89
Member Avatar for fonz87

I got some programs that i need help with and it would be awesome if someone can help me out with them. I've been lurking around this site and hopefully someone can help me. Thank you I m writing a program that should take number n and output it's sum …

Member Avatar for jrcagle
0
118
Member Avatar for jrcagle

I'm having an opaque moment. +5 brownie points to anyone who can enlighten. The plan is to write a unit-testing module for the wxCanvas widget (good progress there :) ) So I wanted a row of different objects (similar to MS Paint) on buttons; the behavior of the different buttons …

Member Avatar for jrcagle
0
114
Member Avatar for harshaaithal

i am a beginner ,just started using python from 1 week..... without using time.sleep()... i want a handler to call a function whenever timer of 1 sec expires repeatively....

Member Avatar for jrcagle
0
4K
Member Avatar for Leonerd

Hey I'm new to Python and taking a class on it. To get started here is my homework specs [quote]Sequential Letter Search 1.You will design and implement a program that will: i.Accept as input a string of letters that will be looked up in another string. ii.For each of the …

Member Avatar for woooee
0
202
Member Avatar for asrekdal

Hi, working with the 're' module I am having some difficulty figuring out simple RE. here is the code. p = re.complie('amb') m = p.match("mamba") print m.group() according to the following documents ... [url]http://www.amk.ca/python/howto/regex/regex.html#SECTION000300000000000000000[/url] [url]http://gnosis.cx/publish/programming/regular_expressions.html[/url] there should be a pattern match like... 'amb' but I am getting 'None' back. Can …

Member Avatar for asrekdal
0
149
Member Avatar for ccclay

I want to put the date and time into a file. Below is what I have tried. import time import datetime >>> test_time = open('test.time', 'w') >>> test_time.write('today is') >>> test_time.close() >>> test_time = open('test.time', 'a') >>> today = datetime.date.today() >>> print today 2008-03-09 >>> test_time.write(today) Traceback (most recent call …

Member Avatar for ccclay
0
14K
Member Avatar for asrekdal

Hi, I am looking for a Python module that would allow rasterizing of SVG files. I have looked extensively on google with no luck other than a module name I cannot seem to find called rsvg. Has anyone heard of this as a Python module? And if so where? Or …

0
57
Member Avatar for Pilate

Hello python world, this is my first post I type print "hello world" into IDLE, hit return but it returns nothing also the pull down menus were HUGE. After reading and attempting to fix them they are nothing but --- now. actually not even as clear as --- 1 more …

Member Avatar for sneekula
0
185
Member Avatar for ccclay

I am a beginner and want to learn the method to run python script in linux system so that an application can automatically execute a job. For example, I want my ubuntu to do the cron job with a script to play a mp3 file by vlc player at 9pm …

Member Avatar for ccclay
0
96
Member Avatar for Altarium

I'm working on writing a small program that jumbles up a word an allows the user to move letters around in a string until the word us un-jumbled. For Example: If the given word is "movie" The program might jumble it to say "vmioe" In which case "v" would be …

Member Avatar for bgeddy
0
212
Member Avatar for iamoldest

How can I write and call on arrays in python? I want to be able to do this.... [QUOTE]nameofarray1 = (1, 2, 1, 5, 6, 3, 2, 6, 8, 9), (4, 4, 3, 5, 7, 5, 5, 6, 8, 1), ....... and so on[/QUOTE] and then later read from it …

Member Avatar for jrcagle
0
90
Member Avatar for linux

Does one exist? Like the Glade Interface Designer and wxGlade, only to build Tkinker UIs. This would need to be run on Linux/UNIX.

Member Avatar for linux
0
127
Member Avatar for julichrist

is it possible let php run under python?? since i really don't understand how to connect database using odbc with python... what i mean is... can i call php file from python? can anyone help? i have tried in the url call setting.php but my php code can't run...

0
41
Member Avatar for iamoldest

Would someone please help me learn how to create a 2d map using python with arrays or something ? I have been trying to find out for days and haven't found anything. I found this on the internet... [QUOTE] self.map = ( "::::::XXXXXXXXXXXXXX", "::::::..::::XX::::::", "::Z:+:XX::::..::M:::", "::::::XXX.XXXX::::::", "XXX.XXXXX.XXXXXX.XXX", "XXX.XXX/:::::XXX....", "XXX.XXX::&:::XXX.XXX", "XXX....::::M:XXX.XXX", …

Member Avatar for woooee
0
118
Member Avatar for sigkill9

Hi, I'm trying to build a simple python program that will total how many hours a worker has worked based on a start time and end time entry but the problem is this "simple" problem is becoming very complicated and i'm affraid i'm way off base and digging deeper and …

Member Avatar for woooee
0
1K
Member Avatar for nxavier

Okay, i've been working on this assignment for hours. I'm a total python newb but i've done pretty well so far. I'm stumped now though. I was hoping someone could point me in the right direction as to why i'm getting the error message below. The program is supposed to …

Member Avatar for nxavier
0
85
Member Avatar for LanierWexford

I have a modual(Is that the right term?)called WordPlay which has severl functions for exercises in Chapter 9 of "How to Think Like a (Python) Programmer". Below is my code for Ex9.3.2, which has the user input a string letters and then searches a .txt file(Attachment) for words that do …

Member Avatar for katharnakh
0
223

The End.