Tag : paths

Title User Language Tags Description Date
env greeneggs614 Bash

Prints all paths in your bash environment

May 14, 2011
Interpolate Points on a Line parkerkrhoyt JavaScript

This function will interpolate the points on a line. When tracking mouse movements, not every point is captured. This is especially true the faster the mouse moves. This function will allow you to fill in the gap of points between two recorded positions. It takes two point values (object with an "x" and a "y" property) and the distance to move forward for each new point to be added (e.g. spacing). The result is an array containing all the points between the two points provided in the function call.

January 16, 2011
Get References Path mooparmghor VB.NET December 25, 2010
Get Executable Path mooparmghor VB.NET

"Gets the path for the executable file that started the application, not including the executable name." Quoted from MSDN ~~ http://bit.ly/hwr8qp

December 24, 2010
Get Current Page Name mooparmghor JavaScript

Get current page name (file name) with extension (if any).

December 17, 2010
dealing with directory paths with ~ roopeshv python

Dealing with directory paths which start with ~ which are passed as paramaters, to os module functions.

Here is what I think python doesn't do for me:

>>> import os
# suppose my home = curdir = /home/rv
>>> os.path.abspath('.') 
'/home/rv'

Now if I want to go to folder /home/rv/test if there is no folder by name /home/rv/~/test/

# This is what happens by default.
>>> os.path.abspath('~/test')
'/home/rv/~/test'

>>> os.chdir('/home/rv/some/dir')
# doesn't matter if the resulting path exists or not.
>>> os.path.abspath('~/test')
'home/rv/some/dir/~/test'

This would be more sensible I guess:

# if /home/rv/~/test doesn't exist
>>> os.path.abspath('~/test')
'/home/rv/test'
June 16, 2010
file path generator from path patterns Trent Mick python

Provides a _paths_from_path_patterns that will generate a list of paths from a list of path patterns. A "path pattern" can include glob chars. By default it generates a recursive listing of file paths, but: recursion can be turned off, file and/or dir paths can be listed. It supports a list of glob exclusions or inclusions.

This function makes it easy to implement typical "-r|--recursive" and "-x|--exclude" options for command-line scripts that work on given file paths. See example usages below.

Note: I use a leading _ on function names because my typical usage of my recipes is as re-usable internal functions in Python modules.

May 18, 2010
Normalizing paths Gustavo Narea python

While dealing with paths, it's often necessary to make sure they all have the same structure so any operation you perform on them can be reliable, specially when it comes to comparing two or more paths. Unusual paths like "/this//is//a///path" or "another/path" can cause unexpected behavior in your application and this is where this function comes into play.

January 26, 2010
Use Literal Strings for File Paths joe sopcich C# A literal string enables you to use special characters such as a backslash or double-quotes without having to use special codes or escape characters. This makes literal strings ideal for file paths that naturally contain many backslashes. To create a lite September 5, 2008
Network Shares and UNC paths goff denys C# from http://www.codeproject.com/cs/internet/networkshares.asp March 30, 2007
Get system/language/user dependent paths on windows Chris Arndt python

This modules provides a few handy functions to retrieve the path names of some windows system directories from the registry [1] and the environment. These path names can be different depending on OS version, installation language, current user and personal setup. Because of this, they should not be included statically in your program.

February 5, 2006