Skip to content

Tag: python

Run Makefile on pip install

I have some protocol buffer definitions which need to be built to Python source as part of the pip install process. I’ve subclassed the setuptools.command.install command in setup.py but I think it’s trying to run the Makefile after the package is installed so the sources aren’t recognised. …

Understanding free OPC/UA code in python

I am working on OPCUA in python. I am using freeopc. I have used their server_minimal & client_minimal example and it is running fine. I am having some issues understanding the code. As far as I know the OPCUA stack, it has address space which is like a collection of all the nodes. These nodes then furthe…

How to add a newline function to JSON using Python

I have a JSON that I had to manipulate and the code looks like this. I had to manipulate the data because of an invalid part of the data that I could not use when uploading to BigQuery. However out_file.write(“n”) is not making the JSON write each set of data on a newline like it has in the previo…

Convert SAS data to a python dataframe

I have this small little code here to import a SAS file into dataframe in Python. The code runs forever without any output. The sas file I’m trying to import is 1.5gb. Answer You should use the native pandas function pandas.read_sas it’s faster than iterating through the file as you did. Here is t…