Simple python logging module wrapper that can be inherited to the class or can be used as a standalone. This logging wrapper supports logging level of INFO, ERROR and DEBUG with option to print to CONSOLE, FILE , BOTH and NONE. git pull from mlogger repo.
Following is an example
# Inherited to Class
MLOGGER.__init__(self,'test',logtype='NONE', filename = 'mylogg.log')
t = tester()
# As Standalone
logger= MLOGGER('Test', level=INFO, logtype = 'CONSOLE', filename = 'mylog.log')
After creating exe file of my python script, the icon of the exe file didn’t change.
I searched on internet and after trying all the combination of setup.py and icon sizes, I found that easier way to change icon is to change Icon using Resource Hacker.
Supid Geek has a tutorial on How to Modify the Icon of an .Exe File
Download Code From Here
print "Creating ", zipped_name
zf = zipfile.ZipFile(zipped_name, mode='w')
for filename in zip_filenames:
":::ERROR::: Unable to add file to zipped file"
print "Created Zipped File",zipped_name
for filename in remove_filesnames:
print "Removing", filename
Download the following script from Here.
#Download File with FTP.
#Download_System requires two variables HOST & directory & filename
#Host and Gets the Filename of the Preset
ftp_download=ftplib.FTP(HOST) #opens Ftp Connection to the HOST
ftp_download.login( "root", "root") #username, password
ftp_download.cwd(directory_get) #Change Directory to file directory
localfile=open(filename_get,'wb') #Open Localfile to write
ftp_download.retrbinary("RETR " + filename_get, localfile.write) #Get the Filname in Binary
except Exception as e:
print ":::ERROR:::: " +str(e)
Directory='Change Directory Here'
As I wanted to learn the python GUI,
I searched on internet and found these very nice tutorials on how to built GUI using Tkinter library of python. There are few more GUI libraries available on the internet as you may be aware such as wxpython, but I found Tkinter suitable for my needs and easy to work with. I started learning from UsingPython , it also has a good basic python tutorials if you want to have a refresher course.
The other one was the Python Course which also has some really nice examples and a bit more than using python but both are good and you can start from either one.
Following are library references which are handy to know what things you can change using arguments.