Re: [Tutor] python and kiviat diagrams

2009-12-22 Thread dwbarne
Kent and Hilton, I'm a victim of outdated documentation. Mine is v0.98 (no radar charts), while latest is v0.99. A small step in numbers, but a giant leap in capability! Thanks! Looks like Matplotlib will do the trick after all. Daniel -Original Message- >From: Kent Johnson >Sent: De

Re: [Tutor] python and kiviat diagrams

2009-12-22 Thread Hilton Garcia Fernandes
OK. But, please don't you forget to try R and rpy ! :) These guys do very clever tricks. On Tuesday 22 December 2009 20:39:35 dwba...@earthlink.net wrote: > Kent and Hilton, > > I'm a victim of outdated documentation. Mine is v0.98 (no radar charts), > while latest is v0.99. A small step in n

Re: [Tutor] Rép. : How can I make this run fast er?

2009-12-22 Thread عمـ نوفل ـاد
On Mon, Dec 21, 2009 at 4:40 PM, Luhmann wrote: > #Here's my try: > > vowel_killer_dict = { ord(a): None for a in 'aeiou'} > > def devocalize(word): > return word.translate(vowel_killer_dict) > > vowelled = ['him', 'ham', 'hum', 'fun', 'fan'] > vowelled = set(vowelled) > > > devocalise_dict={

Re: [Tutor] python and kiviat diagrams

2009-12-22 Thread Hilton Garcia Fernandes
Congratulations ! It looks like matplotlib does the trick. I became an rpy evangelist because this binding connect two very interesting, powerful and flexible things: R and Python. Thanks, hilton On Tuesday 22 December 2009 19:45:18 Kent Johnson wrote: > On Tue, Dec 22, 2009 at 1:18 PM,

Re: [Tutor] python and kiviat diagrams

2009-12-22 Thread Kent Johnson
On Tue, Dec 22, 2009 at 1:18 PM, wrote: > One of the drawbacks of Matplotlib is that it does not have the capability of > drawing Kiviat diagrams. > > Does anyone know of a software package for drawing Kiviat diagrams written in > Python? I don't know what a Kiviat diagram is but the images go

Re: [Tutor] importing

2009-12-22 Thread Emile van Sebille
On 12/22/2009 1:14 PM Robert Johansson said... Hi all, suppose I need to import a module inside a class and that I need to use it in to different methods. Is this is the way to do it? Well, neither is really (see comments below). I generally import only at the top of a module. You can of cou

Re: [Tutor] importing

2009-12-22 Thread Lie Ryan
On 12/23/2009 8:14 AM, Robert Johansson wrote: Hi all, suppose I need to import a module inside a class and that I need to use it in to different methods. Is this is the way to do it? generally you should keep all imports at the top of the file. There are times when importing only to specific

[Tutor] importing

2009-12-22 Thread Robert Johansson
Hi all, suppose I need to import a module inside a class and that I need to use it in to different methods. Is this is the way to do it? class test(): import time def method1(self): print 'method 1: ', time.clock() def method2(self): print 'method 2: ', time.clo

Re: [Tutor] python and kiviat diagrams

2009-12-22 Thread Hilton Garcia Fernandes
Hello Daniel. There's a statistical package named R, from http://r-project.org that has pretty much everything related to statistics and data analysis. Kiviat diagrams, also known as star plots, or web plots etc., are among its abilities -- directly or using packages like 'rela' or 'homals',

Re: [Tutor] print IP address range to stdout

2009-12-22 Thread Dave Angel
Rich Lovely wrote: 2009/12/22 MK : Ok. That was very helpful. As i dont know how to do it i googled and found this one: http://anonymouse.org/cgi-bin/anon-www.cgi/http://snipplr.com/view/14807/convert-ip-to-int-and-int-to-ip/ But frankly i dont understand it. The program works now like it sh

[Tutor] python and kiviat diagrams

2009-12-22 Thread dwbarne
One of the drawbacks of Matplotlib is that it does not have the capability of drawing Kiviat diagrams. Does anyone know of a software package for drawing Kiviat diagrams written in Python? Daniel ___ Tutor maillist - Tutor@python.org To unsubscribe

Re: [Tutor] print IP address range to stdout

2009-12-22 Thread spir
MK dixit: > First function the ip is splitted as i did it. Alright. > The use 256 as it is the maximum for any digit. ok. > But what is that ** and exp meaning > > -- > def ip_to_int(dotted_ip): > exp = 3 > intip = 0 >

Re: [Tutor] print IP address range to stdout

2009-12-22 Thread Rich Lovely
2009/12/22 MK : > Ok. That was very helpful. As i dont know how to do it i googled > and found this one: > http://anonymouse.org/cgi-bin/anon-www.cgi/http://snipplr.com/view/14807/convert-ip-to-int-and-int-to-ip/ > > But frankly i dont understand it. The program works now like it should > but i wan

Re: [Tutor] print IP address range to stdout

2009-12-22 Thread MK
Ok. That was very helpful. As i dont know how to do it i googled and found this one: http://anonymouse.org/cgi-bin/anon-www.cgi/http://snipplr.com/view/14807/convert-ip-to-int-and-int-to-ip/ But frankly i dont understand it. The program works now like it should but i want to understand the code i

Re: [Tutor] print IP address range to stdout

2009-12-22 Thread Alan Plum
Hi again, On Di, 2009-12-22 at 12:46 +0100, Alan Plum wrote: > # Now generate the addresses: > for ip in range(start, end+1): > blocks = [] > for i in range(4): > blocks.append((ip & (0xff << (8 * i))) >> (8 * i)) > print '.'.join(blocks) I just realised this gives you the blo

Re: [Tutor] print IP address range to stdout

2009-12-22 Thread Alan Plum
On Di, 2009-12-22 at 10:53 +0100, MK wrote: > Here is my program so far: > Please translate comments if you post to an English list. Not everyone speaks German. > The start_adress and end_adress are the ip-range. > > For example: > printdomains.py -s 192.168.178.0 -e 193.170.180.4 > > This sho

Re: [Tutor] print IP address range to stdout

2009-12-22 Thread Dave Angel
MK wrote: Hi there, i have some logical problem. I dont get it done to write my for loops in that way that the ip address range which is given as arguments are correct processed. Meaning that only the ips are printed which the user defines as argument. I tried to make an if statement to stop a

Re: [Tutor] print IP address range to stdout

2009-12-22 Thread Alan Plum
On Di, 2009-12-22 at 10:53 +0100, MK wrote: > Hi there, > > i have some logical problem. I dont get it done to write my for loops in > that way that the ip address range which is given as arguments are > correct processed. Meaning that only the ips are printed which the > user defines as argument.

[Tutor] print IP address range to stdout

2009-12-22 Thread MK
Hi there, i have some logical problem. I dont get it done to write my for loops in that way that the ip address range which is given as arguments are correct processed. Meaning that only the ips are printed which the user defines as argument. I tried to make an if statement to stop at the end_adre