[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: How to get current module object

Gabriel Genellina

2/18/2008 8:09:00 PM

En Mon, 18 Feb 2008 14:49:02 -0200, Alex <noname9968@gmail.com> escribió:
> Gabriel Genellina wrote:

> That's what I've been searching for, thanks. By the way, I know it might
> be trivial question... but function and class namespaces have __name__
> attribute too. Why is global one always returned?

I don't understand the question (even with the later correction
namespaces->objects)

>> Why do you want to get the module object? globals() returns the module
>> namespace, its __dict__, perhaps its only useful attribute...
> To pass it as a parameter to a function (in another module), so it can
> work with several modules ("plugins" for main program) in a similar
> manner.

The function could receive a namespace to work with (a dictionary). Then
you just call it with globals() == the namespace of the calling module.

--
Gabriel Genellina

1 Answer

The Revd

4/2/2014 12:55:00 PM

0

On Sun, 30 Mar 2014 11:19:13 -0700, "Michael Ejercito"
<mejercit@hotmail.com> wrote:

>
>
>"The Revd" wrote in message
>news:0fjgj99e0a61dt5g4thrlsktnv0ejqspp6@4ax.com...
>
>>On Sun, 30 Mar 2014 09:40:09 -0700, "Michael Ejercito"
>><mejercit@hotmail.com> wrote:
>
>>>
>>>
>>>"The Revd" wrote in message
>>>news:d72gj9pegcshbdhv2pialptrdqi8ihri58@4ax.com...
>>>
>>>>On Sat, 29 Mar 2014 21:28:51 -0700, "Michael Ejercito"
>>>><mejercit@hotmail.com> wrote:
>>>
>>>>> There you go again,. bringing up his rectum.
>>>
>>>>There you go again, sucking his fat jew rectum.
>>> I suck no rectums.
>
>>You DO.
> No, I do not, you mangina.

Yes, you DO, you craven gook anilinguist!

> The following ballad was dedicated to you.

Ballad? You call that a ballad??? THIS is a ballad:

Oh my ferm dum the dugger is a gleektee glackten gee-gee.
A gleektee glackten gee-gee
A gleektee glackten gee-gee
Yes my ferm dum the dugger is a gleektee glackten gee-gee.
In the morning when I rise I say the Shema out loud,
Of this Hebrew prayer I?m so very proud,
Because my ferm dum the dugger is a gleektee glackten gee-gee.
A gleektee glackten gee-gee
A gleektee glackten gee-gee
When I walk down the street all the ladies say with pride,
On top of me humping I?d like to feel his hide.
Because my ferm dum the dugger is a gleektee glackten gee-gee.
A gleektee glackten gee-gee
A gleektee glackten gee-gee is my ferm dum the dugger.