[Python] Does Nuitka onefile mode displays my python code in tracebacks?

Discussão em 'Python' iniciado por Stack, Março 11, 2025.

  1. Stack

    Stack Membro Participativo

    Here is an example code:

    while True: # here is a comment
    pass


    Here is my Python and Nuitka version:

    D:\test>py -m nuitka --version
    2.6.8
    Commercial: None
    Python: 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)]
    Flavor: CPython Official
    Executable: ~\AppData\Local\Programs\Python\Python38-32\python.exe
    OS: Windows
    Arch: x86
    WindowsRelease: 10
    Version C compiler: ~\AppData\Local\Nuitka\Nuitka\Cache\DOWNLO~1\gcc\x86\14.2.0posix-19.1.1-12.0.0-msvcrt-r2\mingw32\bin\gcc.exe (gcc 14.2.0).


    I ran the command py -m nuitka --standalone --onefile test.py and finally got test.exe. Then I ran test.exe and pressed Ctrl+C in the windows terminal. I got a traceback like this:

    Traceback (most recent call last):
    File "C:\Users\User\AppData\Local\Temp\ONEFIL~3\test.py", line 1, in <module>
    while True: # here is a comment
    KeyboardInterrupt
    ^C


    I found the source code even with the comment. But most people say that programs compiled by Nuitka is irreversible. So what's wrong?

    Continue reading...

Compartilhe esta Página