Skip to content

Tag: python

Reading a C-struct via sockets into python

On an embedded device running a C application, I have defined this struct: On request, I send this struct via sockets: and read it from a Python script on my desktop: This is the data printed to console on my desktop: How can i reassemble the data into a YourStruct? Note that the embedded device uses little e…

How do I extract value of XML attribute in Python?

I need to extract the value of an attribute in an XML document using Python. For example, If I have an XML document like this: How would I be able get the text ‘smallHuman’ or ‘largeHuman’ to store in a variable? Edit: I’m very new to Python and may require a lot of assistance. T…

Upload to pypi from Gitlab Pipelines

I’m trying to upload a package to pypi using a Gitlab CI job, but I cannot make it work :/ Anyone has a working example? What I have tried so far in my .gitlab-ci.yaml (from my local machine all of them are working): Twine with a .pypirc file Same as before but with $VARIABLE Two options before but usin…