On Thu, 11 Nov 2021, 12:55 am Rudi Hammad, <rudiham...@gmail.com> wrote:

> in other words, get the result in foo.py that you get when you run
> globals() in maya's script editor.
>

You can reference what I am going in the MayaSublime project. I import
__main__ and access __main__.__dict__ for the globals as you would see them
in the script editor

https://github.com/justinfx/MayaSublime/blob/master/MayaSublime.py#L289


> El miércoles, 10 de noviembre de 2021 a las 12:52:29 UTC+1, Rudi Hammad
> escribió:
>
>> of course, in foo.py you get the module's global, and in maya's script
>> editor you see maya's.
>> So I was wondering if you can query maya's globals (or locals) from an
>> other foo.py.
>> I know, it is a strange question.
>>
>> El miércoles, 10 de noviembre de 2021 a las 12:24:52 UTC+1, Marcus
>> Ottosson escribió:
>>
>>> Global variables are.. global, so anything present in `globals()` from
>>> one module is present in another. Are you seeing different results from
>>> `globals()` in `foo.py` versus Maya's interpreter (by which I assume you
>>> mean the Script Editor)?
>>>
>>> On Wed, 10 Nov 2021 at 09:36, Rudi Hammad <rudih...@gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> I was wondering if it is possible to get the globals variables running
>>>> in maya but from another script.
>>>> For instance say you have a module foo.py. Can you use get all maya's
>>>> globals as if you were running 'globals()' withing maya's interpreter?
>>>>
>>>> thx,
>>>>
>>>> T
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Python Programming for Autodesk Maya" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to python_inside_m...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/python_inside_maya/46ad99b5-42d5-40dd-ba99-74b546516426n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/python_inside_maya/46ad99b5-42d5-40dd-ba99-74b546516426n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/5857d0a2-3851-4ae5-b43f-201bfadf9aafn%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/5857d0a2-3851-4ae5-b43f-201bfadf9aafn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0SYGaOoLtUhsqU_sO-bMd09Ug3jMtChdOygqQfMbZZ2g%40mail.gmail.com.

Reply via email to