user10011505
user10011505

Reputation:

.pyc extention Django Visual Studio Code

I was reading that .pyc contain byte code, which is what the Python interpreter compiles the source to. This code is then executed by Python's virtual machine.

Hoever, since I'm learning Django for the first time and coming from Node.js it's a little different, everytime I type on my terminal python manage.py runserver it creates multiple versions of the same file but in .pyc format, which by the definition I'm guessing that's the compiled version so it's faster, but I think it's too many files, is that normal? What if don't want to compile it to have all those extra files? I'm learning python and Django for the first time, could someone clarify this a little please. Here is a picture of what I mean with the extra files:

enter image description here

Also in the tutorial that I' following they have

from django.conf.urls import path,

and the new version of Django has

from django.conf.urls import url,

just want to make sure, they are the same right?

Thank you

Upvotes: 0

Views: 7131

Answers (1)

ruddra
ruddra

Reputation: 52018

Its better to not show those .pyc file in the sidebar. You can do that by putting the following line in the user/workspace settings.

"files.exclude": {
    "**/*.pyc": true
},

Upvotes: 3

Related Questions