From: Matej C. <ce...@su...> - 2003-12-11 01:35:01
|
On Wednesday 10 of December 2003 03:36, Frederic Gobry wrote: > > 1) How to get correct parameters in argv? I have to run it > > like pybliographer pybfill htmlname bibname > > to make it work? When running just ./pybfill I get this: > > > > komensky:pybfill$ ./pybfill.py ukazka2.xhtml test.bib > > > > from: can't read /var/mail/Pyblio > > from: can't read /var/mail/xml.sax > > ./pybfill.py: line 32: False: command not found > > ./pybfill.py: line 34: syntax error near unexpected token > > `(' ./pybfill.py: line 34: `def usage ():' > > komensky:pybfill$ > > It looks as if your script is run by sh, not pybliographer. > What system are you working on ? On Linux, this seems fine. Yes, this is Linux too (Debian/stable). This is really strange (pybfill was modified just to work as a testing of running): komensky:pybfill$ pybliographer -q pybfill.py ukazka2.xhtml \ test.bib ukazka2.xhtml test.bib <open file '<stdout>', mode 'w' at \ 0x80cd0c0> komensky:pybfill$ ./pybfill.py ukazka2.xhtml test.bib # mouse cursor in X changes to cross and when the mouse is # clicked then it beeps couple of times and dies with this # output. from: can't read /var/mail/Pyblio from: can't read /var/mail/xml.sax ./pybfill.py: line 32: False: command not found ./pybfill.py: line 34: syntax error near unexpected token `(' ./pybfill.py: line 34: `def usage ():' komensky:pybfill$ which pybliographer /usr/bin/pybliographer komensky:pybfill$ So apparently when running with pybliographer directly everything works, but #! magic doesn't. And of course, this is not the only script (and the only Python script) I am running on this computer. Any clue? Matej -- Matej Cepl, http://www.ceplovi.cz/matej GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC 138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488 Experience is what you get when you don't get what you want. -- Dan Stanford |