10c8 / paper Goto Github PK
View Code? Open in Web Editor NEWDevelop applications for Pythonista using web tools.
License: MIT License
Develop applications for Pythonista using web tools.
License: MIT License
For functions that take a Python object, a function, for example, there should be a way to pass the Python object (not the PyObj reference) as an argument.
The server cannot send requests to the JS API, which means a PyCall
for JavaScript functions, a JSCall
, seems impossible to implement at the moment.
No mathematical operations can be done on Python object references through JavaScript using the standard operators (+, -...).
That happens because Python object references (PyObjs) are seen in JavaScript as dict
s.
jQuery AJAX
calls have a timeout.
The current structure of the module makes it hard to maintain. Bugs are becoming harder to track and there's lots of recursion going on.
The module will be separated in different parts: PyTypes
will handle serialization (this time more efficiently, using a custom JSONEncoder
and JSONDecoder
), PaperServer
will run the server which will take care of the AJAX requests done by JavaScript, PaperUtils
will contain utilities both for Python and JavaScript.
The JavaScript won't have to change, as it's already pretty well structured (which surprises me).
Objects that cannot be serialized to JSON are not correctly converted if they are contained inside a dict
, list
or tuple
.
The Python object isn't converted to a PyObj, which causes a TypeError
.
Some types (numpy.Array
, for example) still cannot be represented in JavaScript, which results in multiple errors.
Possible workaround: Implement a way to extend PyObj
.
Trying to import re
results in an error at the line json.dumps(data)
(229): TypeError: keys must be a string
.
Trying to import numpy
results in SyntaxError: JSON Parse error: Unexpected identifier "Infinity"
at column 22
, line 20
.
We need a better memory management solution.
If the list
or dict
has non-json-serializeable objects, these are not converted, which causes a TypeError
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.