Python web2py console

282 views
Skip to first unread message

Paul Ellis

unread,
Mar 6, 2017, 7:14:34 AM3/6/17
to web2py-users
Hello, 

I know this question has been asked before, but didn't solve the problem for me.

I am using Windows 10 and web2py binary and have replaced web2py.py with web2py.exe in the command python web2py.py -s [applicaiton] -m and am getting this error:

python web2py.exe -[application] -m
SyntaxError: Non-ASCII character '\x90' in file web2py.exe on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

I have also tried: 
python web2py.exe

e:\web2py\py web2py.exe
this gives a traceback, but the same error:
Traceback (most recent call last):
  File "<string>", line 6, in <module>
  File "__main__.py", line 126, in <module>
  File "__main__py__.py", line 60, in <module>
  File "web2py.exe", line 1
SyntaxError: Non-ASCII character '\x90' in file web2py.exe on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

What am I doing wrong?

Cheers
Message has been deleted

Marlysson Silva

unread,
Mar 6, 2017, 8:36:52 AM3/6/17
to web2py-users
Try just double click in web2py.exe , it open a server in a screen.

Or are you trying accessing models of application via shell?

Paul Ellis

unread,
Mar 6, 2017, 9:14:53 AM3/6/17
to web...@googlegroups.com
Yes. I want an interactive shell with my application loaded.

I know I can run a 'Test' page with output to the console, but it would be much easier (and I know possible) if I could use an interactive shell.

I have seen Massimo using it in his videos. But I can' t get the command to work.

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/T1OH6haDHHM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Marlysson Silva

unread,
Mar 6, 2017, 9:46:28 AM3/6/17
to web2py-users
python web2py.exe -S your_application -M
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.

Anthony

unread,
Mar 6, 2017, 10:51:50 AM3/6/17
to web2py-users
If using the Windows binary, the .exe file includes the Python interpreter, so you don't run it using your system's installed Python. Instead, it would be:

web2py.exe -S application -M

Also, note that S and M are capitalized.

Anyway, the point of the binary .exe file is for systems that do not have Python installed. If you have Python installed, it would be preferable to just use the source version of web2py -- don't bother with the .exe version.

Anthony

Paul Ellis

unread,
Mar 7, 2017, 10:57:32 AM3/7/17
to web...@googlegroups.com
Thank you. That works. 

I used the binary in the beginning, simply because I was so new and it seemed the simplest way forwards. 

Maybe it's time to switch to the source version.

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/T1OH6haDHHM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+unsubscribe@googlegroups.com.

Paul Ellis

unread,
Mar 7, 2017, 11:01:52 AM3/7/17
to web...@googlegroups.com
Hey Marlysson,

This command doesn't work. But thanks for your time to try to help.

Anthony has told me the correct command is:

    web2py.exe -S your_application -M

Cheers

To unsubscribe from this group and all its topics, send an email to web2py+unsubscribe@googlegroups.com.

Marlysson Silva

unread,
Mar 8, 2017, 6:11:42 AM3/8/17
to web2py-users
Ok , just remove the python command..
Reply all
Reply to author
Forward
0 new messages