Skip to content
This repository has been archived by the owner on Oct 27, 2023. It is now read-only.

Latest commit

 

History

History
117 lines (97 loc) · 3.19 KB

README.md

File metadata and controls

117 lines (97 loc) · 3.19 KB

Serpent

Transforms your python code into a serpent and sword!

###Technical

  • Runs on mac and most verisons of linux
  • Tested on python 2.7 but may work with 3.x

###Example

The file below would compile and run if I didn't truncate the sword to fit on the page. (lawl)

#!/usr/bin/python
import serpent

"""
                              ___
                             { _ }
                              |/|
                             {___}
                              |_|
                              |/|
                    .         |/|         .
                    (\________|w|________/)
                    ( ___________________ )
                     v       | | |       v
                             | | |
                             | | |
                             | | |
                             | | |PO0.HN7
                             | | |   *   TO0
                            z| | |TP0.ON4
                           PY0 | |z
                          PY0| | |
                            PY0| |
                             |PY0|
                             | |PY0
                             | | OP0
                             | | |PY0
                            z| | |PY0
                           PY0 | |z
                          PY0| | |
                            PY0| |
                             |PY0|
                             | |PY0
                             | | HN3
                             | | |PT6
                            z| | |PH0
                           PY0 | |z
                          PY0| | |
                            PN3| |
                             |PT0|
                             | |PY0
                             | | NY2
                            z| | |PY0
                          YO1| | |z
                            OH4| |
                             |HO2|
                             | |PO3
                             | | PY0
                             | | |PY0
                            z| | |PY0
                           PY0 | |z
                          PY0| | |
                            PY0| |
                             |PY0|
                             | |OP0
                             | | HP0
                             | | |YN0
                            z| | |PT0
                             z | |
                             z | |
                             | | |
                             | | |
                              \|/
                               v
                               
Your sword will be muuccccccchhhh longer than this. I'm working on it
"""

###How to use

  • Just import serpent.py at the top of your file
import serpent
  • Then write some code
#!/usr/bin/python
import serpent

print "hello world"
  • Compile your file
python some.file.py
  • Open the newly generated serpent file that's extrememly freaking long and totally wasting space but who cares it's a kickass snake wrapped around a kickass sword!!

Compile that wild file, child.

python some.file.ss.py

##Something to note:

The purpose of this file is not to compress your code. In fact this will make your files larger. much, much larger. This is simply intended to amuse you.