Python but vertical.
Write a .vpy file:
hello_world.vpy
h d
e e
l f
l
oph
_re
wil
onl
rto
l(_
d"w
(ho
)er
ll
ld
o(
)
w:
o
r
l
d
!
"
)
then run it
$ vertical-python ./hello_world.vpy
hello world!or encode a .py file to a .vpy file:
$ vertical-python ./hello_world.vpy --print > hello_world.py
$ vertical-python --encode ./hello_world.py > hello_world.vpyTo make your vertical python file importable, use the .py file extension and declare a vertical encoding
The vertical_python.codec module must be imported before attempting to import vertically-encoded python.
# -*- coding=vertical -*-
p
r
i
n
t
(
"
n
e
a
t
!
"
)
usage: vertical-python [-h] [--print | --encode] path
python but vertical
positional arguments:
path path to vertical .vpy file
options:
-h, --help show this help message and exit
--print just print the rotated vpy, not eval
--encode treat PATH as .py and print vertical .vpy to stdout
- v0.3.0:
#2-verticalcodec and importable modules - v0.2.0:
#1- @mathematicalmichael - encode.pyto.vpy - v0.1.0: Initial functionality