Re: Re: porting unittest.py to Prothon.
"Mark Hahn" <[email protected]> Tue, 22 Jun 2004 16:47:10 -0700
| Newsgroups | gmane.comp.lang.prothon.devel |
|---|---|
| Message-ID | <[email protected]> |
Serge Orlov wrote:
> ==========================================================
> I'm trying to port unittest.py to Prothon and I've encountered
> bug #37. I've tested it on the stable release too, it's present
> there. I can work around it but it's blocking a lot of fun.
> If you fix it, please make a Windows binary interim release.
I will work on the bug list today.
> I'm also not getting any notifications from bugzilla, is it OK?
You won't get any until some status changes when I do something.
> ==========================================================
>
>
>>> 4. What is the status of "from Module import xxx"?
>
>> It used to work. Did you try it?
>
> Yes:
>
> ===========================================================
>>> from os import *
>
> Parse Error: expecting `LABEL'
> --- col: 17
>
> Uncaught exception:
> Parse Error, O>>
I intentionally removed " from os import *" from Prothon. I considered it a
bad feature in Python. Feel free to argue.
>>> from os import system
>
> Uncaught exception:
> --- File: fromosimportsystem-src.txt, line: 2, char: 1
> Program Error, No main module set for importing.
This is a problem with the console. I will fix this.
> I've come up with a hack:
> import pyCompat
> pyCompat.exportNames("*")
>
> I called it a hack because messing with stack is considered
> a quick hack in Python. But after I used it for a while I
> realized:
> 1. I doesn't feel like like hack using caller :)
> 2. It provides more functionality then "from X import *"
> a. I don't want to override existing objects like range(),
> "from X import *" doesn't let me control it.
> b. I can implement .exportFewerNames() because I'm going
> to play with the idea of incremental removing of
> Python functionality from the ported module.
Can you post the code?