assigning a value to input data (scanf-ish)????

Shaun shogan at iel.ie
Thu May 4 09:47:11 EDT 2000


right,
what i wanna do is...
print to the screen:
('please enter yer name:')
here i want to take the name the user entered and assign a value, say 'name'
to it
('please enter yer number')
here i want to take the name the user entered and assign a value, say 'num'
to it
('please enter yer email:')
same
('please enter yer address:')
same
('please enter the cost:')
same

then using the xdrlib module i want to pack all the info together to make a
single byte data stream....like....

import xdrlib
p=xdrlib.Packer()
p.pack_string(name)
p.pack_int(num)
p.pack_string(email)
p.pack_string(add)
p.pack_float(cost)

so how do i keep the value entered by the user in the memory with the value
name, num ect.... assigned to it and will the way i have this structured
work?

thanks
Shaun
=====================
Shaun Hogan
Interactive Enterprise Ltd.
alt. E-mail : shaun_hogan at yahoo.com
+353 86 8342529







More information about the Python-list mailing list