Re: ImportError: No module named sax.handler?



I'm lost here. When I put this line

from xml.sax.handler import ContentHandler

in a .py file and run it, I get the ImportError. When I execute it in
shell, there is no error.

Why?

Because you have another module called xml in your path that is found
first and has no sax package in it.

Regards,
Martin
.



Relevant Pages

  • Re: Redirection issue
    ... 1- execute input commands from standard input, ... the phrase "it does not work anymore" carries very little meaning. ... after compilation and execution of the shell with a simple command like ...
    (comp.lang.c)
  • vulnerabilities in scponly
    ... without allowing shell access. ... scponly makes no effort to verify the path to the scp or sftp-server ... arbitrary commands by simply uploading a file. ... However, if this is *NOT* the case, the user could execute arbitrary ...
    (Bugtraq)
  • RE: Shell Shoveling?!?
    ... Subject: Shell Shoveling?!? ... you need to somehow execute code on the box. ... > 2) wouldn't there be a requirement to escalate privileges in order ... > to run NetCat on the compromised host? ...
    (Pen-Test)
  • Re: Redirection issue
    ... 1- execute input commands from standard input, ... "does not work" could be anything from not compiling, not executing, ... after compilation and execution of the shell with a simple command like ...
    (comp.lang.c)
  • Re: Script Header
    ... > On a shell script, ... > You can TRY to execute a garbage file. ... > filename: Exec format error. ... - The shell will check whether this file has the executable flag set, ...
    (comp.unix.shell)