mirror of https://github.com/Chizi123/.emacs.d.git

Chizi123
2018-11-18 76bbd07de7add0f9d13c6914f158d19630fe2f62
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
;ELC
;;; Compiled
;;; in Emacs version 26.1
;;; with all optimizations.
 
;;; This file uses dynamic docstrings, first added in Emacs 19.29.
 
;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 
(byte-code "\300\301!\210\302\303\304\"\207" [require ob add-to-list org-babel-tangle-lang-exts ("python" . "py")] 3)
(defvar org-babel-default-header-args:python nil)
(byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313\314\315& \210\300\316\302\303\317DD\320\312\313\306\307\310\321\314\322& \210\300\323\302\303\324DD\325\312\313\306\307\310\326\314\315& \210\300\327\302\303\330DD\331\312\313\306\307\310\332\314\322& \207" [custom-declare-variable org-babel-python-command funcall function #[0 "\300\207" [#1="python"] 1 #1#] "Name of the command for executing Python code." :version "24.4" :package-version (Org . "8.0") :group org-babel :type string org-babel-python-mode #[0 "\300\301!\203\301\207\302\207" [featurep python-mode python] 2] "Preferred python mode for use in running python interactively.\nThis will typically be either `python' or `python-mode'." (Org . "8.0") symbol org-babel-python-hline-to #[0 "\300\207" [#2="None"] 1 #2#] "Replace hlines in incoming tables with this when translating to python." (Org . "8.0") org-babel-python-None-to #[0 "\300\207" [hline] 1] "Replace `None' in python tables with this before returning." (Org . "8.0")] 12)
#@120 Execute a block of Python code with Babel.
This function is called by `org-babel-execute-src-block'.
 
(fn BODY PARAMS)
(defalias 'org-babel-execute:python #[514 "\301\236A\206\302\303\236A!\304\236A\305\236A\211\306=\205&?\205&\307\236A\310\236A\311\2038\312\313\"\2029\314P\315    !#\316%\317\320\321 \236A\322\f\236A\"\320\323\f\236A\324 \236A\"#)\207" [org-babel-python-command :python org-babel-python-initiate-session :session :result-params :result-type value :return :preamble org-babel-expand-body:generic format "\nreturn %s" "" org-babel-variable-assignments:python org-babel-python-evaluate org-babel-reassemble-table org-babel-pick-name :colname-names :colnames :rowname-names :rownames] 16 (#$ . 1593)])
#@126 Prepare SESSION according to the header arguments in PARAMS.
VARS contains resolved variable references
 
(fn SESSION PARAMS)
(defalias 'org-babel-prep-session:python #[514 "\301!\302!\303!\204\304\305\"\210\306 \307\310\311\312\313!\314\"\315$\216rq\210\212\316\317\307\320\321\312\313!\322\"\315\323%\"\210,\210\207" [comint-input-filter org-babel-python-initiate-session org-babel-variable-assignments:python org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" match-data make-byte-code 0 "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 #[257 "\300\207" [nil] 2 "\n\n(fn INPUT)"] mapc 257 "\301\210\211c\210\302 \210\303\300!\207" [1 comint-send-input org-babel-comint-wait-for-output] "\n\n(fn VAR)"] 12 (#$ . 2350)])
#@51 Load BODY into SESSION.
 
(fn SESSION BODY PARAMS)
(defalias 'org-babel-load-session:python #[771 "\300 \301\302\303\304\305!\306\"\307$\216\310\"r\211q\210\311\312p!!b\210\313!c\210)\211\262)\207" [current-window-configuration make-byte-code 0 "\301\300!\207" vconcat vector [set-window-configuration] 2 org-babel-prep-session:python process-mark get-buffer-process org-babel-chomp] 10 (#$ . 3137)])
#@82 Return a list of Python statements assigning the block's variables.
 
(fn PARAMS)
(defalias 'org-babel-variable-assignments:python #[257 "\300\301\302!\"\207" [mapcar #[257 "\300\301@\302A!#\207" [format "%s=%s" org-babel-python-var-to-python] 6 "\n\n(fn PAIR)"] org-babel--get-vars] 5 (#$ . 3548)])
#@162 Convert an elisp value to a python variable.
Convert an elisp value, VAR, into a string of python source code
specifying a variable of the same value.
 
(fn VAR)
(defalias 'org-babel-python-var-to-python #[257 "\211<\203\301\302\303\304#\305Q\207\211\306=\203\207\307;\203'\310\311\"\203'\312\202(\313;\2033\314!\2024\"\207" [org-babel-python-hline-to "[" mapconcat org-babel-python-var-to-python ", " "]" hline format string-match "[\n ]" "\"\"%S\"\"" "%S" substring-no-properties] 6 (#$ . 3857)])
#@192 Convert RESULTS into an appropriate elisp value.
If the results look like a list or tuple, then convert them into an
Emacs-lisp table, otherwise return the results as a string.
 
(fn RESULTS)
(defalias 'org-babel-python-table-or-string #[257 "\300!\211<\203\301\302\"\202\211\207" [org-babel-script-escape mapcar #[257 "\211\301=\203\207\207" [org-babel-python-None-to None] 3 "\n\n(fn EL)"]] 5 (#$ . 4378)])
(defvar org-babel-python-buffers '((:default . "*Python*")))
#@58 Return the buffer associated with SESSION.
 
(fn SESSION)
(defalias 'org-babel-python-session-buffer #[257 "\301\"A\207" [org-babel-python-buffers assoc] 4 (#$ . 4862)])
#@16 
 
(fn SESSION)
(defalias 'org-babel-python-with-earmuffs #[257 "\211;\203    \211\202 \300\301\"\211\302\303O\304\230\203%\211GS\305O\304\230\203%\211\202)\300\306\"\207" [format "%s" 0 1 "*" nil "*%s*"] 5 (#$ . 5039)])
#@16 
 
(fn SESSION)
(defalias 'org-babel-python-without-earmuffs #[257 "\211;\203    \211\202 \300\301\"\211\302\303O\304\230\203*\211GS\305O\304\230\203*\211\303GSO\202+\211\207" [format "%s" 0 1 "*" nil] 5 (#$ . 5270)])
#@159 Initiate a python session.
If there is not a current inferior-process-buffer in SESSION
then create.  Return the initialized session.
 
(fn &optional SESSION)
(defalias 'org-babel-python-initiate-session-by-key #[256 "\306!\210\307 \310\311\312\313\314!\315\"\316$\216\203\317!\202\320\321!    \322\235\203,\n\323P\202-\n\324=\203\\\325\326!\203\\\327\330 \"\204G\326!\210\202\227\204P\331!\262\332!\326!\210)\202\227\333=\203\223\325\334!\203\223\335 !\210\203~\336!\203~\337\340\341#\202\203\342\343!P\211'\334 \210\331!\262)\210\202\227\344\345!\210B\346(\"B(\266\203)\207" [org-babel-python-mode system-type org-babel-python-command emacs-version python-shell-buffer-name py-default-interpreter require current-window-configuration make-byte-code 0 "\301\300!\207" vconcat vector [set-window-configuration] 2 intern :default org-babel-python-session-buffer (cygwin windows-nt ms-dos) " -i" python fboundp run-python version< "24.1" org-babel-python-with-earmuffs org-babel-python-without-earmuffs python-mode py-shell py-toggle-shells buffer-live-p replace-regexp-in-string "^\\*\\([^*]+\\)\\*$" "\\1" "Python-" symbol-name error "No function available for running an inferior Python" assq-delete-all py-which-bufname org-babel-python-buffers] 9 (#$ . 5499)])
#@84 Create a session named SESSION according to PARAMS.
 
(fn &optional SESSION PARAMS)
(defalias 'org-babel-python-initiate-session #[512 "\300\230?\205\f\301\302!!\207" ["none" org-babel-python-session-buffer org-babel-python-initiate-session-by-key] 5 (#$ . 6810)])
#@53 A string to indicate that evaluation has completed.
(defvar org-babel-python-eoe-indicator "'org_babel_python_eoe'" (#$ . 7083))
(defconst org-babel-python-wrapper-method "\ndef main():\n%s\n\nopen('%s', 'w').write( str(main()) )")
(defconst org-babel-python-pp-wrapper-method "\nimport pprint\ndef main():\n%s\n\nopen('%s', 'w').write( pprint.pformat(main()) )")
(defconst org-babel-python--exec-tmpfile "__org_babel_python_fname = '%s'; __org_babel_python_fh = open(__org_babel_python_fname); exec(compile(__org_babel_python_fh.read(), __org_babel_python_fname, 'exec')); __org_babel_python_fh.close()")
#@95 Evaluate BODY as Python code.
 
(fn SESSION BODY &optional RESULT-TYPE RESULT-PARAMS PREAMBLE)
(defalias 'org-babel-python-evaluate #[1282 "\203 \300$\207\301$\207" [org-babel-python-evaluate-session org-babel-python-evaluate-external-process] 10 (#$ . 7695)])
#@265 Evaluate BODY in external python process.
If RESULT-TYPE equals `output' then return standard output as a
string.  If RESULT-TYPE equals `value' then return the value of the
last statement in BODY, as elisp.
 
(fn BODY &optional RESULT-TYPE RESULT-PARAMS PREAMBLE)
(defalias 'org-babel-python-evaluate-external-process #[1025 "\303\267\202Q\304\205\305PP\"\202R\306\307!\304\203%\305P\202&\310\311\312\235\2032    \2023\n\313\314\315\316\317!!\320\"\305#\321\322\"#P\"\210\323!\262\202R\324\325\235?\205\245\326\235\204\234\327\235\204\234\330\235\204\234\331\235\204\234\312\235\204\234\332\235\204\234\333\235\204\226\334\235\204\226\335\235\204\226\336\235\203\240\337\235\204\240\202\245\340\317!!\262\207" [org-babel-python-command org-babel-python-pp-wrapper-method org-babel-python-wrapper-method #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (output 6 value 22)) org-babel-eval "\n" org-babel-temp-file "python-" "" format "pp" mapconcat #[257 "\300\301\"\207" [format "    %s"] 4 "\n\n(fn LINE)"] split-string org-remove-indentation org-trim "[ \n]" org-babel-process-file-name noquote org-babel-eval-read-file nil "none" "scalar" "verbatim" "html" "code" "file" "output" "raw" "org" "drawer" "table" org-babel-python-table-or-string] 16 (#$ . 7972)])
#@266 Pass BODY to the Python process in SESSION.
If RESULT-TYPE equals `output' then return standard output as a
string.  If RESULT-TYPE equals `value' then return the value of the
last statement in BODY, as elisp.
 
(fn SESSION BODY &optional RESULT-TYPE RESULT-PARAMS)
(defalias 'org-babel-python-evaluate-session #[1026 "\306\307\310C\311\312\267\202\312\313\314\315\316#)\266\203\203R\317\320!\211\321\322\323!!\324\310\325\326\327!\330\"\331$\216r\211q\210    c\210)r\211q\210\332\314\211\314\310%\210*\266\333    \"\262\202T\334\335\336\337\f!\204d\340\341 \"\210\342 \324\310\343\326\327!\344\"\345$\216r\fq\210\212\346\347C\324\350\351\326\327!\352\"\353\354% B\314\355\356p!!b\210`d{\262|\266 \n    #\210\n \210\n \210\fc\210\n \210 b\210\212\357\360\f!\314\315#\205\314\357@\314\315#)\204\331\361\356p!!\210\202\270\355\356p!!b\210\211c\210\203\316\362\363\364\360 \206\363\347!#\242\"\203\211\242\310\225\314O\240\210\365\242@\")\266\202,\262\331\"\363#\262\202\313\317\320!\337    !\204)\340\341\n\"\210\342 \324\310\343\326\327!\366\"\345$\216r    q\210\212\367\347C\324\350\351\326\327!\352\"\353\354% B\314\355\356p!!b\210`d{\262|\266\314A #\210\370\f\235#\210 \210 \210\fc\210 \210) b\210\212\357\360\f!\314\315#\205\237\357@\314\315#)\204\254\361\356p!!\210\202\213\355\356p!!b\210\211c\210\365\242@\"\210)\266,\210\371!\262\202\313\314\f\372\373O\230?\2058\374\235?\2056\375\235\204-\376\235\204-\377\235\204-\201B\235\204-\370\235\204-\201C\235\204-\201D\235\204%\201E\235\204%\201F\235\204%\201G\235\2031\201H\235\2041\2026\201I!\262\207" [inhibit-changing-match-data org-babel-python--exec-tmpfile comint-input-filter comint-output-filter-functions org-babel-python-eoe-indicator comint-last-input-end #[0 "\300\301\302\"\210\303\304\305\"\207" [comint-send-input nil t sleep-for 0 5] 3] #[771 "\300\301\302\303\304\305!\306\"\307\310%\203\311\312\313\314\315\"\"D\202(\312\316\314\315\"\"C\"\207" [mapc make-byte-code 257 "\211c\210\300 \207" vconcat vector #2=[] 2 "\n\n(fn STATEMENT)" "import pprint" format "open('%s', 'w').write(pprint.pformat(_))" org-babel-process-file-name noquote "open('%s', 'w').write(str(_))"] 11 "\n\n(fn SEND-WAIT TMP-FILE PP)"] 0 #[771 "\300\301\"\211\2038\211@\302\303\"\211\203&\211\242W\203\304c\210 \210\240\210\202*\305\240\210\210\211c\210 \210A\266\202\202\210 \207" [split-string "[ \n]" string-match "\\S-" #1="" 0] 8 "\n\n(fn SEND-WAIT LAST-INDENT BODY)"] #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (output 11 value 281)) ".\n+." nil t string-match org-babel-temp-file "python-" get-buffer-create generate-new-buffer-name " *temp file*" make-byte-code "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 write-region format mapconcat org-trim butlast org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" match-data "\301\300\302\"\207" [set-match-data evaporate] 3 #[257 "\300\207" [nil] 2 "\n\n(fn INPUT)"] #1# 257 "\300\211\242P\240\207" #2# 4 "\n\n(fn TEXT)" process-mark get-buffer-process re-search-forward regexp-quote accept-process-output replace-regexp-in-string "\n" "[ \n]+" split-string [set-match-data evaporate] #[257 "\300\207" [nil] 2 "\n\n(fn INPUT)"] "pp" org-babel-eval-read-file 1 -1 "none" "scalar" "verbatim" "html" comint-prompt-regexp comint-process-echoes "code" "file" "output" "raw" "org" "drawer" "table" org-babel-python-table-or-string] 21 (#$ . 9328)])
#@52 Strip \='s from around Python string.
 
(fn STRING)
(defalias 'org-babel-python-read-string #[257 "\300\301\"\203\302\301\"\203\211\303\304O\207\207" [string-prefix-p "'" string-suffix-p 1 -1] 4 (#$ . 12921)])
(provide 'ob-python)