Hi Ondrej,<br><br>I don't know the exact answer, however if you put the comma after back-slash on a new line it works.<br><br>In [10]: from hermes2d import Mesh, H1Shapeset, PrecalcShapeset, H1Space \<br>   ....: ,WeakForm, Solution, ScalarView, LinSystem, DummySolver<br>
<br>and IPython complains about a missing module as expected other than a syntax error :)<br><br><br clear="all">Gökhan<br>
<br><br><div class="gmail_quote">On Thu, May 21, 2009 at 9:15 PM, Ondrej Certik <span dir="ltr"><<a href="mailto:ondrej@certik.cz">ondrej@certik.cz</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
and I want to copy & paste the code at the front page:<br>
<br>
<a href="http://code.google.com/p/femhub/" target="_blank">http://code.google.com/p/femhub/</a><br>
<br>
into ipython. The problematic lines are:<br>
<br>
from hermes2d import Mesh, H1Shapeset, PrecalcShapeset, H1Space, \<br>
       WeakForm, Solution, ScalarView, LinSystem, DummySolver<br>
from hermes2d.forms import set_forms<br>
from hermes2d.examples import get_example_mesh<br>
<br>
if I paste the first line, this is what happens:<br>
<br>
<br>
In [2]: from hermes2d import Mesh, H1Shapeset, PrecalcShapeset, H1Space, \<br>
------------------------------------------------------------<br>
   File "<ipython console>", line 1<br>
SyntaxError: trailing comma not allowed without surrounding<br>
parentheses (<ipython console>, line 1)<br>
<br>
<br>
and then the rest of lines fail too. If I fix this, e.g. write it<br>
without "\", for example by concatenating the lines, then the whole<br>
script can be just copy & pasted and it rocks.<br>
<br>
<br>
Is there some reason why the line with "\" doesn't work?<br>
<br>
Ondrej<br>
_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
</blockquote></div><br>