Help! Python doesnt work for me

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  06 June 2013
Help! Python doesnt work for me

Hi guys apologies if i posted this twice,

Anyways I recently i have decided to learn the amazing python for my job as a character rigger and td.
i know a little bit of Mel already. anyways was excited to learn it, hence "was"

i was following a tutorial by Jeremy Ernst who takes you through making UI's in Maya with Python.
I have watched the first tutorial of the series a few times to make sure my code was the same.
and after saving it in the documents/maya/scripts folder.

I load up maya and try to boot up my new script i which have used wings IDE trial to make.
i select the Python tab and make sure the method is set to Python.
I click execute

Nothing! window does not appear??
no errors, no parsing errors or syntax
absolutely nothing happens.

so i figure the the tutorial is old, and I am using a newer version of Maya 2014, so i download the trial 2011 that the instructor Jeremy is using,

Nothing!!?? again!

i cant seem to find anything in the plug in manager that needs to be enabled, i cant seem to find anybody with the same problem. the script manager is not picking up errors. Python is installed. but no ones home so to speak....and yes i have tried turning it on and off again
anyways if somebody could help me out here i would sincerely appreciate it

__________________________________________________ ______________________

import maya.cmds as cmds

def UI():

#check to see if your window exists
if cmds.window("exampleUI", exists = True):

#create our window
window = cmds.window("exampleUI", title = "Example UI", w = 300, h = 300, mnb = False, mxb = False, sizeable = False)

#show window


import exampleUI
reload(example UI)
  06 June 2013
Thumbs up Resolved

Hey guys i reinstalled my Maya the python module is importing external scripts, if anybody ever comes across this i recommend just rebooting your program.

cheer anywho
  06 June 2013
Stop working

again its stopped working

i was so happy the UI came up, but now running the exact same script, and nothing again :(

anyone know how to help me?
  06 June 2013
Ok Resolved

shout out to another dude on the CC forum, who helped me resolve this issue

I had to change the
if cmds.window("exampleUI", exists = True):

*to exist = False):

anywho cheers

  06 June 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 09:17 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.