Re: Python scripting with Paint Shop Pro 8.0

Discussion in 'Python' started by Aahz, Jul 20, 2003.

  1. Aahz

    Aahz Guest

    In article <>,
    Marc Wilson <> 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 () <*> http://www.pythoncraft.com/

    This is Python. We don't care much about theory, except where it intersects
    with useful practice. --Aahz
    Aahz, Jul 20, 2003
    #1
    1. Advertising

  2. Aahz

    Marc Wilson Guest

    In comp.lang.python, (John J. Lee) (John J. Lee) wrote in
    <>::

    |Marc Wilson <> 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: Web: http://www.cleopatra.co.uk
    _________________________________________________________________
    Try MailTraq at https://my.mailtraq.com/register.asp?code=cleopatra
    Marc Wilson, Jul 21, 2003
    #2
    1. Advertising

  3. Aahz

    John J. Lee Guest

    Marc Wilson <> 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
    John J. Lee, Jul 21, 2003
    #3
  4. Aahz

    Duncan Booth Guest

    Marc Wilson <> wrote in
    news::

    > 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
    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?
    Duncan Booth, Jul 21, 2003
    #4
  5. Aahz

    Marc Wilson Guest

    In comp.lang.python, Duncan Booth <> (Duncan Booth)
    wrote in <Xns93BF9868E285Bduncanrcpcouk@127.0.0.1>::

    |Marc Wilson <> wrote in
    |news::
    |
    |> 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: Web: http://www.cleopatra.co.uk
    _________________________________________________________________
    Try MailTraq at https://my.mailtraq.com/register.asp?code=cleopatra
    Marc Wilson, Jul 21, 2003
    #5
  6. Aahz

    Duncan Booth Guest

    Marc Wilson <> wrote in
    news::

    >|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/paintshoppro/components.asp
    for Scripting for Script Authors and Paint Shop Pro 8 Scripting API
    downloads.

    --
    Duncan Booth
    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?
    Duncan Booth, Jul 22, 2003
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    4
    Views:
    4,614
    Brendan Guild
    Oct 23, 2005
  2. Martin Franklin

    Re: Python scripting with Paint Shop Pro 8.0

    Martin Franklin, Jul 21, 2003, in forum: Python
    Replies:
    11
    Views:
    1,853
    Marc Wilson
    Jul 24, 2003
  3. Greg Brunet
    Replies:
    4
    Views:
    1,040
    Kevin Dahlhausen
    Jul 23, 2003
  4. Ron Stephens
    Replies:
    23
    Views:
    2,785
    Ron Stephens
    Apr 12, 2004
  5. Wayne Erfling
    Replies:
    0
    Views:
    317
    Wayne Erfling
    Nov 18, 2006
Loading...

Share This Page