Skip to content
Advertisement

Tag: python

python xinetd client disconnection handling

This may or may not being a coding issue. It may also be an xinetd deamon issue, i do not know. I have a python script which is triggered from a linux server running xinetd. Xinetd has been setup to only allow one instance as I only want one machine to be able to connect to the service, which is

Parsing line with delimiter in Python

I have lines of data which I want to parse. The data looks like this: What I want to do is to have a subroutine that parse them and return 2 values (score and expect) for each line. However this function of mine doesn’t seem to work: Please advice what’s the right way to do it? Answer It looks like

Installing a Python program on Linux

I wrote a Python program. I would like to add to it an installation script that will set up everything necessary – like desktop icon, entry in the menu, home directory file, etc. I’m working on Linux (ubuntu). When a Python program is installed, what needs to happen in general? I know that it probably depends on the nature of

Is there a benefit to defining a class inside another class in Python?

What I’m talking about here are nested classes. Essentially, I have two classes that I’m modeling. A DownloadManager class and a DownloadThread class. The obvious OOP concept here is composition. However, composition doesn’t necessarily mean nesting, right? I have code that looks something like this: But now I’m wondering if there’s a situation where nesting would be better. Something like:

Advertisement