Output of print statement

Moderator: Kathy_9

Post Reply
dfkettle
Posts: 13
Joined: Sat Nov 25, 2017 11:06 pm
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: H-RS880-uATX
processor: AMD Phenom II X4 810 Processor
ram: 16 GB
Video Card: Integrated ATI Radeon HD 4200 graphics
sound_card: Integrated Realtec ALC888S Audio
Hard_Drive_Capacity: 1 TB
Monitor/Display Make & Model: LG 19LG30 (flat screen TV)
Corel programs: PSP, Painter Essentials, After Shot, VS
Location: Owen Sound, ON, Canada

Output of print statement

Post by dfkettle »

I'm trying to run a very simple script that doesn't do anything except display the version of Python that's included with PSP. I suspect it's Python 2, not 3, but I want to find out exactly which version it is. So I wrote the following script:

Code: Select all

from PSPApp import *
import sysconfig

def ScriptProperties():
    return {
        'Author': u'David Kettle',
        'Copyright': u'',
        'Description': u'Print Python version number',
        'Host': u'PaintShop Pro',
        'Host Version': u'16.00'
        }

def Do(Environment):
    print sysconfig.get_python_version()
The problem is, the window with the output from the print statement isn't being displayed. How do I open the output window?

Thanks.
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: Output of print statement

Post by LeviFiction »

View -> Palettes -> Script Output

PSP has been using version 2.7 for several versions now. Definitely had 2.7 in version x8 and probably on down to X5. They had asked in a survey if we wanted to move to Python 3 but never made the move. XI had version 2.4 and X2 had 2.5 and so on. I think PSP8 started off with Python 2.2. Nice to keep in mind if you intend to make scripts that are backwards compatible.
https://levifiction.wordpress.com/
dfkettle
Posts: 13
Joined: Sat Nov 25, 2017 11:06 pm
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: H-RS880-uATX
processor: AMD Phenom II X4 810 Processor
ram: 16 GB
Video Card: Integrated ATI Radeon HD 4200 graphics
sound_card: Integrated Realtec ALC888S Audio
Hard_Drive_Capacity: 1 TB
Monitor/Display Make & Model: LG 19LG30 (flat screen TV)
Corel programs: PSP, Painter Essentials, After Shot, VS
Location: Owen Sound, ON, Canada

Re: Output of print statement

Post by dfkettle »

Thanks, I looked under the "View" menu, in Preferences, and wherever else I could think of, but no luck. I didn't think to look under "Palettes", that's probably not the most obvious place for it.
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: Output of print statement

Post by LeviFiction »

*shrug* Hard to say. Though because it is a palette in the UI it's also technically the perfect place for it. xD That or PSP needs to think about renameing the UI palettes as they share a name with Swatch Palettes and Color Palettes and Image Color Palettes. Lots of ambiguity in that name for PSP.
https://levifiction.wordpress.com/
dfkettle
Posts: 13
Joined: Sat Nov 25, 2017 11:06 pm
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: H-RS880-uATX
processor: AMD Phenom II X4 810 Processor
ram: 16 GB
Video Card: Integrated ATI Radeon HD 4200 graphics
sound_card: Integrated Realtec ALC888S Audio
Hard_Drive_Capacity: 1 TB
Monitor/Display Make & Model: LG 19LG30 (flat screen TV)
Corel programs: PSP, Painter Essentials, After Shot, VS
Location: Owen Sound, ON, Canada

Re: Output of print statement

Post by dfkettle »

Why not just add a checkbox to the script menu?
Post Reply