-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathpytest.py
31 lines (28 loc) · 1.35 KB
/
pytest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2014 Arming lee <[email protected]>
#
# Distributed under terms of the MIT license.
"""
"""
import os
import getmethods
def iterate_dir(framework, prefix, path):
files = []
for f in os.listdir(path):
if os.path.isfile(os.path.join(path, f)):
files.append((framework, prefix+f, os.path.join(path, f)))
elif os.path.isdir(os.path.join(path, f)):
files += iterate_dir(framework, prefix+f+"/", os.path.join(path, f))
return files
if __name__ == "__main__":
#print iterate_dir("framework", "", "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers")
with open("./UIColor.h") as f:
text = f.read()
#nocomments = getmethods.remove_comments(text)
#noclass = getmethods.remove_objc(nocomments)
print getmethods.remove_objc(text)
print noclass
#print getmethods.extract(text)