No, nothing changed ?

Justin Israel wrote:

Did your script name just change since the last example you gave?


On Mon, 26 Oct 2015 8:19 AM Christopher. <[email protected] <mailto:[email protected]>> wrote:

    Same error, No module named; SuperScript.SuperScript (Package \
    Script name)

    On Sunday, October 25, 2015 at 2:46:03 PM UTC-4, Justin Israel wrote:


        On Mon, 26 Oct 2015 4:30 AM Christopher.
        <[email protected]> wrote:

            I followed the instructions you posted and I got an error;

                #Error: ImportError: No module name
                SuperScript.MySuperScript.py
                <http://SuperScript.MySuperScript.py> #




        Get rid of the .py part of that import command. You only use
        the names of the files without extensions.

        import SuperScript.MySuperScript

            Yes there is a directory or package called SuperScript,
            and yes there is a file called MySuperScript.py located in
            the directory / package.

            On Sunday, October 25, 2015 at 3:16:52 AM UTC-4, Justin
            Israel wrote:


                On Sun, 25 Oct 2015 4:15 PM Crest Christopher
                <[email protected]> wrote:

                    The script calls to be executed as such;
                    Superscript.ui() ?

                No. "Superscript" is the name of the package
                (directory). Then you have some module which is the
                name of your file. So if you file is called myFile.py,
                then you do

                import Superscript.myFile
                Superscript.myFile.ui()


                    AK Eric wrote:


                        tl;dnr this whole thread.  But you'd need to:

                        import SuperScript.myModule

                        SuperScript.myModule.myFunc()

                        That's executing the myFunc function in the
                        my myModule.py module living under
                        /SuperScript dir.

                        x:/../../pythonscripts/SuperScript/myModule.py

                        Generally, I don't often put any code in the
                        __init__.py  (I do occasionally for very
                        specific reasons).  In general they're just
                        there to get your package paths setup right,
                        so you can import everything correctly without
                        any fuss.

--
                        You received this message because you are
                        subscribed to a topic in the Google Groups
                        "Python Programming for Autodesk Maya" group.
                        To unsubscribe from this topic, visit
                        
https://groups.google.com/d/topic/python_inside_maya/8SgJdsUZ0b8/unsubscribe.
                        To unsubscribe from this group and all its
                        topics, send an email to
                        [email protected].


                        To view this discussion on the web visit
                        
https://groups.google.com/d/msgid/python_inside_maya/c0949574-6c1c-43a8-9429-263e5b5b1649%40googlegroups.com
                        
<https://groups.google.com/d/msgid/python_inside_maya/c0949574-6c1c-43a8-9429-263e5b5b1649%40googlegroups.com?utm_medium=email&utm_source=footer>.
                        For more options, visit
                        https://groups.google.com/d/optout.



-- 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
                    [email protected].
                    To view this discussion on the web visit
                    
https://groups.google.com/d/msgid/python_inside_maya/562C495E.8050405%40gmail.com
                    
<https://groups.google.com/d/msgid/python_inside_maya/562C495E.8050405%40gmail.com?utm_medium=email&utm_source=footer>.
                    For more options, visit
                    https://groups.google.com/d/optout.



-- 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
            [email protected].
            To view this discussion on the web visit
            
https://groups.google.com/d/msgid/python_inside_maya/805c2316-459c-43cd-a600-63073011d205%40googlegroups.com
            
<https://groups.google.com/d/msgid/python_inside_maya/805c2316-459c-43cd-a600-63073011d205%40googlegroups.com?utm_medium=email&utm_source=footer>.
            For more options, visit https://groups.google.com/d/optout.


-- 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 [email protected]
    <mailto:[email protected]>.
    To view this discussion on the web visit
    
https://groups.google.com/d/msgid/python_inside_maya/08b6c6b3-fb8b-4ef4-acf9-8e9f40df2f3d%40googlegroups.com
    
<https://groups.google.com/d/msgid/python_inside_maya/08b6c6b3-fb8b-4ef4-acf9-8e9f40df2f3d%40googlegroups.com?utm_medium=email&utm_source=footer>.
    For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/8SgJdsUZ0b8/unsubscribe. To unsubscribe from this group and all its topics, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1QpU6vRjjsToTuhV7aQQufqZ2omEXhnkg-N6CKQUrN8Q%40mail.gmail.com <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1QpU6vRjjsToTuhV7aQQufqZ2omEXhnkg-N6CKQUrN8Q%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/562D3388.3010408%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to