In article <RQSYa.177$>, Ken Fettig wrote:
> Hello, I am trying to make use of the base64 module but am having problems.
>
>>>> import base64
>>>> decodestring('SVNBKjAwKiAgICAgICAgICAqMDAqICAgICAg ')
> Traceback (most recent call last):
> File "<pyshell#1>", line 1, in ?
> decodestring('SVNBKjAwKiAgICAgICAgICAqMDAqICAgICAg ')
> NameError: name 'decodestring' is not defined
>>>>
>
> What am I doing wrong. I am importing the base64 module, why can't I call
> the decodestring method?
Scope and Namespaces. Try:
>>> base64.decodestring('SVNBKjAwKiAgICAgICAgICAqMDAqI CAgICAg')
'ISA*00* *00* '
See
http://www.python.org/doc/current/tut/node11.html
Hth,
PterK
--
Peter van Kampen
pterk -- at -- datatailors.com