Enabling Python Scripting

Label printing integration (NiceWatch middleware and ActiveX programming interface)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
adamlh
Newcomer
Posts: 2
Joined: Thu Aug 02, 2018 3:18 pm

Enabling Python Scripting

Post by adamlh » Thu Aug 02, 2018 3:25 pm

I've installed the latest Python / Pywin32 and Use Nicelabel 2016 but get the following error when attempting to write python scripts

"A script engine for the specified language can not be created."

I've swapped to Python2.7 but still does the same thing.

Anyone have any suggestions?

sdwarwick
Valued Contributor
Posts: 25
Joined: Fri Jul 20, 2018 6:09 pm

Re: Enabling Python Scripting

Post by sdwarwick » Thu Aug 02, 2018 4:37 pm

ironpython 2.7 is embedded in nicelabel. That's all you can use. If you want additional python libs, you need to install ironpython separately and make sure the path is set correctly.

Personally, I don't do this, as I prefer to use a more modern python in other applications and didn't want to clutter my system with more stuff. instead, I use ironpython's ability to use the dotNET routines. It is more of a pain, but so far so good.

adamlh
Newcomer
Posts: 2
Joined: Thu Aug 02, 2018 3:18 pm

Re: Enabling Python Scripting

Post by adamlh » Thu Aug 02, 2018 5:12 pm

Thanks for the reply, When you say its embedded - I've enabled it in the Forms scripting dropdown to Python but
can't seem to write any Script on any button.

Are there any other settings that I'm missing to get Python scripting working as VBscript works fine.

Many thanks for the help!

sdwarwick
Valued Contributor
Posts: 25
Joined: Fri Jul 20, 2018 6:09 pm

Re: Enabling Python Scripting

Post by sdwarwick » Fri Aug 03, 2018 3:50 am

no, that should be it. I'd start by looking at your PATH and see if you have conflicts with another python

Post Reply