Quickly add all dirs to sys.path if dir has .py file

Category: Python - Miscellaneous

Add all dirs under folder to sys.path if any .py files are found.
Use an abspath if you'd rather do it that way.

Uses the current working directory as the location of using.py.
Keep in mind that os.walk goes all the way down the directory tree. Date: 08 May, 2012


Add - Os Walk - Sys Path

Homepage: http://code.activestate.com/recipes/578097-quickly-add-all-dirs-to-syspath-if-dir-has-py-file/

Developer: Andrew Yurisich

License: Freeware

Operating System: Windows

Add a Comment

all are required fields

     
What do you think of this resource?

Select Your Rate:

Votes:0

 

Related Scripts Download

Add a Aim Screen name is a scriptt that will allow you and your visitors to add screen names for aol and then be able to message them right on your site.

developer Developer: Andrew
license License: Freeware
operating systems Operating System: windows


This JavaScript adds commas in the proper places.

developer Developer: Steve S
license License: GNU General Public License (GPL)
operating systems Operating System: Not Available


ICDataGrid is a powerfull script, that allows creating datagrid controls.

developer Developer: IcloudCenter
license License: PHP License
operating systems Operating System: Not Available


Search Engine Add-On is multi-platform compatible.

developer Developer: http://www.lawrencegoetz...
license License: Freeware
operating systems Operating System: All


Have you ever wished updating your web site were as easy as, say, sending an e-mail.

developer Developer: http://www.flexwindow.co...
license License: Freeware
operating systems Operating System: Win 95/98/ME/NT 4.x/2000/XP


Submit your website to 20+ search engines for Free.

developer Developer: Max
license License: Freeware
operating systems Operating System: Linux, Unix, Windows


The following script creates a javascript link to bookmark your page.

developer Developer: rustyspigot.com
license License: Freeware
operating systems Operating System: All


Snippet of code that uses recursion to print nested dictionaries.

developer Developer: Mauricio Dada Fonseca de Freitas
license License: Freeware
operating systems Operating System: Windows


What if you had a list like this: [1, -10, [1,2,[3,4]], xrange(200)], and you just wanted to go through each element in order (wanted it to return a simple list of [1,-10,1,2,3,4,1,2,3,4.

developer Developer: Garrett
license License: Freeware
operating systems Operating System: Windows