Friday, June 5, 2009

Ignoring .pyc files in NetBeans

I started using the Netbeans 6.5 Python (Early Access) IDE a couple of weeks ago, and while all seemed to be going well, one thing that bugged me was seeing all the .pyc (python compiled file) in the treeviews. Turns out NetBeans has a simple way to fix this:

  • On the menu go to Tools > Options
  • Then "Miscellaneous"
  • Then "Files" tab
  • And find the section "Files Ignored by the IDE"
This value is a regular expression which makes it easy to add the functionality we're looking for.

Change this:
^(CVS|SCCS|vssver.?\.scc|#.*#|%.*%|_svn)$|~$|^\.(?!htaccess$).*$

To this:
^(CVS|SCCS|vssver.?\.scc|#.*#|%.*%|_svn)$|~$|^\.(?!htaccess$)|pyc.*$


You could easily use this method for any other file type you'd like to ignore. Just add "|extension" before the .*$.

1 comments:

Tor Norbye

Don't use the EA bits, they are -really- old (as in six months or more). In the current bits .pyc files are hidden by default. I believe we're going to remove that EA page shortly. You can find up to date bits on the development update center (or grab a python only kit here: http://deadlock.netbeans.org/hudson/job/python/ )

-- Tor

  © Blogger template 'Minimalist G' by Ourblogtemplates.com 2008

Back to TOP