Vue2pyj - alternative web IDE

258 views
Skip to first unread message

Val K

unread,
May 10, 2019, 10:12:26 PM5/10/19
to web2py-users
As result of experimenting with Rapydscript I want to present my alternative web IDE for web2py, 
(that could be easily ported to web3py as well)

Any feedback is appreciated

Massimo Di Pierro

unread,
May 11, 2019, 4:31:29 AM5/11/19
to web2py-users
I like this a lot. If you are willing to maintain this I think we should make a version for web3py and maybe ship with it.
Let me think how to best integrate this and please remind me in a couple of weeks.

Massimo

Val K

unread,
May 11, 2019, 8:16:07 PM5/11/19
to web2py-users
Thanks for your reply!
I made a version for web3py:
There is a feature of the bottle: If you post json-data it should not be greater then bottle.BaseRequest.MEMFILE_MAX
which is 102 400 byte by default!
Is it possible to have a custom bottle.BaseRequest.MEMFILE_MAX per application?

Massimo Di Pierro

unread,
May 14, 2019, 3:00:14 AM5/14/19
to web2py-users
I've think we should adopt the convention that [[ ]] are yatl delimiters and {{ }} are Vue delimiters.

Val K

unread,
May 14, 2019, 3:32:28 AM5/14/19
to web2py-users
OK, I'll fix it

Val K

unread,
May 14, 2019, 7:23:17 PM5/14/19
to web2py-users
I moved vue3pyj to separate repo :
https://github.com/valq7711/vue3pyj

Delimiters are changed as you suggested  

Massimo Di Pierro

unread,
May 15, 2019, 1:24:58 AM5/15/19
to web2py-users
Thanks. :-)

Val K

unread,
Sep 27, 2019, 1:24:38 AM9/27/19
to web2py-users
Vue3pyj now uses the _dashboard password and can be used along it.
Also I ported shopping cart example from vue

Carlos Costa

unread,
Sep 27, 2019, 10:47:52 AM9/27/19
to web...@googlegroups.com
Didnt work here.
I did a fresh install from py4web source and clone vue3pyj.

ERROR:root:Traceback (most recent call last):
  File "/home/carlos/projects/py4web/py4web/core.py", line 472, in wrapper
    ret = func(*func_args, **func_kwargs)
  File "/home/carlos/projects/py4web/py4web/core.py", line 438, in wrapper
    ret = func(*args, **kwargs)
  File "apps/vue3pyj/__init__.py", line 56, in get_fs
    app_rex  = re.compile('^[a-z_][a-z_0-9]*$', flags = re.I)
NameError: name 're' is not defined

Em sex, 27 de set de 2019 às 02:24, Val K <valq...@gmail.com> escreveu:
Vue3pyj now uses the _dashboard password and can be used along it.
Also I ported shopping cart example from vue

--
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 the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/f8fb3e9e-cd06-493f-84f6-7507beaa06bf%40googlegroups.com.


--
At.

Carlos J. Costa
--------------------------------------------------------------
Cientista da Computação - Esp. Gestão em Telecom

Val K

unread,
Sep 27, 2019, 12:35:17 PM9/27/19
to web2py-users
Already fixed, thanks!
I can't figure out how that happened, 're' was on the first line after `os` ... the cat? 

On Friday, September 27, 2019 at 5:47:52 PM UTC+3, Carlos Costa wrote:
Didnt work here.
I did a fresh install from py4web source and clone vue3pyj.

ERROR:root:Traceback (most recent call last):
  File "/home/carlos/projects/py4web/py4web/core.py", line 472, in wrapper
    ret = func(*func_args, **func_kwargs)
  File "/home/carlos/projects/py4web/py4web/core.py", line 438, in wrapper
    ret = func(*args, **kwargs)
  File "apps/vue3pyj/__init__.py", line 56, in get_fs
    app_rex  = re.compile('^[a-z_][a-z_0-9]*$', flags = re.I)
NameError: name 're' is not defined

Em sex, 27 de set de 2019 às 02:24, Val K <valq...@gmail.com> escreveu:
Vue3pyj now uses the _dashboard password and can be used along it.
Also I ported shopping cart example from vue

--
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 the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web...@googlegroups.com.

Alex Beskopilny

unread,
Sep 30, 2019, 7:09:15 AM9/30/19
to web2py-users


суббота, 11 мая 2019 г., 5:12:26 UTC+3 пользователь Val K написал:
  Hi!
very interesting program, thanks !
to run it on localhost with python 3.7.3 (web2py Version 2.18.5-stable+timestamp.2019.04.08.04.22.03) I added to the file vue2pyj/modules/fs2json.py

two func:

def to_bytes(data, enc="utf8"):
if data is None:
return b""
if isinstance(data, str):
return bytes(data, enc) # data.encode('utf8')
if isinstance(data, dict):
return dict(map(to_bytes, data.items()))
if isinstance(data, tuple):
return map(to_bytes, data)
if isinstance(data, list):
return list(map(to_bytes, data))
return data


def to_str(data, enc="utf8", err="strict"): # bytes to str
if data is None:
return str("")
if isinstance(data, bytes):
return data.decode(enc, err)
if isinstance(data, dict):
return dict(map(to_str, data.items()))
if isinstance(data, tuple):
return map(to_str, data)
if isinstance(data, list):
return list(map(to_str, data))
return data

and was changed lines
1)
ctime = stat.st_ctime * 1000,
mtime = stat.st_mtime * 1000,
#ctime = long(stat.st_ctime * 1000),
#mtime = long(stat.st_mtime * 1000),
2)
ret = f.read()
return to_str(ret)
3)
content = to_bytes( fdata.get('content', '') )
#content = unicode.encode(fdata.get('content', ''), 'utf8')
------------------------------------

vue2pyj works, unfortunately web2py reports

ERROR:Rocket.Errors.Thread-5:Traceback (most recent call last):

File "/home/w3p/web2py/gluon/rocket.py", line 1288, in run
self.run_app(conn)

File "/home/w3p/web2py/gluon/rocket.py", line 1781, in run_app
self.environ = environ = self.build_environ(sock_file, conn)

File "/home/w3p/web2py/gluon/rocket.py", line 1601, in build_environ
request = self.read_request_line(sock_file)

File "/home/w3p/web2py/gluon/rocket.py", line 1339, in read_request_line
d = sock_file.readline()

File "/home/w3p/anaconda3/lib/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)

ConnectionResetError: [Errno 104] Connection reset by peer

ERROR:Rocket.Errors.Thread-5:Tried to send "500 Server Error" to client but received socket error



Alex

Alex Beskopilny

unread,
Sep 30, 2019, 7:17:39 AM9/30/19
to web2py-users


суббота, 11 мая 2019 г., 5:12:26 UTC+3 пользователь Val K написал:
As result of experimenting with Rapydscript I want to present my alternative web IDE for web2py, 
Any feedback is appreciated

2)
def safe_read(fp):
    with open(fp, 'rb') as f:
                          ^^^

        ret = f.read()
    return to_str(ret)
               ^^^^^^

Val K

unread,
Sep 30, 2019, 2:41:07 PM9/30/19
to web2py-users
Thanks for your feedback, I just haven't tried web2py on PY3. I will fix it

Val K

unread,
Oct 3, 2019, 5:33:09 PM10/3/19
to web2py-users
Now, vue2pyj works on both pythons + access through admin only   
Reply all
Reply to author
Forward
0 new messages