@Nullable public static List<String> extractFromScript(@NotNull VirtualFile script) throws IOException {
  String text=VfsUtil.loadText(script);
  Pattern pat=Pattern.compile("(?:^\\s*(['\"])(.*)(\\1),\\s*$)|(\\])",Pattern.MULTILINE);
  final String bait_string="sys.path[0:0]";
  int pos=text.indexOf(bait_string);
  List<String> ret=null;
  if (pos >= 0) {
    pos+=bait_string.length();
    Matcher scanner=pat.matcher(text);
    while (scanner.find(pos)) {
      String value=scanner.group(2);
      if (value != null) {
        if (ret == null) {
          ret=new ArrayList<String>();
        }
        ret.add(value);
        pos=scanner.end();
      }
 else {
        break;
      }
    }
  }
  return ret;
}

@ Nullable public static List < String > extractFromScript ( @ NotNull VirtualFile script ) throws IOException { String text = VfsUtil . loadText ( script ) ; Pattern pat = Pattern . compile ( "(?:^\\s*(['\"])(.*)(\\1),\\s*$)|(\\])" , Pattern . MULTILINE ) ; final String bait_string = "sys.path[0:0]" ; int pos = text . indexOf ( bait_string ) ; List < String > ret = null ; if ( pos >= 0 ) { pos += bait_string . length ( ) ; Matcher scanner = pat . matcher ( text ) ; while ( scanner . find ( pos ) ) { String value = scanner . group ( 2 ) ; if ( value != null ) { if ( ret == null ) { ret = new ArrayList < String > ( ) ; } ret . add ( value ) ; pos = scanner . end ( ) ; } else { break ; } } } return ret ; }
extracts paths from given script , assuming sys . path [ 0 : 0 ] assignment .
