Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: Python scripting with Paint Shop Pro 8.0 (http://www.velocityreviews.com/forums/t319913-re-python-scripting-with-paint-shop-pro-8-0-a.html)

Aahz 07-20-2003 01:44 PM

Re: Python scripting with Paint Shop Pro 8.0
 
In article <kl3lhvgh5iillo5g9jvff92qkc8i2022nm@4ax.com>,
Marc Wilson <marc@cleopatra.co.uk> wrote:
>
>I'm a complete Python newbie, though I know at least one regular in
>here. :)


Hi, Marc!

>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.


Don't know PSP, but normally this kind of facility would be made
available through an importable module. If that's not an option, check
to see whether PSP allows specifying a script on the command line;
presumably their embedded Python permits you to exit PSP.
--
Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/

This is Python. We don't care much about theory, except where it intersects
with useful practice. --Aahz

Marc Wilson 07-21-2003 03:36 AM

Re: Python scripting with Paint Shop Pro 8.0
 
In comp.lang.python, jjl@pobox.com (John J. Lee) (John J. Lee) wrote in
<87d6g4wzu7.fsf@pobox.com>::

|Marc Wilson <marc@cleopatra.co.uk> writes:
|[...]
|> There's no obvious way to specify this on the command line- in fact the
|> phrase "command line" doesn't seem to occur in the help.
|>
|> The scripts all start with "from JascApp import *" - does this suggest that
|> the scripts are callable from "plain" python? I want a "quiet" execution
|
|Yes. Do a find for 'JascApp.pyd'. Or just for '*.pyd'.
|
|
|> with no Windows interaction. I assume that there is a library called
|> JascApp.<something> and the path would need to include that?
|
|Yes, <something> == 'pyd' usually. But you never know the ways people
|(and especially large companies) like to mess about with conventional
|ways of doing things.
|
|The way module search paths are handled is generally less easy to
|predict. Even in the normal case, I can't remember how .pyd's are
|found, if I ever knew. Presumably Python is bundled with the
|application, in some form? In which case, it may not be trivial to
|import the module. Probably not hard once you know the answer, though
|<wink>.

The documentation is, er, sketchy. The manual refers you to a non-existant
folder on the CD, and the Python content is referred to as the "Python
Scripting Engine", which suggests it may not be a full implementation. If I
have to install Python separately, so be it. I'll look for the .pyd file
and see if there a suspiciously-named executable there as well.

Thanks.
--
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: info@cleopatra.co.uk Web: http://www.cleopatra.co.uk
__________________________________________________ _______________
Try MailTraq at https://my.mailtraq.com/register.asp?code=cleopatra

John J. Lee 07-21-2003 01:45 PM

Re: Python scripting with Paint Shop Pro 8.0
 
Marc Wilson <marc@cleopatra.co.uk> writes:
[...]
> The documentation is, er, sketchy. The manual refers you to a non-existant
> folder on the CD, and the Python content is referred to as the "Python
> Scripting Engine", which suggests it may not be a full implementation. If I
> have to install Python separately, so be it. I'll look for the .pyd file
> and see if there a suspiciously-named executable there as well.


The fact that it's embedded doesn't necessarily mean that you can't
import it from outside the running application, but it may well not be
possible. Worth a try, though.

As I said in an email, don't forget COM -- maybe one of those .py
files you have is just a wrapper around a COM automation interface.
The "Python for Windows extensions" (aka win32all) is what you need
for most COM stuff.


John

Duncan Booth 07-21-2003 02:00 PM

Re: Python scripting with Paint Shop Pro 8.0
 
Marc Wilson <marc@cleopatra.co.uk> wrote in
news:bpnmhvg7m3sf3rjphodfvgomtt3jg640hn@4ax.com:

> The documentation is, er, sketchy. The manual refers you to a
> non-existant folder on the CD, and the Python content is referred to
> as the "Python Scripting Engine", which suggests it may not be a full
> implementation. If I have to install Python separately, so be it.
> I'll look for the .pyd file and see if there a suspiciously-named
> executable there as well.
>

The documentation is available as a separate download (for those people who
didn't get their copy on CD, such as the evaluation copy). 4798 files, but
having looked at them I wouldn't say they were the best documentation ever.

--
Duncan Booth duncan@rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?

Marc Wilson 07-21-2003 04:27 PM

Re: Python scripting with Paint Shop Pro 8.0
 
In comp.lang.python, Duncan Booth <duncan@NOSPAMrcp.co.uk> (Duncan Booth)
wrote in <Xns93BF9868E285Bduncanrcpcouk@127.0.0.1>::

|Marc Wilson <marc@cleopatra.co.uk> wrote in
|news:bpnmhvg7m3sf3rjphodfvgomtt3jg640hn@4ax.com:
|
|> The documentation is, er, sketchy. The manual refers you to a
|> non-existant folder on the CD, and the Python content is referred to
|> as the "Python Scripting Engine", which suggests it may not be a full
|> implementation. If I have to install Python separately, so be it.
|> I'll look for the .pyd file and see if there a suspiciously-named
|> executable there as well.
|>
|The documentation is available as a separate download (for those people who
|didn't get their copy on CD, such as the evaluation copy). 4798 files, but
|having looked at them I wouldn't say they were the best documentation ever.

I do have a CD, but the files aren't on it. Perhaps it's a duff CD.
--
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: info@cleopatra.co.uk Web: http://www.cleopatra.co.uk
__________________________________________________ _______________
Try MailTraq at https://my.mailtraq.com/register.asp?code=cleopatra

Duncan Booth 07-22-2003 08:14 AM

Re: Python scripting with Paint Shop Pro 8.0
 
Marc Wilson <marc@cleopatra.co.uk> wrote in
news:t25ohv824kde3dh6hvjs6ic9i3d5r98m8j@4ax.com:

>|The documentation is available as a separate download (for those
>|people who didn't get their copy on CD, such as the evaluation copy).
>|4798 files, but having looked at them I wouldn't say they were the
>|best documentation ever.
>
> I do have a CD, but the files aren't on it. Perhaps it's a duff CD.


See the downloads area at
http://www.jasc.com/products/paintsh...components.asp
for Scripting for Script Authors and Paint Shop Pro 8 Scripting API
downloads.

--
Duncan Booth duncan@rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?


All times are GMT. The time now is 06:11 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57