On Aug 31, 7:21 pm, "Edward K. Ream" <[email protected]> wrote:

> I'm having trouble installing lxml on Windows 7.

Sorry for the noise.  I didn't read the installation instructions.
easy_install lxml==2.2.4 will install for Python 2.6.

Haha.  I crashed in the same place.  Apparently inkscape isn't on the
path...

Oh, I see.  Inkscape has its own Python...

So either I tell Python about Inkscape or I tell Inkscape about
inkcall...  Hmm.  The internal inkscape python is 2.5...

Here is the code that isn't working:

        cmd = [
            "inkscape",
            "--with-gui",
            svgfile,
        ]

       proc = subprocess.Popen(cmd)

I now have inkscape.bat that brings up inkscape, so we should be
close.

The following test script does bring up inkscape:

    import subprocess

    cmd = [
        r"c:\scripts\inkscape.bat",
        "--with-gui",
        # svgfile,]

    proc = subprocess.Popen(cmd)

However, making a similar change in three places in inkcall.py crashes
at these lines at get_dim:

    for line in stdout.strip().split('\n'):
            id_,x,y,w,h = line.split(',')

Ah.  The first line is the basically the cmd above.  Maybe I can
ignore it.  Let's change the second line to:

            data = line.split(',')
            if len(data) != 5: continue
            id_,x,y,w,h = data

Ok.  That worked.  We're almost home.

Inkscape didn't load "some_screen_shot.svg", presumably because the
path is not fully qualified.

Success!  setting svgfile = os.path.join(os.getcwd(),svgfile) brings
up the file in inkscape!

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to