View unanswered posts | View active topics

Reply to topic  [ 8 posts ] 

Joined: Wed Mar 18, 2009 8:07 pm
Posts: 29
Post 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


Wed Mar 14, 2012 7:29 am
Profile
Site Admin
User avatar

Joined: Fri Feb 07, 2003 8:48 am
Posts: 2883
Location: Melbourne, Australia
Post 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:
[Scripting File Associations]
.py=c:\python\python.exe "%1" "%2"


Wed Mar 14, 2012 11:31 pm
Profile WWW
Site Admin
User avatar

Joined: Fri Feb 07, 2003 8:48 am
Posts: 2883
Location: Melbourne, Australia
Post 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...? :)


Wed Mar 14, 2012 11:33 pm
Profile WWW

Joined: Wed Mar 18, 2009 8:07 pm
Posts: 29
Post Re: Sample Python channel plugin
Yes I DID install Python!

_________________
Graham


Fri Mar 16, 2012 6:54 pm
Profile

Joined: Wed Mar 18, 2009 8:07 pm
Posts: 29
Post 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


Fri Mar 16, 2012 7:03 pm
Profile
Site Admin
User avatar

Joined: Fri Feb 07, 2003 8:48 am
Posts: 2883
Location: Melbourne, Australia
Post 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.


Fri Mar 16, 2012 10:46 pm
Profile WWW
User avatar

Joined: Mon Sep 08, 2008 3:16 pm
Posts: 222
Location: Elk Grove, California
Post 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.


Sat Mar 17, 2012 5:58 pm
Profile

Joined: Wed Mar 18, 2009 8:07 pm
Posts: 29
Post Re: Sample Python channel plugin
Apologies - I had the incorrect path set to python.exe

Schoolboy error! :roll:

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

_________________
Graham


Tue Mar 20, 2012 6:17 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online
Users browsing this forum: Exabot [Bot] and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron