Prothon 0.1.2 is getting close to Alpha [Prothon]

Ben ben at transversal.com
Tue Jul 13 04:19:43 EDT 2004


Mark Hahn wrote:

> Ben wrote:
> 
>> As a user of Python who is very interested in Prothon this point is
>> very important to me. Thinking about this, does Prothon have a
>> mechanism similar to Pythons import hooks, so in a Prothon program
>> you could do somthing like
>>
>> import python
>>
>> and then be able to import python modules natively. (With automatic
>> translation of the builtin types). e.g
>>
>> import python
>> import urllib2
>> ...
>>
>>
>> This would greatly increase the uptake and people would be able to
>> play around with prothon using libraries that already have and
>> understand?
> 
> Unfortunately Prothon objects are very different than Python's internally
> so
> automatic translation of libraries will probably never be possible. 
> Prothon
> was never intended to be compatible with Python.  Prothon "steals" most of
> Python but is not compatible, just like Python 3 will not be.
> 
> There will probably be library equivalents that are close enough to make
> porting quite easy though.  The current re library is a good example.  It
> is
> compatible.  Also the Prothon sqlite library uses the Python db protocol.

Could it not be done in a similar manner to LunaticPython
(https://moin.conectiva.com.br/LunaticPython), only slightly more
integrated, so that method calls on prothon objects are simply forwarded to
the equivalent python calls? It should be possible to write a forwarding
proxy, I was just wondering about the import hooks part, so that if a .py
file is found instead of a .pr, the proxying can be invoked.

Anyway, its not that important. Just a suggestion I had.

Cheers,

Ben
---



More information about the Python-list mailing list