Allows for classical OO programming with multiple inheritance using pure Python syntax, parsed by CPython’s native parser
Hierarchical URL based module system to prevent name conflicts
Multi-level sourcemaps and optional annotation of target code with source references
Compact downloads, kB’s rather than MB’s
Operator overloading can be switched on and off locally to facilitate use for numerical math that’s both readable and efficient
Documentation with code examples
Take a look at the documentation with code examples at the Transcrypt website: http://www.transcrypt.org .
Status of latest release
Release: Athens (PyPi v3.5.229, GitHub #12)
This release is mainly a bug fix release for Athens v3.5.222, which contains:
Improved support for the new, redesigned core of Numscrypt. While Numscrypt is still in its infancy, its scope has been widened from merely educational to general use for computations in the browser. A number of optimizations have been put in place, resulting in performance comparable to pure JS numerical libraries. The difference is that Transcrypt (or rather Python), with its facilities for operator overloading, allows a much more concise and readable notation of numerical algorithms. Plans are to gradually build out Numscrypt with more functionality.
Optional static type validation (experimental) using type annotations. Static type validation is activated simply by a command switch. Internally it relies on the mypy project. While this project is still in flux, the resulting productivity improvement is already impressive. Since static type validation is optional and cannot break your code, you can get 90% of the benefits from it rightnow without risk. Even only statically typing the interfaces between modules immediately pays off, especially when working with a team. Don’t believe it, try it!
Thanks to everyone who contributed!
Jacques de Hooge
What’s new in the latest commits
Enhancement for issue #136: dict.get not implemented
Fix for issue #134: %= operator translated incorrectly
Enhancement for issue #130: Add pragma to optionally handle % the JS way
Fix for issue #127: Can’t use key ‘keys’ in a dict
Enhancement issue #113: Use for … of pervasively for js6 + autotest
Fix for issue #125: strings not iterable (js6 only) + autotest
Local classes now arbitrarily nestable, issue #120
Operator % has now Python rather than JS behaviour, issue #123 + autotest
Slicing bug fixed (stop beyond list end), issue #122 + autotest
Plotly.js demo added: lim (Numscrypt -> Maturity) Transcrypt + Numscrypt + Plotly = Live Science Demos in the Browser with native JS performance, all Plotly.js plot types are supported
__pragma__ (‘jskeys’/’nojskeys’) added make Plotly.js code match Plotly.js docs for convenience, locally voiding the need for quotes around dir keys
‘Star us on GitHub’ command line option added
Fix for ‘unexpected indent’ when rebuilding
Fix for accidentally deleting current path from sys.path in some installations
Fix for ‘cannot import __symbols__’ bug when using -r with autotest.
Exception hierarchy improved, all Transcrypt runtime exceptions now derive from Exception
Attempt to iterate over non-iterable now results in exception (only when using -e 6 switch) (see issue #112))
Iterating over TypedArrays and other non-list iterables fixed (only needed for when using -e 6 switch) (see issue #112)
Truthyness of instances of custom classes fixed (see issue #110)
Source map generation bug fixed (see issue #104)
Optional static type validation using mypy (experimental)
Small doc improvements
Some more fixes for Numscrypt
Fix to enable Numscrypt development
Pragma’s else and elif fixed for use in .py rather than .js files
A few methods of builtin types are currently left out, especially when they (almost) duplicate functionality of other methods. Also method decorators (as opposed to function decorators and class decorators) are not supported, with the exception of @classmethod. This results from a deliberate choice to keep Transcrypt lean and simple.
Other packages you might like
Multi-module Python source code obfuscator: https://pypi.python.org/pypi/Opy
PLC simulator with Arduino code generation: https://pypi.python.org/pypi/SimPyLC
A lightweight Python course taking beginners seriously (under construction): https://pypi.python.org/pypi/LightOn
Event driven evaluation nodes: https://pypi.python.org/pypi/Eden
Copyright 2014, 2015, 2016 Jacques de Hooge, GEATEC engineering, www.geatec.com
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.