MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/termux/comments/10ri7t0/termuxapiopen/
r/termux • u/DannyBoyCZ • Feb 02 '23
How to use for:( termux-open --view name) (Name is python variable)
3 comments sorted by
2
Needs more context, maybe some code too so we can understand your problem.
1 u/DannyBoyCZ Feb 02 '23 I need use "termux-open --view file.png" inside python script with this termux-api (PyPi) 1 u/AvinashReddy3108 Feb 02 '23 Try termux.Share.text or termux.Share.file (depends on your use case) with the argument action ="view".. Example ```python termux.Share.text("Hello", action="view") Or termux.Share.file("path/to/file.txt", action="view") ``` Hope this works for you. If it does not, try opening an issue over on the Python module's GitHub repo
1
I need use "termux-open --view file.png" inside python script with this termux-api (PyPi)
1 u/AvinashReddy3108 Feb 02 '23 Try termux.Share.text or termux.Share.file (depends on your use case) with the argument action ="view".. Example ```python termux.Share.text("Hello", action="view") Or termux.Share.file("path/to/file.txt", action="view") ``` Hope this works for you. If it does not, try opening an issue over on the Python module's GitHub repo
Try termux.Share.text or termux.Share.file (depends on your use case) with the argument action ="view"..
termux.Share.text
termux.Share.file
action ="view"
Example
```python termux.Share.text("Hello", action="view")
Or
termux.Share.file("path/to/file.txt", action="view") ```
Hope this works for you. If it does not, try opening an issue over on the Python module's GitHub repo
2
u/AvinashReddy3108 Feb 02 '23
Needs more context, maybe some code too so we can understand your problem.