Tag Archives: tutorial

Blender 3D – screencast keys addon.

Fist you need to take the python script from here.
The script need to be into Blender script folder to be used.
Open the Blender 3D application, go to the File – User preferences search the word Screencast and enable the addon by check the checkbox.
To use this addon then go to the 3D View, hit Shift+Alt+C keys.
Another way is to press N key to see the right panel and then use the Start Display button.
See the next image:
Blender 3D addon

Posted in 3D, All, Blender 3D. Tagged with , , , , , , , , , , .

Python and LibreOffice – part 001.

As you know the LibreOffice includes several applications that make it the most powerful Free and Open Source office suite on the market: Writer (word processing), Calc (spreadsheets), Impress (presentations), Draw (vector graphics and flowcharts), Base (databases), and Math (formula editing).
This tutorial is about LibreOffice and python scripts used like macros.
First you need to assign the permission for your user to write into script folder.
The main reason come from your software – the LibreOffice and your script editor for python language need to using this path: C:\Program Files (x86)\LibreOffice 5\share\Scripts.
If you using one of the linux OS then he path will be: /Applications/LibreOffice.app/Contents/Resources/Scripts/python/.
Your script can be run using the LibreOffice macro : Tools – Macros – Organize Macros – Python.
This allow you to see the python files and also can be run with Run button.
I used LibreOffice version: to make one default python script.
I open my python script with the LibreOffice default interface ( not Writer, Calc, Base, etc.) and this allow me to run python scripts for any type of LibreOffice apllications.
Let’s see the python script:

The output of the running script will be open under new document named Untitled 1.
The content of this result is: The Python version is 3.3.5 and the executable path is C:\Program Files (x86)\LibreOffice 5\program\soffice.bin.
The size of the text is 12, Default Style and font is Liberation Serif.
The python script is simple: Is like take the interface model and put some text into that.
About hasattr part is just for reduce your possible errors and avoid confusing differences in behavior between Python 2 and 3.
Don’t use Python’s hasattr() unless you’re writing Python 3-only code and understand how it works.
The sintax under Python 3 is:
hasattr(object, name)

The arguments are an object and a string. The result is True if the string is the name of one of the object’s attributes, False if not. (This is implemented by calling getattr(object, name) and seeing whether it raises an AttributeError or not.)

Posted in All, LibreOffice, Programming, Python, Windows 8. Tagged with , , , , , , .

Using wevtutil command under Windows – part 001.

This command let you to retrieve information about event logs and publishers, to install and uninstall event manifests,run queries, and to export, archive, and clear logs.
I will start with simple examples to see how is working.
First you need to know the events can be see also with windows tool named Event Viewer.
This tool can be found with Control Panel – search Event.
Take a look at Windows Logs – Application. You can see that some logs are created to show how it works.
For today I will deal with this part. The sintax of this command:
wevtutil [{el | enum-logs}] [{gl | get-log} [/f:]]
[{sl | set-log} [/e:] [/i:] [/lfn:] [/rt:] [/ab:] [/ms:] [/l:] [/k:] [/ca:] [/c:]]
[{ep | enum-publishers}]
[{gp | get-publisher} [/ge:] [/gm:] [/f:]] [{im | install-manifest} ]
[{um | uninstall-manifest} ] [{qe | query-events} [/lf:] [/sq:] [/q:] [/bm:] [/sbm:] [/rd:] [/f:] [/l:] [/c:] [/e:]]
[{gli | get-loginfo} [/lf:]]
[{epl | export-log} [/lf:] [/sq:] [/q:] [/ow:]]
[{al | archive-log} [/l:]]
[{cl | clear-log} [/bu:]] [/r:] [/u:] [/p:] [/a:] [/uni:]

Let’s start:
– show us the four most recent events from the Application log in textual format:
wevtutil qe Application /c:4 /rd:true /f:text
– display the status of the Application log:
wevtutil gli Application
– save logs to C:\backups\today.evtx and clear all of the events from the Application log:
wevtutil cl Application /bu:C:\backups\today.evtx
– show the configuration information about the Application log on the local computer in XML format:
wevtutil gl Application /f:xml
I will come with many example of this command. Thank you.

Posted in All, Commands, Windows 8. Tagged with , , , , .

Test your FLASH Player.

This is a short tutorial about how to test your FLASH Player.
If the update is working or not from vary reasonable reasons, then you can use this link to test it.
This will open one web page and you need to press the Check button.
The output will show you if the FLASH Player is updated.
This issue is important security part of your website.
Also you can see all Security Bulletins and Advisories here.
I hope this tutorial will help much.

Posted in All, Flash, web. Tagged with , , , .

Using python to make authentication into GMail API.

Is simple to do with python. The script I make is simple without classes.
Let’s start with first steps:
You need to create your project and then one credential with json file.
See the next image to see how is your json file. My json file is renamed to client_secret.json and is used by python script.
The json file is into same folder with my python script.
After first run the script will make one json file named: gmail-python-quickstart.json.
Is simple way to get and put credentials to solve authentification to google.
Another step is to add GMail API library to your project. This allow you to use the functions from the GMail API.
The python script is very simple to do. Follow the part of this script.
Is need to use some python modules. One reason is to deal with email format, see email python module.
Some python modules are used to make authentication to google: oauth2client and apiclient.
I used argparse python module , but is no need to add arguments to the script.
The result of this script will send a email to: your@yahoo.com.
The email is created by CreateMessage function.
About the special value “me” that come from Google API and is for user.

Posted in All, Google API, Programming, Python. Tagged with , , , , , , , .