In this post I am going to demonstrate how to connect to an existing i.e. already opened MS Office application(Word / Excel / PowerPoint / Outlook) and check if the opened document / sheet / slide / message has any embedded file(s) in it. We will also discuss how to get around a bug in… Continue reading Automate MS Office Applications using Python win32com module
Author: kbarik
Get IP Address, MAC Address and Network Interface Name Using Python : OS Independent
Using python, we can retrieve IP address and MAC address(Physical address) of a machine on any platform i.e. Windows, Linux or macOS (OSX).
Best way to call a ‘C’ function from Python.
Step 1: Write your 'C' function and save it in a '.c' file. In the below code example, I have written a single 'C' function called 'create_symlink_using_symlinkat'. #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <fcntl.h> #include <errno.h> #include <string.h> int create_symlink_using_symlinkat(char *srcPath, char *targetDir, char *symLinkName) { int dir_fd = open (targetDir, O_RDONLY | O_DIRECTORY);… Continue reading Best way to call a ‘C’ function from Python.
Java: Usage of Super Keyword
Use of super with variables: When a derived class and its base/parent class has same member variable names, to refer to the variable of parent class, we use 'super' keyword. This helps in resolving the ambiguity for the JVM. Example: super.maxSpeed Use of super with methods: This is used when we want to call parent… Continue reading Java: Usage of Super Keyword
Best way to execute VBScript and return value(s) using Python (win32com module)
The technique explained here makes use of Microsoft Script Control object and is a python-only solution. No need to save your script in a separate .vbs file. Everything will be done within the .py file.