Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ease-dev] Python module loading

To clarify,

I would vote e:

import eclipse.platform
etc.

and

from eclipse import *

Jonah

~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com

On 5 July 2017 at 10:43, Jonah Graham <jonah@xxxxxxxxxxxxxxxx> wrote:
HI Christian,

Sounds good. 

Only caveat I would say is to think a little about namespaces. Python does not have full reverse dns namespaces as standard, but, especially with input hooks, containing the namespace to something like ease.* would surprise users less. Annoyingly, "ease" has already been claimed, but the project looks pretty defunct (last upload 4 years ago)[1]. I would stake a claim on "eclipse" as pypi has no project called eclipse as of yet.


Jonah

~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com

On 5 July 2017 at 10:25, Christian Pontesegger <christian.pontesegger@xxxxxx> wrote:
Hi devs,

today I played a little with python import hooks to see how we can make module loading more python like for EASE developers.

It is relatively simple to use import statements instead of loadModule. Now I am reaching out to you python developers to ask how we should organize namespaces here:

instead of

    loadModule("/Platform/Resources")

we could use

a) import Platform.Resources
b) import EASE.Platform.Resources
c) import Eclipse.EASE.Platform.Resources
d) import Eclipse.Platform.Resources
e) ???

What would be a good python-style package name?

We could also think if we allow to import multiple modules at once, eg

    from Platform import *  # loads Resources modules and all other modules from the Platform category


let me know your thoughts

Christian

_______________________________________________
ease-dev mailing list
ease-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ease-dev



Back to the top