Python version

Corel Paint Shop Pro

Moderator: Kathy_9

Post Reply
Nok
Posts: 13
Joined: Mon Mar 17, 2014 9:12 am
operating_system: Windows 7 Professional
System_Drive: C
32bit or 64bit: 64 Bit
processor: Intel Core i5
Hard_Drive_Capacity: 220G
Monitor/Display Make & Model: Samsung 17inch
Contact:

Python version

Post by Nok »

How can I determine which version of Python PSP uses?
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Python version

Post by LeviFiction »

PSP uses a basic installation of Python so it includes all of the base libraries from sys, to ctypes. Event TKinter.

So all you would need to do inside of PSP is create a script that called and printed sys.version. Of course, to use those libraries the script must be placed inside your scripts-trusted folder.

Code: Select all

from JascApp import *
import sys

def ScriptProperties():
    return {
        'Author': u'',
        'Copyright': u'',
        'Description': u'',
        'Host': u'',
        'Host Version': u''
        }

def Do(Environment):
    print(sys.version)
Another way is to look at the program files inside of PSP. You'll find a DLL labeled CorePython##.dll

Using the DLL method
CorelX7 uses Python 2.7

Using the sys.version method
CorelX7 uses Python 2.7.5

So depends on how detailed you want to be.
https://levifiction.wordpress.com/
Nok
Posts: 13
Joined: Mon Mar 17, 2014 9:12 am
operating_system: Windows 7 Professional
System_Drive: C
32bit or 64bit: 64 Bit
processor: Intel Core i5
Hard_Drive_Capacity: 220G
Monitor/Display Make & Model: Samsung 17inch
Contact:

Re: Python version

Post by Nok »

Thanks LeviFiction.

I ran the script and got 2.6.5 in PSPX5 and 2.7.5 in PSPX6.
Post Reply