Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open Resource window in eclipse shows pyc files

Tags:

eclipse

pydev

In eclipse the Open Resource window (Hot keyed to Cmd+Shift+R) to open a file by typing its name seems to show *.pyc files despite the Navigator view correctly hiding them.

Is there anyway to set this up to ignore PYC files?

I have looked at the following links and it appears that pydev may require a src folder underneath the main eclipse folder. I do not have that structure however the full project has been marked as a 'source' folder in Pydev - PYTHONPATH under project properties.

http://sourceforge.net/projects/pydev/forums/forum/293649/topic/2183420 http://pydev.org/manual_101_project_conf2.html

like image 846
eskhool Avatar asked Aug 04 '12 08:08

eskhool


People also ask

Where do I find a .PYC file?

pyc files are placed in the same directory as the . py file. In Python 3.2, the compiled files are placed in a __pycache__ subdirectory, and are named differently depending on which Python interpreter created them. (This can be useful to people importing the same Python modules from multiple versions of Python.)

How do I open a PYC file extension?

If you cannot open your PYC file correctly, try to right-click or long-press the file. Then click "Open with" and choose an application. You can also display a PYC file directly in the browser: Just drag the file onto this browser window and drop it.

How do I open a .PY file in eclipse?

Running Python from within Eclipse Make sure your file ends in . py, and Eclipse will recognize it as Python code. Type in some Python code (for instance: print 2+2 ), then right-click on the Python file you've created and select Run As >> Python run .


1 Answers

I found the solution!

CMD+i on the project folder (or "right click" -> properties), then:

under "resources" -> "resources filters":

  • click "add"
  • choose "exclude all"
  • select "files and folders"
  • check "all children (recursive)"
  • type *.pyc in the text field at the bottom
  • ok
  • ok

\o/

like image 172
daveoncode Avatar answered Oct 18 '22 01:10

daveoncode