altica
Posts: 31
Joined: Thu Mar 19, 2009 12:07 am

### Sample Python channel plugin

I am trying to get the sample Python channel plugin working but get the error message:

'Can't open registry key "HKEY_LOCAL_MACHINE\Software\CLASSES\py_auto_file\shell\open\command": The system cannot find the file specified.'

I have installed the Win32 extensions (for Python 2.7) from pywin32-217.win32-py2.7.exe

Any ideas?
Graham

support
Posts: 3029
Joined: Fri Feb 07, 2003 12:48 pm
Location: Melbourne, Australia
Contact:

### Re: Sample Python channel plugin

This sounds like Awasu is having trouble figuring out how to launch the Python interpreter.

IIRC, there is an option in the Python installer to associate .PY files with Python (i.e. if you try to launch a .PY file, Windows knows to start Python) - did you turn this on?

If re-installing Python doesn't fix it, you can manually tell Awasu how to start the Python interpreter by following the instructions here. You will want something like this in your GLOBAL.INI file:

Code: Select all

[Scripting File Associations].py=c:\python\python.exe "%1" "%2"

support
Posts: 3029
Joined: Fri Feb 07, 2003 12:48 pm
Location: Melbourne, Australia
Contact:

### Re: Sample Python channel plugin

altica wrote:I have installed the Win32 extensions (for Python 2.7) from pywin32-217.win32-py2.7.exe

And if years of doing tech support has taught me anything, it's that there are no silly questions. You did install Python as well, right...?

altica
Posts: 31
Joined: Thu Mar 19, 2009 12:07 am

### Re: Sample Python channel plugin

Yes I DID install Python!
Graham

altica
Posts: 31
Joined: Thu Mar 19, 2009 12:07 am

### Re: Sample Python channel plugin

I created the GLOBAL.ini as requested and now get the error message "Can't run the script: The system cannot find the file specified. "

I have Python 2.7 installed - will this conflict with Python 2.5 in the Awasu install?

I am running on WIndows 7 - are there any known Python registry problems with this?
Graham

support
Posts: 3029
Joined: Fri Feb 07, 2003 12:48 pm
Location: Melbourne, Australia
Contact:

### Re: Sample Python channel plugin

altica wrote:I created the GLOBAL.ini as requested and now get the error message "Can't run the script: The system cannot find the file specified. "

I have Python 2.7 installed - will this conflict with Python 2.5 in the Awasu install?

Send me your GLOBAL.INI file and I'll take a look at it. Just to confirm, this file needs to be in the Awasu installation directory e.g. C:\Program Files\Awasu\

The problem is that Awasu can't start the Python interpreter, so the embedded Python 2.5 is unlikely to be causing problems.

If you double-click on a .py file in Explorer, does it launch?

altica wrote:I am running on WIndows 7 - are there any known Python registry problems with this?

Not that I'm aware of.

kevotheclone
Posts: 243
Joined: Mon Sep 08, 2008 7:16 pm
Location: Elk Grove, California

### Re: Sample Python channel plugin

I've used the ActiveState distribution of Python where it registers the file extensions upon installation so I've never had too much trouble with issues like this.

There are some commands you can type at the Command Prompt and environment variables you can modify to reduce this "C:\path\to\python\python.exe C:\path\to\my\scripts\MyScript.py" down to as little as "MyScript". this would be a system wide change not just an Awasu change, which will make working with a scripting language easier... EVERYWHERE.

The commands are:
• ASSOC
• FTYPE

The environment variables are:
• PATH
• PATHEXT

I'll try to create an Awasu Wiki page with more detailed information in the next few days, but for now if you're interested, type "FTYPE /?" at the Command Prompt to get the details.

altica
Posts: 31
Joined: Thu Mar 19, 2009 12:07 am

### Re: Sample Python channel plugin

Apologies - I had the incorrect path set to python.exe

Schoolboy error!

Thanks for your help - this opens up a lot of exciting possibilities for Awasu!
Graham