Skip to content

Commit 959b3f5

Browse files
committed
Add code samples to the README.
1 parent 5ca902c commit 959b3f5

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

README.rst

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ specifies to redisplay BUFFER on new output. ARGS is the list of
5959
arguments passed to ``call-process``. CWD will be working directory
6060
for running process.
6161

62+
.. code:: lisp
63+
64+
(call-pythonic :buffer "*Pythonic*"
65+
:args '("-V")
66+
:cwd "~")
67+
6268
start-pythonic
6369
~~~~~~~~~~~~~~
6470

@@ -71,13 +77,35 @@ symbol of process filter function if necessary. SENTINEL must be a
7177
symbol of process sentinel function if necessary. QUERY-ON-EXIT will
7278
be corresponding process flag.
7379

80+
.. code:: lisp
81+
82+
(start-pythonic :process "pythonic"
83+
:buffer "*Pythonic*"
84+
:args '("-c" "print('PING')")
85+
:cwd "~"
86+
:filter (lambda (process output) (message output))
87+
:sentinel (lambda (process event) (message "Done."))
88+
:query-on-exit nil)
89+
90+
pythonic-proper-environment-p
91+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92+
93+
Determine if python environment has been changed since PROCESS was started.
94+
95+
.. code:: lisp
96+
97+
(pythonic-proper-environment-p
98+
(start-pythonic
99+
:process "pythonic"
100+
:args '("-V")))
101+
74102
Commands
75103
--------
76104

77105
pythonic-activate
78106
~~~~~~~~~~~~~~~~~
79107

80-
Activate python virtual environment.
108+
Activate python virtual environment. Tramp paths are supported.
81109

82110
pythonic-deactivate
83111
~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)