473,395 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Re: [cairo] Rendering SVG with libRSVG,Python ... CTYPES SUCCESSAT LAST!!!

Thanks for your advice Gerdus, but I have tried your suggestion with no
success. It has at least been beneficial to discover a tool which I did
not know about in 'Dependency Walker'; all dependencies appear okay.

HOWEVER (!!!) I HAVE JUST HAD SUCCESS IN LOADING THE DLL !!! In
searching through my 'C:WINDOWS\system32' directory I discovered a
subdirectory named 'rsvg' containing a number of .dll's associated with
that library, including the ones I was attempting to load. I'm not
certain how it got there; I probably added it myself sometime in the
last couple of weeks in a vain attempt to solve the problem. In any
case, that directory seems to have been the root of my problems causing
some path conflicts, since when I deleted it my code ran fine! At last,
"l = CDLL('librsvg-2-2.dll')" works! Now to give the rest of your
solution a try...

Best regards,
Tim

Gerdus van Zyl wrote:
I created that ctypes recipe since there is no binary for win32.
The python binding for librsvg is part of gnome-python-desktop and as
such you need
a gtk build env which is pretty much impossible to get working. Plus
the build system uses codegen/magic/amuletyendor so I can't even hand
compile it. But if you have some linux development experience (I
don't) you might get it working that way.

On the ctypes problem from the ctypes list: Try putting all the dll
files in the same directory as the script and then using Dependency
Walker to ensure it's finding the dll dependencies in that directory.

~Gerdus

On Tue, Sep 2, 2008 at 7:24 PM, Tim Grove <ti*******@sil.orgwrote:
>In the recipe found at
http://www.cairographics.org/cookbook/librsvgpython/, the intro reads:

"Normally it's easier to use librsvg Python bindings from PyGTK, so you
can import rsvg. When that's not an option, you may be able to bind just
enough of it using the ctypes module to use it. Example for win32 follows."

I've been having trouble getting the actual recipe for ctypes working
(another story - visit the ctypes mailing list!!!), but I'm looking for
advice on how to get my pc setup (Windows XP Pro) so that I can use
"import rsvg" in my python program, as suggested by the intro. Can
anyone help?

Tim
_______________________________________________
cairo mailing list
ca***@cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo

_______________________________________________
cairo mailing list
ca***@cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo

Sep 2 '08 #1
0 1419

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Srijit Kumar Bhadra | last post by:
Hello, Here are code snippets to create and access shared memory in Python with and without ctypes module. With regards, Srijit Filename : SharedMemCreate.py import msvcrt, mmap
7
by: Dennis Benzinger | last post by:
Hi! Does anybody know of a SVG rendering library for Python? Bye, Dennis
18
by: Paul Watson | last post by:
I need to call some Windows APIs. Is the only way to download ctypes or the win32 interfaces? Is there any plan to get ctypes batteries into the standard Python build?
1
by: Gerald Klix | last post by:
I read the whol email thread carefully and could not find any sentence by Guido, which states that he does not accept ctypes for the standard library. He just declined to rewrite winreg. Did I miss...
0
by: follower | last post by:
This post is mostly Google-bait for anyone else that might want to compile SpiderMonkey ( libjs / libjs.so / libjs.dylib ) for OS X (10.4.5 in my case) and then use it with Python's ctypes. I can't...
12
by: p.lavarre | last post by:
Q: The C idea of (pv != NULL) is said most directly in Python ctypes how? A: We are of course supposed to write something like: def c_not_null(pv): return (ctypes.cast(pv,...
4
by: rozniy | last post by:
I am using Python's CTypes module to import functions from a DLL into Python. Some of the DLL's functions take enum type arguments, eg: olDaGetDASS (HDEV hDev, OLSS OlSs, UINT uiElement, PHDASS...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.