# from lxml import etree; import module2dbk; print module2dbk.xsl_transform(etree.parse('test-ccap/col10614/index.cnxml'), []);
Error: bash: syntax error near unexpected token `('
I was having a similar problem with the same error, and the comment from tripleee helped me understand:
The error message indicates that the script gets executed by bash, not python.
Their solution of adding !/usr/bin/python at the very start of my code didn't do it for me, but I noticed that my code(extra).py contained parentheses (), so I renamed to my codeextra.py and that was it, problem solved. :)
#!/usr/bin/pythonas the first line of the file.#is actually the admin prompt (vs the non-admin prompt$). BTW there was a formatting error I just fixed; it was all supposed to be on one line.