Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- martin@pc:~/python_test$ cat test.py
- from datetime import datetime
- def wtf(cas):
- print "Je %s hodin." % cas
- hodiny = datetime.now().strftime('%H:%M:%S')
- wtf(hodiny)
- martin@pc:~/python_test$ python test.py
- Je 11:36:52 hodin.
- martin@pc:~/python_test$
- martin@pc:~/python_test$ cython --embed test.py
- martin@pc:~/python_test$
- martin@pc:~/python_test$ gcc test.c -I/usr/include/python2.7 -lpython2.7 -o test
- martin@pc:~/python_test$
- martin@pc:~/python_test$ ./test
- Je 11:37:15 hodin.
- martin@pc:~/python_test$
- martin@pc:~/python_test$ ldd test
- linux-vdso.so.1 => (0x00007ffd15fb9000)
- libpython2.7.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 (0x00007f3def0f9000)
- libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3deed2f000)
- libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3deeb10000)
- libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f3dee8f6000)
- libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f3dee6f2000)
- libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f3dee4ee000)
- libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3dee1e6000)
- /lib64/ld-linux-x86-64.so.2 (0x0000563df79ed000)
- martin@pc:~/python_test$
- martin@pc:~/python_test$
- martin@pc:~/python_test$ ls -lh
- celkem 160K
- -rwxrwxr-x 1 martin martin 43K lis 27 11:37 test
- -rw-rw-r-- 1 martin martin 112K lis 27 11:37 test.c
- -rw-rw-r-- 1 martin martin 134 lis 27 11:33 test.py
- martin@pc:~/python_test$
Advertisement
Add Comment
Please, Sign In to add comment