first commit
This commit is contained in:
38
logseq/bak/pages/python/2025-12-10T17_56_58.428Z.Desktop.md
Normal file
38
logseq/bak/pages/python/2025-12-10T17_56_58.428Z.Desktop.md
Normal file
@@ -0,0 +1,38 @@
|
||||
- Code
|
||||
- {{runpage}}
|
||||
- ```javascript
|
||||
logseq.can_run = "java?";
|
||||
```
|
||||
- ```python
|
||||
import js
|
||||
|
||||
def pyfun(str):
|
||||
return js.logseq.can_run[:-1] + str + " & py"
|
||||
|
||||
js.logseq.kits.pyfun = pyfun
|
||||
```
|
||||
- ```javascript
|
||||
logseq.can_run = logseq.kits.pyfun("script");
|
||||
```
|
||||
- ```python
|
||||
js.logseq.can_run += "thon"
|
||||
```
|
||||
- ```javascript
|
||||
alert("Logseq can edit & run: clojure & " + logseq.can_run + " & r-language");
|
||||
```
|
||||
-
|
||||
- ```javascript
|
||||
|
||||
alert("PythonSample1 executed")
|
||||
|
||||
```
|
||||
|
||||
- {{evalparent}}
|
||||
- ```python
|
||||
|
||||
import js
|
||||
|
||||
js.logseq.api.show_msg("Message from page PythonSample1")
|
||||
|
||||
```
|
||||
-
|
||||
Reference in New Issue
Block a user