base64 module

Discussion in 'Python' started by Ken Fettig, Aug 8, 2003.

  1. Ken Fettig

    Ken Fettig Guest

    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?
    Ken Fettig, Aug 8, 2003
    #1
    1. Advertising

  2. 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('SVNBKjAwKiAgICAgICAgICAqMDAqICAgICAg')

    'ISA*00* *00* '

    See http://www.python.org/doc/current/tut/node11.html

    Hth,

    PterK

    --
    Peter van Kampen
    pterk -- at -- datatailors.com
    Peter van Kampen, Aug 8, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    410
    Klaas
    Dec 20, 2006
  2. Daniel Berger

    base64.rb - wrap in a module?

    Daniel Berger, Jul 31, 2003, in forum: Ruby
    Replies:
    0
    Views:
    90
    Daniel Berger
    Jul 31, 2003
  3. Joseph L. Casale

    Ldap module and base64 oncoding

    Joseph L. Casale, May 24, 2013, in forum: Python
    Replies:
    8
    Views:
    147
    Michael Ströder
    May 28, 2013
  4. Carlos Nepomuceno

    RE: Ldap module and base64 oncoding

    Carlos Nepomuceno, May 25, 2013, in forum: Python
    Replies:
    0
    Views:
    71
    Carlos Nepomuceno
    May 25, 2013
  5. Joseph L. Casale

    RE: Ldap module and base64 oncoding

    Joseph L. Casale, May 25, 2013, in forum: Python
    Replies:
    1
    Views:
    93
    Michael Ströder
    May 26, 2013
Loading...

Share This Page