I think you cannnot use "\" as normal string ,it’s a metacharacter, u can use 
it like this:
'\\begin{document}'

-Shambhu
-----Original Message-----
From: Steven D'Aprano [mailto:steve+comp.lang.pyt...@pearwood.info] 
Sent: Monday, September 19, 2011 3:31 AM
To: python-list@python.org
Subject: Re: What is wrong with this code?

On Sun, 18 Sep 2011 21:07:22 +0000, superhappyfuntime wrote:

> On 09-15-2011, Ulrich Eckhardt <ulrich.eckha...@dominolaser.com> wrote:
> 
>> superhappyfuntime wrote:
>>>  #this is antiWYSIWYG, an easy to learn cap for begginners to LaTeX.
> 
>> It's LaTeX, not Python.
> 
>> Uli
> 
> no, it's a cap for LaTeX written in python

If it's Python, it's no Python syntax I've ever seen before.


>>> here it is: = '\begin{document}'
  File "<stdin>", line 1
    here it is: = '\begin{document}'
          ^
SyntaxError: invalid syntax


How about if you start off by explaining what you think "a cap for LaTeX" 
means, or provide a link to something that will explain it? This is a 
Python list, and we don't necessarily know much about LaTeX.



-- 
Steven




-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to