Python Forum
py_compile spouted this weird output
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
py_compile spouted this weird output
#1
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!
Reply
#2
(Dec-12-2017, 10:27 PM)Klar Wrote: I found that simply importing the module wasn't reliable
Would you like to elaborate on this?
Reply
#3
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!
Reply
#4
Thinking you need a .pyc usually means you don't actually know what a .pyc is.
Why do you think you need one?
Reply
#5
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!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Yield generator weird output Vidar567 8 3,195 Nov-23-2020, 10:59 PM
Last Post: deanhystad
  py_compile issue Johb 8 2,572 Nov-02-2020, 06:20 PM
Last Post: jefsummers
  Random Password Generator with Weird Output. Why? Selenestica 2 2,542 Sep-11-2019, 04:36 AM
Last Post: Selenestica

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020