public
Description: a ruby-to-pyc compiler
Clone URL: git://github.com/why/unholy.git
Search Repo:
 * README: just a little instruction.
why (author)
Mon May 05 02:28:21 -0700 2008
commit  77363ecf78ed1b2eaf1d27b6cdb15503366f60f1
tree    c12444c68120a328fee93040cfee2e4df2322caf
parent  66aad35513f42db8e91f7a77ca1b5401e9a17431
0
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
0
@@ -1 +1,47 @@
0
+
0
+
0
+ $ UNHOLY $
0
+
0
+ Compile Ruby to Python bytecode.
0
+ And, in addition, translate that
0
+ bytecode back to Python source
0
+ code using Decompyle (included.)
0
+
0
+
0
+ $ INSTALL $
0
+
0
+ First, install decompyle:
0
+
0
+ > cd decompyle
0
+ > python setup.py build
0
+ # python setup.py install
0
+
0
+ Then, in the main directory, use
0
+ the tools.
0
+
0
+ ---
0
+
0
+ To compile Ruby to a .pyc:
0
+
0
+ > bin/unholy test.rb
0
+ > python test.rb.pyc
0
+
0
+ ---
0
+
0
+ To translate to Python:
0
+
0
+ > decompyle test.rb.pyc > test.py
0
+
0
+ ---
0
+
0
+ And, to view the disassembled
0
+ bytes:
0
+
0
+ > bin/py-dis test.rb.pyc
0
+
0
+ Thanks to Ned Batchelder for his
0
+ rather juicy posts on dissecting
0
+ Python bytecode. It is only too
0
+ bad that a Rubyist got a hold of
0
+ them. :(

Comments

    No one has commented yet.