Getting the name of current module

Andrej Mitrovic andrej.mitrovich at gmail.com
Thu Aug 26 16:09:48 PDT 2010


import Python
dir()

etc.. :)

I want more reflection as well, it's plenty of fun.

On Fri, Aug 27, 2010 at 12:13 AM, Philippe Sigaud
<philippe.sigaud at gmail.com> wrote:
>
>
> On Thu, Aug 26, 2010 at 22:37, bearophile <bearophileHUGS at lycos.com> wrote:
>>
>> Philippe Sigaud:
>> > does anyone of you know a way to get the name of the current module at
>> > compile-time?
>>
>> It's one of the missing pieces of the static reflection:
>> __traits(thisModuleName)
>>
> I want this to return an expression tuple with all the package / module
> hierarchy:  "std", "stdio". That way, I can easily find the package name
>


More information about the Digitalmars-d mailing list