[issue2470] Need fixer for dl (removed) -> ctypes module

2021-10-20 Thread Irit Katriel


Change by Irit Katriel :


--
resolution: duplicate -> wont fix

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2470] Need fixer for dl (removed) -> ctypes module

2021-10-20 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2470] Need fixer for dl (removed) - ctypes module

2012-04-19 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

Being open for four years, this is hardly critical.

--
priority: critical - normal

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2470
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2470] Need fixer for dl (removed) - ctypes module

2011-10-24 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

for the RTLD_ constants, refer to issue #13226.

--
nosy: +flox

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2470
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2470] Need fixer for dl (removed) - ctypes module

2010-05-29 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
stage:  - needs patch
type:  - feature request

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2470
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2470] Need fixer for dl (removed) - ctypes module

2008-08-07 Thread Thomas Heller

Thomas Heller [EMAIL PROTECTED] added the comment:

I can review and try out the fixer if someone provides a patch.  OTOH I
have never used the dl module.

Note that dl exposed a lot of RTLD_ constants that ctypes does not yet,
so there should be a patch for ctypes also.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2470
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2470] Need fixer for dl (removed) - ctypes module

2008-08-04 Thread Nick Edds

Nick Edds [EMAIL PROTECTED] added the comment:

If nobody else is interested in or currently in the process of making a
fixer for this, I can do it. I'm not sure if I completely understand the
changes I need to make though. Importing dl needs to be replaced by
importing ctypes, calls to dl.open() need to be replaced by calls to
ctypes.CDLL(), and calls to call() from an open dl object need to be
replaced to calls to funcname, where funcname is the first argument to
call(). Also, any strings in the other arguments should be preceded with
b to make them byte objects. Is this all that needs doing or am I
missing something else? Are there more complicated cases that I should
also take into account?

--
nosy: +nedds

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2470
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2470] Need fixer for dl (removed) - ctypes module

2008-08-04 Thread Collin Winter

Collin Winter [EMAIL PROTECTED] added the comment:

I'd prefer it if someone better-versed in ctypes/dl wrote this fixer (or
at the very least, someone with access to Windows to test the translation).

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2470
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2470] Need fixer for dl (removed) - ctypes module

2008-07-30 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

What's the status of this?

--
nosy: +benjamin.peterson

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2470
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2470] Need fixer for dl (removed) - ctypes module

2008-03-25 Thread Thomas Heller

Thomas Heller [EMAIL PROTECTED] added the comment:

 In the simplest case, convert
 
 import dl
 libc = dl.open(libc.so.6)
 iconv = libc.call(iconv_open, ISO-8859-1, ISO-8859-2)
 print(iconv)
 
 to
 
 import ctypes
 libc = ctypes.CDLL(libc.so.6)
 iconv = libc.iconv_open(ISO-8859-1, ISO-8859-2)
 print(iconv)
 
 Notice that dlobject.call has up to 11 arguments, the first one being
 the function name.
 
 Thomas, is it the case that all calls to dl.call can be converted to a
 ctypes call without parameter conversion? dl supports these parameter
 types:
 - byte string, passed as char*
 - integers, passed as int
 - None, passed as NULL

Yes, this is correct.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2470
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2470] Need fixer for dl (removed) - ctypes module

2008-03-25 Thread Thomas Heller

Thomas Heller [EMAIL PROTECTED] added the comment:

Thomas Heller schrieb:
 Thomas Heller [EMAIL PROTECTED] added the comment:
 
 In the simplest case, convert
 
 import dl
 libc = dl.open(libc.so.6)
 iconv = libc.call(iconv_open, ISO-8859-1, ISO-8859-2)
 print(iconv)
 
 to
 
 import ctypes
 libc = ctypes.CDLL(libc.so.6)
 iconv = libc.iconv_open(ISO-8859-1, ISO-8859-2)
 print(iconv)
 

Currently, in py3k, ctypes only passed bytes objects as char*; so
the strings should be translated to bytes literals:

import ctypes
libc = ctypes.CDLL(libc.so.6)
iconv = libc.iconv_open(bISO-8859-1, bISO-8859-2)
#   ^  ^
print(iconv)

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2470
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2470] Need fixer for dl (removed) - ctypes module

2008-03-24 Thread Neal Norwitz

New submission from Neal Norwitz [EMAIL PROTECTED]:

r61837 removed the dl module.  It needs a 2to3 fixer written to use ctypes.

--
assignee: collinwinter
components: 2to3 (2.x to 3.0 conversion tool)
messages: 64394
nosy: collinwinter, nnorwitz
priority: critical
severity: normal
status: open
title: Need fixer for dl (removed) - ctypes module

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2470
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2470] Need fixer for dl (removed) - ctypes module

2008-03-24 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

Is it possible to write one? I'm skeptical.

--
nosy: +loewis

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2470
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2470] Need fixer for dl (removed) - ctypes module

2008-03-24 Thread Collin Winter

Collin Winter [EMAIL PROTECTED] added the comment:

Can you list the mapping you'd like to see? I've never used dl or
ctypes, so I'm not immediately sure how to port from one to the other.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2470
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2470] Need fixer for dl (removed) - ctypes module

2008-03-24 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

In the simplest case, convert

import dl
libc = dl.open(libc.so.6)
iconv = libc.call(iconv_open, ISO-8859-1, ISO-8859-2)
print(iconv)

to

import ctypes
libc = ctypes.CDLL(libc.so.6)
iconv = libc.iconv_open(ISO-8859-1, ISO-8859-2)
print(iconv)

Notice that dlobject.call has up to 11 arguments, the first one being
the function name.

Thomas, is it the case that all calls to dl.call can be converted to a
ctypes call without parameter conversion? dl supports these parameter
types:
- byte string, passed as char*
- integers, passed as int
- None, passed as NULL

--
nosy: +theller

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2470
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com