Skip to content
Advertisement

Tag: python-3.x

DNS Resolver does not contain answer

I’m trying to automate some of the tasks with python. I have to chcek if some domains are still in ours DNS servers. So searching through stack i found script with dns.resolver and tryied to suit it to my needs. So, the script looks like this: My domainfile.txt looks like this: And error message i recived is: Traceback (most recent

Is there a way to assign different jobs (processes) to specific core in linux using python?

I have python functions that should run parallelly in a linux environment utilizing multi cores. Is there a way to specify which core should be used for each process explicitly? Currently, I am using python multiprocessing module to run these python functions as parallel processes in 4 cores. Answer Possibly with the combination of os.sched_setaffinity and os.sched_getaffinity. The docstring says:

How to make a one-window program with GTK, python and glade?

I’d like to write a program that has one main window and if I click on a button it changes the content of the window (or something similar) and the user can go back after that to the “home page”. I’m using python3, gtk3 and glade on Ubuntu 19.04. Here’s the example.glade XML file And here’s the Python3 file I’d

How to solve the handshake failure using ssl in python?

I try connect to specific https server: But the python says: I try using TLS1: But says: Have a upgraded ssl in python and operative system: From netcat can connect without problems: What is the problem and how to solve this? Answer From the documentation: Since Python 3.2 and 2.7.9, it is recommended to use the SSLContext.wrap_socket() of an SSLContext

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

Advertisement