Skip to content
Advertisement

Tag: python

Is there a way to delete zip archive comments in python?

I have multiple zip archives all with a similar comment. Is there a way to delete the comment from the archives with python and use it over multiple archives with similar comment? What I have tried with single archive This is not working. Comment is not getting deleted in the archive, plus I want this to work on multiple archives

fixing the path so python can recognize z3 modules

I have successfully installed z3 on a remote server where I am not root. when I try to run my python code I get : I understand that I have to add it to PYTHONPATH in order to work and so I went ahead and done that like this: export PYTHONPATH=$HOME/usr/lib/python-2.7/site-packages:$PYTHONPATH I still get the same issue though, how can

How can I pass a python script as an argument?

I’m working on a program that I need to brute force with a 4 pin number in order to get a flag. This is for some Cybersecurity challenges. I was able to create a python script that will print every combination of 4 digits number. However, I don’t know how can I pass that as an argument to the program

fortran subroutine import in python fails

I am trying to import a fortran subroutine into python code. Following this guide https://notmatthancock.github.io/2017/02/10/calling-fortran-from-python.html I have added the following line into my fortran code: However when I try to use f2py -c fireball_ES_param.f -m fireball to create fireball.so to import in my python code I get several hundreds of warnings, which might be the problem but I am not

Ctypes linux behavior differs on py2 and py3

While writing a python wrapper for the getmntent linux libc function, there is a strange difference between the behaviour between python 2.x and 3.x for the following code where most of the real work is done by the C library. Since I interface C code with python often, Can anyone explain or correct what is going wrong? The expected output

Advertisement