コード例 #1
0
ファイル: test.py プロジェクト: vmuriart/python-c-extension
#!/usr/bin/env python3

import helloworld

print(helloworld.hello());
print(helloworld.heyman(5, "StarNight"));
print(helloworld.add(5, 6));
help(helloworld);
コード例 #2
0
ファイル: test.py プロジェクト: guidanoli/pythoncapi
#!/usr/bin/env python

import platform

print("This is Python " + platform.python_version());

import helloworld

a = 32
b = 10
print("%d + %d = %d" % (a, b, helloworld.add(a, b)));
print("%d - %d = %d" % (a, b, helloworld.sub(a, b)));
print("%d * %d = %d" % (a, b, helloworld.mul(a, b)));
print("%f / %f = %f" % (a, b, helloworld.div(a, b)));
コード例 #3
0
# 调用helloworld文件模块
import helloworld
print('调用成功,输出')
print(helloworld.add(100, 300))
コード例 #4
0
ファイル: test.py プロジェクト: grisam-s/CPythonWrapper
#!/usr/bin/python
import helloworld

print helloworld.helloworld()
helloworld.add(23)
コード例 #5
0
def test_add():
    assert (helloworld.add(1, 1) == 2)