Newbi X Server Question
Gerhard Häring
gerhard.haering at opus-gmbh.net
Wed Feb 19 05:16:11 EST 2003
Ian Pellew <ipellew at pipemedia.co.uk> wrote:
> Hi;
>
> Why do I get the Unable ... :
> "
> So:ksh /var/apache/cgi-bin/Ipellew/a.py
> import: Unable to connect to X server ().
> Content-Type: text/plain
>
> "
> from
> "
> #!/usr/local/bin/python
> import sys
> [...]
Your Unix is executing this script as a csh script. And IIRC, 'import' is an
X11 executable.
The reason is that #! (the shebang line) must be the *first* line.
-- Gerhard
More information about the Python-list
mailing list