Love how many ways Maya/Pymel includes to solve a problem!  It's a bit more 
verbose and seems to have some paths it might not go down (did you find it 
was actually going to the error catching section?) but if it works for you, 
that's great.

Just a tip, there's a few I could mention but this was the most glaring:
As a general rule you should always specify what errors you're expecting in 
the except section so you don't confuse yourself down the line depending on 
what input you pass.  It tends to be a bad design paradigm!

On Sunday, July 23, 2017 at 11:43:35 AM UTC-4, gnn wrote:
>
> Thanks a lot Andes for your answer,
> I'd done like that, it's working now :)
>
> unLoaded_ref_files=[]
> refList = pm.ls(type='reference')
> for ref in refList:
>     try:
>         if ref.isLoaded():
>             print ref
>         else:
>             refUnloaded="{}".format(ref)
>             print "{} IS NOT LOADED".format(ref)
>             unLoaded_ref_files.append(refUnloaded)
>     except:
>         print "FAILED with {}".format(ref)
>
>
>

-- 
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/e3b8b156-6a61-43f1-980e-4920fb5c9dab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to