py_compile spouted this weird output - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: py_compile spouted this weird output (/thread-6902.html) |
py_compile spouted this weird output - Klar - Dec-12-2017 I found that simply importing the module wasn't reliable, so I tried py_compile, and... py_compile.compile("info.py") '__pycache__\\info.cpython-34.pyc'I looked and found a folder named __pycache__ but my file wasn't in it! What happened? What should I do? I'm really confused. EDIT: Problem solved! RE: py_compile spouted this weird output - buran - Dec-13-2017 (Dec-12-2017, 10:27 PM)Klar Wrote: I found that simply importing the module wasn't reliableWould you like to elaborate on this? RE: py_compile spouted this weird output - Klar - Dec-13-2017 No? All I meant by that was that most of the time, when you import something,it doesn't create a .pyc. Anyway, help on this? EDIT: Problem solved! RE: py_compile spouted this weird output - stranac - Dec-13-2017 Thinking you need a .pyc usually means you don't actually know what a .pyc is. Why do you think you need one? RE: py_compile spouted this weird output - Klar - Dec-13-2017 I don't need one right now, I'm just testing if py_compile works. A .pyc file is basically a .py file that has been compiled, and when clicked on it launches the module in the interpreter. Pretty nifty. EDIT: Problem solved! |