Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commond "python HelloWorld.py" has a bug? #222

Closed
yjqiang opened this issue Dec 1, 2016 · 5 comments · Fixed by #314
Closed

Commond "python HelloWorld.py" has a bug? #222

yjqiang opened this issue Dec 1, 2016 · 5 comments · Fixed by #314

Comments

@yjqiang
Copy link
Contributor

yjqiang commented Dec 1, 2016

HelloWorld.py:
#!python3
#coding: utf-8
print 'Hello World'


I use the commond "python HelloWorld.py", trying to run HelloWorld.py in python3. But it looks Pythonista still runs it in python2, because in python3 "print 'Hello World'" is error while in fact it just prints "Hello World" without warning or other messages. I'm not sure whether it's a bug or I misunderstand the commond.

Pythonista 3.0 (300018) iOS 10.1.1 (64-bit iPad6,3)

@jsbain
Copy link
Contributor

jsbain commented Dec 2, 2016

I don't think we ever implemented a clean way to run a python3 command from the python2 interpreter, which stash is running in.
(though i vaguely recall ywangd or dgelessus coming up with a C approach, but it was perhaps not too stable, or there was no good way of communicating back and forth)
So right now the python command only supports py2

@ywangd
Copy link
Owner

ywangd commented Dec 2, 2016 via email

@yjqiang
Copy link
Contributor Author

yjqiang commented Dec 2, 2016

Thanks a lot. And I found this http://omz-software.com/pythonista/docs/ios/urlscheme.html. Maybe we can use URL scheme to get it. But it seems that we can only run a script in the same library and there are too many other limitations.

@jsbain
Copy link
Contributor

jsbain commented Dec 3, 2016 via email

@yjqiang
Copy link
Contributor Author

yjqiang commented Dec 5, 2016

Got it. I just think a lot, trying to make the stash look like bash in linux, like "python3", "python2". But we need the author of Pythonista to help us, like setting more url schemes. But I'm not sure whether it's a good idea.

bennr01 added a commit to bennr01/stash that referenced this issue May 4, 2018
#About this commit/PR
This is a commit/PR to close a large number of old/fixed issues at once using the github `fix #<issuenumber>` syntax.
Below is a list of all issues which will automatically be closed by merging this commit/PR into `ywangd/master`.
Behind each issue number is a short summary about the issue or why it can be closed.

#Issues which can be closed

**Py3 related:**
- fix ywangd#281 (py3 had not yet been supported)
- fix ywangd#261 (python3 pip installation)
- fix ywangd#246 (python3 code in python2)
- fix ywangd#222 (python3 command in stash)
- fix ywangd#200 (pip now works (at least partially) with python3)
- close ywangd#197 (general pythonista3 compatibility thread)


**Questions which have been answered / unfixable bugs:**
- close ywangd#310 (pip installation with c code)
- close ywangd#292 (StaSh is not dead; also a question regarding py3)
- close ywangd#290 (pip installation, problem solved)
- close ywangd#289 (answer provided, no further activity by reporter)
- close ywangd#279 (pip install protects standard distribution)
- close ywangd#245 (answered)
- close ywangd#244 (not possible (unless someone finds a workaround)
- close ywangd#243 (c-code in pip installation)
- close ywangd#208 (question answered)


**implemented suggestions/changes:**
- fix ywangd#273 (partially implemented as part of py2and3)
- fix ywangd#193 (implemented by now)
- fix ywangd#63  (subcommand completion; implemented long ago)
- fix ywangd#39  (pip; implemented long ago)

**fixed bugs:**
- fix ywangd#308 (https error in pip; fixed)
- fix ywangd#223 (old beta-related bug)
- fix ywangd#211 (old beta-related bug)
- fix ywangd#209 (seems to be fixed, can not reproduce)
- fix ywangd#206 (git did not clone into subdirectory; fixed)
- fix ywangd#98  (telnet did not send \r\n; fixed)


**other stuff:**
- close ywangd#260 (no useful bug description)
- close ywangd#258 (no useful bug description)
- close ywangd#251 (not a bug but an announcement, no longer relevant)
- close ywangd#241 (works now)
- close ywangd#219 (no further acivity by reporter, likely user error)


#Issues which can be closed, but where the underlying issue has not been fixed
- close ywangd#285 (pip command too complex)
- close ywangd#291 (pip installation question, but not c-code related. But seems package-related)
- close ywangd#274 (pip install problem, at least partial related to c-code, no further activity by reporter)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants