© Copyright 2000-2015 Source Code Online. Free Source Code and Scripts Downloads.
|Code Listing by Robin Parmar|
Exceptions provide very handy ways of performing simple tests. For example, if you want to know if the contents of a string represent an integer, why not just try to convert it? That's what IsInt() does.
This function parses a full file specification into tuple of:
a) list of drive and folders
b) file name
c) (last) file extension (including dot)
Adds the specified path to the Python system path if it is not already there. Takes into account terminating slashes and case (on Windows).
Returns -1 if the path does not exist, 1 if it was added, and 0 if it was not (because it is...
Hexify is a hex dump utility handy for viewing binary files at the command-prompt.
Smart pluralisation function that provides more intelligence than simply adding an 's' to the end of a word.
One often needs unique ID strings to tag processes, threads, files or anything else that might be created in quantity. Traditionally these are created based on PIDs or similar system values. But it is not easy to visually recognise these strings,...
This simple function counts Lines Of Code in Python files in two ways: maximal size (source LOC) with blank lines and comments, minimal size (logical LOC) stripping same. It includes a simplified version of my directory tree walker from recipe 52664.
This function walks a directory tree starting at a specified root folder, and returns a list of all of the files (and optionally folders) that match our pattern(s).
If the specified file exists, it is versioned by appending to the extension a three-digit number, starting with "000".
All files and free downloads are copyright of their respective owners. We do not provide any hacked, cracked, illegal, pirated version of scripts, codes, components downloads. All files are downloaded from the publishers website, our file servers or download mirrors. Always Virus check files downloaded from the web specially zip, rar, exe, trial, full versions etc. Download links from rapidshare, depositfiles, megaupload etc not published.