Search
New Code
Excel Add-in for DB2 1.7
wolfSSL 4.0.0
EntityDAC Express 2.2
SecureBridge 9.1
C# HTML to PDF 2019.6.5
PHP Ecommerce Script 3.6
Devart SSIS Data Flow Components 1.11
dbForge Data Compare for PostgreSQL 3.2.15
OrgChart JS 4.9.7
iScripts CyberMatch 1.3.3
AnyGantt JS Gantt Charts 8.7.0
Database Workbench Pro 5.6.8
SentiMask SDK Trial 2.0.193121
dbForge Studio for SQL Server 5.8
ODBC Driver for ASE 2.1.2
Top Code
VisualNEO Web 2018.12.15
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Availability Booking Calendar PHP 1.0
Code Listing by Giampaolo Rodol?

Code 1-10 of 10   






A python class which "watches" a directory and calls a callback(filename, lines) function every time one of the files being watched gets written, in real time.

Practically speaking, this can be compared to "tail -f *.log" UNIX command, but instead of having lines printed in the terminal, we have a python function called instead.

Similarly to tail, it takes care of "watching" new files which...



A decorator to deprecate a function and provide a new one as replacement.



A decorator for profiling a function which prints profiling results to stdout.
This was originally proposed as a patch for inclusion into python stdlib:

http://bugs.python.org/issue9285

Note that on certain Linux systems...



Two functions: one which waits for a certain PID to terminate (with optional timeout), another one which checks whether a process with a given PID is running.

This was extracted from psutil project which also provides a Windows...



Provides disk usage statistics (total, used and free disk space) about a given path.

This recipe was initially developed for psutil:


http://code.google.com/p/psutil/issues/detail?id=172


...and then...



A context manager which properly handles SIGTERM (SystemExit) and SIGINT (KeyboardInterrupt) signals, registering a function which is guaranteed to be called after signals are received.
Also, it makes sure to execute previously registered...



The thing I miss mostly in asyncore is a system for calling a function after a certain amount of time without blocking. This is crucial for simple tasks such as disconnecting a peer after a certain time of inactivity or more advanced use cases...



Ok, this is really simple but I think it worths a recipe as it's one of those things I always use in shell scripts and for debugging in general.



A simple constant type which overrides the base integer type to provide a useful name on str().