ekbpy'2012 - Марк Коренберг - Системное программирование на...
TRANSCRIPT
- 1.
2.
- -
3. 4. , 5. bleeding-edge 6. . - , . , : BASH Python UNIT- --- ++ +++ --- - +++ + --- ++++ + ++ ++ --- +++ +++ --- ++ +++ --- +++ ++++ +++ --- +++ ++ +++ + -- ? ++ + -- +++ upstream --- ++ ++++ ,lint, indent --- +++ +++ 7. BASH C Python + +++ ++ + +++ +++ + ++ +++ eventloop - +++ +++ (threads) - +++ ++ RPC - ++ +++ + +++ +++ - - +++ - - +++ Monkey-patching - - +++ - ++ +++ : :
- UI
8. 9. 10. 11. 12. Python
13. 14. 15. BASH 16. BASH
- ,
17. - grep,sed,awk 18. 19. 20. 21. , IDE 22. :)
23. 24. 25. ?
- ipython, eclipse, pydev, pycharm ...
26. Tornado, json, XML, YAML, 27. ldap, dbus 28. sqlite 29. Pickle, , , 30. multiprocessing, threads, 31. pyudev, pyparted, augeas, pylibpci 32. shutil, sys, os, re 33. logging 34. sphinx 35. pip (!) 36. over 9000... 37. ...
38. . ;) 39. :
- ( ctypes)
40. pure-python 41. 42. API 43. 44. 45. RTFS : 46.
- pure-python
47. subprocess 48. 49. ! 50.
51. , . 52. API . ? PyObject * my_sync (PyObject *, PyObject *) { sync (); Py_RETURN_NONE; } 53. PyObject*my_pipe2( PyObject* self ,PyObject* args ) { intflags= 0 ; intfds [ 2 ]; PyObject* ret ; if (! PyArg_ParseTuple( args , "|I" , & flags )) returnNULL ; if ( pipe2( fds ,flags ) == - 1 ) returnPyErr_SetFromErrno( PyExc_OSError ); if (!( ret=Py_BuildValue( "(II)" ,fds [ 0 ],fds [ 1 ]))) { close( fds [ 0 ]); close( fds [ 1 ]); returnNULL ; } returnret ; } 54. -
- _/
55.
- _/
56. BASH
- _/
57. 58.
59. ( systemd rc.sysinit) 60. Networkmanager 61. 62. 63. 64. ( ) 65. ?