Python

Automate MS Office Applications using Python win32com module

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

C, Python

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.

Core Java, Java

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