[Bf-python] problem with arry of lines

jmsoler jmsoler at free.fr
Thu Aug 5 22:43:57 CEST 2004


hi,

Out of blender (win200+pythonwin+python2.3), these few lines of code:

[code]
ftest=open('j:\eps_svg_ps\shapes\star.ai')
l=ftest.readline()
while l.find('EndSetup')==-1:
     l=ftest.readline()
if l.find('EndSetup')!=-1:
    print l.find('EndSetup'),'-->',l.find('EOF',l.find('EndSetup'))
    print l[l.find('EndSetup'):l.find('EOF',l.find('EndSetup'))]
ftest.close()
[/code]


return this:

[data]
20877 --> 21533
EndSetup
%AI5_BeginLayer
1 1 1 1 0 0 1 0 79 128 255 0 50 0 Lb
(Layer 1) Ln
%_/ArtDictionary :
%_/XMLUID : (Layer_1) ; (AI10_ArtUID) ,
%_;
%_
0 A
0 Xw
1 Ap
0 O
0 0 0 0 k
0 R
0 0 0 1 K
0 1 0 0 0 Xy
0 J 0 j 1 w 4 M []0 d
0 XR
313 533.8896 m
140 533.8896 L
140 708.8896 L
313 708.8896 L
313 533.8896 L
b
0 Ap
114 811.8896 m
115.8184 761.6899 L
158.2026 734.729 L
111.0215 717.4873 L
98.4775 668.8462 L
67.5 708.3896 L
17.3633 705.2891 L
45.3989 746.9697 L
26.9565 793.6943 L
75.2612 779.9116 L
114 811.8896 L
b
%_/ArtDictionary :
%_(0.520227) /String (BBAccumRotation) ,
%_;
%_
LB
%AI5_EndLayer--
%%PageTrailer
gsave annotatepage grestore showpage
%%Trailer
%%
[/data]

A good result, exactely what i need . But in blender
the same lines return this:

[data]
20877 --> 21533
%%Trailerotatepage grestore showpagen) ,
[/data]

Any idea about this ?






More information about the Bf-python mailing list