Page 1 of 1

A little help please!

Posted: Fri Dec 12, 2008 7:28 am
by wheels1758
So im trying to figure out how to splice demos. I have read through the "Some Handy Scripts" thread and have not had any luck. Here is what i put in:

C:\Users\Michael> python c:\python30\scripts\demosplice.py c:\python30\demo1.mxd
emo c:\python30\demo2.mxdemo c:\python30\demo.mxdemo

And got this error!

Traceback (most recent call last):
File "c:\python30\scripts\demosplice.py", line 208, in <module>
splicedemos(args.filenames[0:-1], args.filenames[-1])
File "c:\python30\scripts\demosplice.py", line 116, in splicedemos
headers.append(readheader(fn))
File "c:\python30\scripts\demosplice.py", line 45, in readheader
h.fp = file(filename, "rb")
NameError: global name 'file' is not defined

Please, someone help! Anybody know what to do?

Re: A little help please!

Posted: Fri Dec 12, 2008 7:46 am
by jlv
The new 3.0 version of Python isn't backwards compatible with old scripts. You need a 2.x version.

(Yes, the Python developers have lost their minds.)

Re: A little help please!

Posted: Fri Dec 12, 2008 7:53 am
by wheels1758
Thanks JLV. I also have 2.6 but never thought to try it. Works now! Thanks.

Wheels