This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Copyright 2012 Silvona Services. All Rights Reserved. | |
* File Created By: Rick L Bird | |
* Created TimeStamp: 9/29/12 2:39 AM | |
*/ | |
namespace Silvona\Core\AppBundle\Utils; | |
/* KevinBurnsJr Blog - PHP Unique Hash. | |
* Using a variation proposed by Ernesto on December 19th, 2011 using the PHP BC Math Library |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, sys | |
import site | |
# Remember original sys.path. | |
prev_sys_path = list(sys.path) | |
# we add currently directory to path and change to it | |
pwd = os.path.dirname(os.path.abspath(__file__)) | |
os.chdir(pwd) | |
sys.path = [pwd] + sys.path |