Ismael Garrido wrote:
The idea of the class is to be able to create a tree. Where each node
can have subnodes, which in turn can have their subnodes...
Are you creating a tree to represent XML data? There are many packages available that do this. You
might want to look at ElementTree which is
Liam Clarke wrote:
Hi, you could save yourself some hassle and do
minipstr = '1.0.0.1'
maxipstr = '1.0.15.16'
minip = map(int, minipstr.split('.'))
maxip = map(int, maxipstr.split('.'))
iplist = []
for a in range(minip[2], maxip[2]+1):
... if a maxip[2]:
... for b in
Hi all.
First, here is the code I have a problem with (I got same problem in
my project) :
from Tkinter import *
def go():
e.get()
print e
main=Tk()
e=Entry(main)
e.pack()
b=Button(main,text='OK',command=go()).pack()
main.mainloop()
For some reason the function is called before I click
Liam Clarke wrote:
[ snip ]
- increment an IP. This is the hardest part.
Why? An ip (V4) is just an 32bit integer :-)
The problem arises from the representation.
Use something like
http://pynms.sourceforge.net/ipv4.html;
to switch between the various representations.
Kent
HTH and
Ralfas Jegorovas wrote:
I am wondering how I would go about making a list of IPs between two set
IPs.
# First, list2str can be written shorter
.def list2str(lst):
.return '.'.join(map(str, lst))
# The inverse of that is also needed
.def str2list(s):
.return map(int, s.split('.'))
#
On Sun, 20 Feb 2005 17:12:54 +0200
Mark Kels [EMAIL PROTECTED] wrote:
Hi all.
First, here is the code I have a problem with (I got same problem in
my project) :
from Tkinter import *
def go():
e.get()
print e
main=Tk()
e=Entry(main)
e.pack()
Ismael Garrido wrote:
Kent Johnson wrote:
Are you creating a tree to represent XML data? There are many packages
available that do this. You might want to look at ElementTree which is
one of the easiest to use. In fact, even if you aren't trying to
represent XML you might find ElementTree
Tim Wilson wrote:
Hi everyone,
Hi Tim,
I'm a newb, first time posting, so please take any of the following
advice at face value
# Collect form information
form = cgi.FieldStorage()
requestername = form[requestername].value
fromaddr = form[email].value
itemname = form[itemname].value
Thanks alot to everyone for your help!
I'm not completely sure I understand how Roel's code works so I'll be doing
a bit of research :-) (but it works :-D). Thanks again.
All the best,
Ralf
___
Tutor maillist - Tutor@python.org
Ah, see, I should convince my bosses that I need a Python interpreter.
Of course, then they'd ask what Python was, and why I was thinking
about it at work
Duh, I was just reading the docs, and I kept thinking that an
attribute was just a class variable.
Thanks, Kent, now I have all sorts of
Yeah, you really have to see a few examples to get the hang of
creating MIME emails, this is one area where I think the Python docs,
quite frankly, stink. I had enough trouble getting attachments from a
MIME email, let alone adding one.
(But, if I recall correctly, a MIME email has a distinct
I am wondering how I would go about making a list of
IPs between two set
IPs.
This is my initial code:
my code
def list2str(list):
ip=''
for part in list:
if len(ip)!=0:
ip=ip+'.'+part
else:
ip=ip+part
return ip
iplist = []
12 matches
Mail list logo