Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Python scripting with Paint Shop Pro 8.0

Reply
Thread Tools

Re: Python scripting with Paint Shop Pro 8.0

 
 
Greg Brunet
Guest
Posts: n/a
 
      07-21-2003
Hi Marc:

"Marc Wilson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I've just got Paint Shop Pro 8.0, and the functionality of the old
> ImageRobot add-on has been replaced with the new Python Scripting.


Thanks for mentioning PSP 8's support of Python. I have an older copy
that I haven't updated for a while, and this scripting capability is an
update worthwhile making!

> What I'm trying to determine is: can I run these scripts from a

command-line
> invocation? I want to use the scripts to automatically convert files

as
> they arrive, uploaded onto a website, not interactively.


I just DL'd an eval copy also, and a couple of thoughts.
1) Duncan's already pointed out the file association, so it looks like
that's an easy way to ensure that the Python script is handled properly
by PSP.

2) Python was installed there for me. You should see "python22.dll" in
your [C:\Program Files\Jasc Software Inc\Paint Shop Pro 8] (or
appropriate) directory. There shold also be a [\Python Libraries]
subdirectory with other required files.

3) Interestingly, I can't find any sign of a JascApp.* file anywhere. I
would expect to see a PYC or PYD given the Import command, but being a
relative newbie myself, don't have a good understanding of how this
could be. But, hey - it seems to work, so I won't complain.

4) I would expect that for btach processing you would also pass the file
to process at the command shell, but they do seem to offer some extra
help for batch processing (the "Processing all the files in a directory"
section on page 26 of the script.pdf manual (available at their website
if you've only got all the HTML documentation from the CD) I agree that
the Docs could be a bit more helpful!

5) Of course the messages showing off PIL have opened my eyes to how
easy it is to use that - and Python is LOTS easier than Perl IMHO.

--
Greg

 
Reply With Quote
 
 
 
 
Marc Wilson
Guest
Posts: n/a
 
      07-21-2003
In comp.lang.python, "Greg Brunet" <(E-Mail Removed)> (Greg
Brunet) wrote in <(E-Mail Removed)>::

|Hi Marc:
|
|"Marc Wilson" <(E-Mail Removed)> wrote in message
|news:(E-Mail Removed).. .
|> I've just got Paint Shop Pro 8.0, and the functionality of the old
|> ImageRobot add-on has been replaced with the new Python Scripting.
|
|Thanks for mentioning PSP 8's support of Python.

"Support" may be an exaggeration. Part of the problems I've had are that
JASC seem to regard "support" as something that only happens to other
people- or at least, their UK distributor does. They don't even answer the
phone, last couple of weeks.

|I have an older copy
|that I haven't updated for a while, and this scripting capability is an
|update worthwhile making!
|
|> What I'm trying to determine is: can I run these scripts from a
|command-line
|> invocation? I want to use the scripts to automatically convert files
|as
|> they arrive, uploaded onto a website, not interactively.
|
|I just DL'd an eval copy also, and a couple of thoughts.
|1) Duncan's already pointed out the file association, so it looks like
|that's an easy way to ensure that the Python script is handled properly
|by PSP.
|
|2) Python was installed there for me. You should see "python22.dll" in
|your [C:\Program Files\Jasc Software Inc\Paint Shop Pro 8] (or
|appropriate) directory. There shold also be a [\Python Libraries]
|subdirectory with other required files.

Got all that- but no .exe, so presumably can only run Python *via* PSP.
I've now got a separate Python exe to try- maybe I can bypass PSP
altogether.

|3) Interestingly, I can't find any sign of a JascApp.* file anywhere. I
|would expect to see a PYC or PYD given the Import command, but being a
|relative newbie myself, don't have a good understanding of how this
|could be. But, hey - it seems to work, so I won't complain.
|
|4) I would expect that for btach processing you would also pass the file
|to process at the command shell, but they do seem to offer some extra
|help for batch processing (the "Processing all the files in a directory"
|section on page 26 of the script.pdf manual (available at their website
|if you've only got all the HTML documentation from the CD) I agree that
|the Docs could be a bit more helpful!

I don't think we're using "batch" in the same way: I'm using it in the old
mainframe sense of "unattended, non-interactive". Anything with a GUI is
out. It's to be triggered by a file upload to the website.
|
|5) Of course the messages showing off PIL have opened my eyes to how
|easy it is to use that - and Python is LOTS easier than Perl IMHO.

Don't know enough about either to say, but I've heard Python propaganda from
ex-Perlies.
--
Marc Wilson

Cleopatra Consultants Limited - IT Consultants
2 The Grange, Cricklade Street, Old Town, Swindon SN1 3HG
Tel: (44/0) 70-500-15051 Fax: (44/0) 870 164-0054
Mail: http://www.velocityreviews.com/forums/(E-Mail Removed) Web: http://www.cleopatra.co.uk
__________________________________________________ _______________
Try MailTraq at https://my.mailtraq.com/register.asp?code=cleopatra
 
Reply With Quote
 
 
 
 
David Bolen
Guest
Posts: n/a
 
      07-21-2003
"Greg Brunet" <(E-Mail Removed)> writes:

> 3) Interestingly, I can't find any sign of a JascApp.* file anywhere. I
> would expect to see a PYC or PYD given the Import command, but being a
> relative newbie myself, don't have a good understanding of how this
> could be. But, hey - it seems to work, so I won't complain.


This would work if they "embedded" Python rather than "extending" it.
Using Python as an embedded scripting engine, the embedding
application (probably the main PSP executable) can define whatever
modules it wants as built-in modules prior to executing Python code.
The "modules" actually exist right in the executable that is starting
the Python interpreter.

If true, then it would make it less likely you could use that
functionality from an externally initiated Python script, since that
script wouldn't have started from the right environment containing
those built-in modules.

-- David
 
Reply With Quote
 
=?ISO-8859-1?Q?Gerhard_H=E4ring?=
Guest
Posts: n/a
 
      07-22-2003
Marc Wilson wrote:
> [...] One thing I've not found in the reference (perhaps I'm looking in the wrong
> place): how do I capture command-line parameters? [...]


sys.argv

For fancier options, check out optparse (new in 2.3) or getopt.

-- Gerhard

 
Reply With Quote
 
Kevin Dahlhausen
Guest
Posts: n/a
 
      07-23-2003
"Greg Brunet" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...

> Thanks for mentioning PSP 8's support of Python. I have an older copy
> that I haven't updated for a while, and this scripting capability is an
> update worthwhile making!
>


Greg,

If you do upgrade, please let them know that the python scripting was
a major factor in your decision to do so.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Powerdesk Pro: viewing pspimage files from Paint Shop Pro? MitchellWmA Computer Support 1 10-05-2008 05:01 PM
paint shop pro 4 help The White Lady Computer Support 6 06-11-2004 04:09 PM
Paint Shop Pro now speaks German? User Computer Support 5 09-25-2003 07:07 AM
Re: Python scripting with Paint Shop Pro 8.0 Martin Franklin Python 11 07-24-2003 09:11 PM
Re: Python scripting with Paint Shop Pro 8.0 Aahz Python 5 07-22-2003 08:14 AM



Advertisments