综合编程

Idle hacking – part 1

微信扫一扫,分享到朋友圈

Idle hacking – part 1
0

  1. File test_py.pyfr.  The pyfr extension indicates that this is written in the "French Python" dialect. Since this is the main file we’ll run, it will also automatically set the language to French. This is all done by AvantPy.
  2. "afficher" is the French version of "print"
  3. "import" is the normal Python keyword; we can mix and match keywords from a given dialect with the normal Python ones.  Here, we are importing a module whose base name is "upper".
  4. The constant "a" is defined.
  5. File "upper.pyupper"; the only file whose base name is "upper" – thus, the one that will be imported. The "pyupper" extension indicates that the dialect is an "upper case" version of Python – designed for testing.
  6. The code that will be run when the file is imported.
  7. Output from both files.
  8. "a" is defined.
  9. We made a syntax mistake. However, Friendly-traceback is there to help us understand what went wrong … picking up the default language to use (French) from that first file that was run.

All this was run with a crudely hacked version of Idle. I’m still confused with the communications done with the RPCServer and the TPCServer, having never looked at similar code before.  So, I haven’t been able to make it do all that I wanted in this first hacking session. Hopefully, there will be more to come …

阅读原文...


微信扫一扫,分享到朋友圈

Idle hacking – part 1
0

Avatar

Kernel #__ method__ does not seem to work correctly in dyna...

上一篇

VirtualEnv 16.6.0 发布,Python 虚拟环境

下一篇

评论已经被关闭。

插入图片

热门分类

往期推荐

Idle hacking – part 1

长按储存图像,分享给朋友