473,395 Members | 1,379 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.

can't import dl module

Hi,

I'm on Mac OS X 10.2.6, using Python 2.3final. I would like to use the dl
module to get access to some system calls, in particular kvm_getprocs.
However, when I try to import dl at the Python command-line, it tells me it
couldn't find the module.

It would seem I have to do something special to get dl to build on my
machine. Does anyone know what that would be? Or is there some other
problem that prevents this from working?

Alternatively, does anyone know what else I could do to get at those calls?
Perhaps I could try SWIG, but that seems like a hassle compared to dl.

Thanks,
steve
Jul 18 '05 #1
3 2779
In article <ma********************************@python.org>,
"Steven D. Arnold" <st*****@neosynapse.net> wrote:
I'm on Mac OS X 10.2.6, using Python 2.3final. I would like to use the dl
module to get access to some system calls, in particular kvm_getprocs.
However, when I try to import dl at the Python command-line, it tells me it
couldn't find the module.

It would seem I have to do something special to get dl to build on my
machine. Does anyone know what that would be? Or is there some other
problem that prevents this from working?

Alternatively, does anyone know what else I could do to get at those calls?
Perhaps I could try SWIG, but that seems like a hassle compared to dl.


I've never heard of the "dl" module, and Python definitely come with
such a module by default. That said, look for ctypes, it sounds like it
does what you want. By the way, if you used the binary Python.framework
installer, you should have an app called "PackageManager" in
/Application/MacPython-2.3. Then use Bob Ippolito's package repository,
it contains ctypes (see http://www.python.org/packman/). That should
save you the trouble of having to build ctypes yourself.

Just
Jul 18 '05 #2
Just <ju**@xs4all.nl> writes:
In article <ma********************************@python.org>, [...] I've never heard of the "dl" module, and Python definitely come with
such a module by default. That said, look for ctypes, it sounds like it

[...]

It's a unix-only dlopen wrapper, part of Python standard library.
John
Jul 18 '05 #3
In article <87************@pobox.com>, jj*@pobox.com (John J. Lee)
wrote:
Just <ju**@xs4all.nl> writes:
In article <ma********************************@python.org>,

[...]
I've never heard of the "dl" module, and Python definitely come with
such a module by default. That said, look for ctypes, it sounds like it

[...]

It's a unix-only dlopen wrapper, part of Python standard library.


Ah, interesting. In that case it could probably be made to work on
MacOSX as well: there's a dlopen emulation for OSX, ctypes uses that if
I recall correctly.

Just
Jul 18 '05 #4

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

Similar topics

0
by: Alan Little | last post by:
I can't import MySQLdb on OS X 10.2.6 Downloaded the package from sourceforge, got it to build after some messing about with setup.py, and now I have _mysql.so and all its little friends in...
0
by: Skip Montanaro | last post by:
I downloaded and built Object Craft's Sybase module but can't import it: % PYTHONSTARTUP= python Python 2.4a0 (#4, Mar 31 2004, 15:02:21) on sunos5 Type "help", "copyright", "credits" or...
3
by: Phd | last post by:
Hi, I'm using python 2.2, I want to import a module by referring to its relative location. The reason for this is that there is another module with the same name that's already in pythonpath(...
0
by: nonamehkg | last post by:
Hi all, I have found that I can't import modules in ASP (python) and those modules are in the same directory. I can surely do that with a ..py file but not in ASP. I have noticed the currently...
2
by: denny | last post by:
Hello, rookie here. I'm trying to import a module at runtime using variables to specify which module, and which functions to execute. for example: mStr = "sys" fStr = "exit" # load mod...
11
by: Jim | last post by:
Hi, I have created an import module. And would like to access a function from the main script, e.g., file abc.py: ################### def a(): m() return None
3
by: archaegeo | last post by:
I am getting started in Python, and I have looked on both the stackless page and python.org and cannot find the answer to what I think is a simple problem. If I start the python command line or...
3
by: yinglcs | last post by:
Hi, i have 2 python files in *different directory* , how can I import python functions from 1 python file to another? i get this error: import task ImportError: No module named task/ Thank...
0
by: PhongPham | last post by:
I used environment on Fedora core 6 and tried with python 2.5.2 package on board chip mips and platform 2.6 is ok (although when "make" still have error: "/bin/sh: line 2: ./python: cannot...
1
tharden3
by: tharden3 | last post by:
Is there somewhere I can pull a module with the English dictionary in it? I'm trying to make a simple intelligence program that can pick apart language and sentences.
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.