Ah well, hope this is correct but I appear to be able to do that check like 
this:

#Name starts with scene name.
re.match( name , filename , flags=0 )

#Scene has same extension
os.path.splitext( filename )[1] == ext

#Padding and prefix lengths match
re.search( r'%s%s%s\.' % ( seperator , '\w'*prefix , '\d'*padding ) , filename 
, flags=0 )

#Prefix name matches
name = filename.rfind('.')
Pa = 3 # length of padding
Pr = 1 # length of prefix
name[ name - ( Pa + Pr ) : name - Pa ] == prefix

  Feels a lot more 'lightweight' but please shout back with comments, I have no 
idea if I'm using python expressionism right or not :)

-- 
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 post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to