Skip to content

Instantly share code, notes, and snippets.

View jrivany's full-sized avatar

Justin Ivany jrivany

  • REDSpace
  • Halifax, NS
View GitHub Profile
@jrivany
jrivany / fix_nif.py
Last active December 23, 2019 22:29
#!/usr/bin/env python
import argparse, re, os
from pyffi.formats.nif import NifFormat
def process_dir(dir, is_dryrun):
file_changed = False
for stream, data in NifFormat.walkData(args.dir):
try:
# the replace call makes the doctest also pass on windows
os_path = stream.name