Advertisement
yaotungyu

cog fixed

Nov 23rd, 2020
1,470
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.90 KB | None | 0 0
  1. shots =  ['RBGB_999_010_400', 'RBGB_999_010_410', 'RBGB_999_010_440B', 'RBGB_999_010_450', 'RBGB_999_010_470', 'RBGB_999_010_480', 'RBGB_999_010_490', 'RBGB_999_010_500', 'RBGB_999_010_560', 'RBGB_999_010_570', 'RBGB_999_010_590', 'RBGB_999_010_600', 'RBGB_999_010_610', 'RBGB_999_010_660', 'RBGB_999_010_670', 'RBGB_999_010_680', 'RBGB_999_010_700', 'RBGB_999_010_710', 'RBGB_999_010_730', 'RBGB_999_010_770', 'RBGB_999_010_820']
  2. import sf_pipe_test as sf
  3. sf.openLatestAnimPub(shot_code=shots[0])
  4.  
  5. import shutil
  6. import os
  7. for a in shots:
  8.     cog_dit = 'Y:/RBGB/episodes/999/shots/{}/pipeline/COG_locators'.format(a)
  9.     max_cog_size = max([os.stat(cog_dit+'/'+i).st_size for i in os.listdir(cog_dit)])
  10.     for cog_f in [cog_dit+'/'+i for i in os.listdir(cog_dit) if os.stat(cog_dit+'/'+i).st_size <max_cog_size]:
  11.         os.remove(cog_f)
  12.  
  13. os.stat(cog_dit+'/'+'RBGB_999_010_900_v0012.abc').st_size <max_cog_size
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement