View Issue Details

IDProjectCategoryView StatusLast Update
0000227FreeCADBugpublic2010-12-31 13:29
Reporterpperisin Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionnot fixable 
Product Version0.11 
Summary0000227: Character '\' not working in python script
DescriptionHi,

this line reports an error in python console

from OCC import XCAFApp, TDocStd, TCollection, XCAFDoc, \
    BRepPrimAPI, Quantity, TopLoc, gp, TPrsStd, XCAFPrs

I think that this is ok. Using '\' character to continue command over many lines should be allowed

Regards,
Petar Perisin
Additional Informationwin 7 32bit build 3824
TagsNo tags attached.
FreeCAD Information

Activities

wmayer

2010-12-30 20:57

administrator   ~0000478

Sorry, I guess you're wrong. If I open a python session from a normal command line window and do a:
import os, \
sys

I also get a syntax error. So far the behaviour of our GUI python console is exactly the same to the standard console in this regard.

The backslash in general seems to be allowed but probably not inside an import statement. E.g. you can use it for this:
"Hello, "\
"World!"

wmayer

2010-12-31 13:29

administrator   ~0000480

Invalid item.

Issue History

Date Modified Username Field Change
2010-12-30 12:12 pperisin New Issue
2010-12-30 20:57 wmayer Note Added: 0000478
2010-12-31 13:29 wmayer Note Added: 0000480
2010-12-31 13:29 wmayer Status new => closed
2010-12-31 13:29 wmayer Resolution open => not fixable