Hi,
I am running GNU Emacs 25.3 (9.0).
Trying to open a .pyc file (compiled python) while uncompile (using uncompyle2) it to the buffer.
Modified format-alist like this but it didn't work while I open a .pyc file, it still shows the binary.
(add-to-list 'format-alist '(pyc ; name
"" ; doc-str
"\\u03f30d0a" ; regexp
"/usr/local/bin/uncompyle2" ; from-fn
nil ; to-fn
nil ; modify
nil ; mode-fn
nil)) ; preserve
03f30d0a is the magic code of the .pyc file which I have double checked. However, I am not sure if "\\u03f30d0a" is right way to do the regex on hex.
Not much sample code I can look around, any help would be highly appreciated!
Thanks,
Larry
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 75:55:03 |
Calls: | 6,657 |
Calls today: | 3 |
Files: | 12,203 |
Messages: | 5,332,730 |
Posted today: | 1 |