Python3: Differences in Debian and RedHat Systems

D

DevynCJohnson

Guest
I have a Python3 script (https://launchpad.net/novabot-xaiml) that runs well on Debian-based systems. The code does not contain any distro specific commands or links to system files. In fact, I expect this script to work on all Unix and Unix-like systems. However, I have received some reports that this script crashes immediately when run on RedHat-based systems. I have not heard anything from Slackware-based users, so I do not know if this script has some bug specific to RedHat-based systems or if this script will only work on Debian systems. I am still looking into this issue (have been for some time), but I started to wonder if Python is the same across distros.

Question: Is Python3 standard across all Linux distros? I assume it is, but I am starting to wonder.

Just in case someone wonders or asks, the hashpling is
Code:
#!/usr/bin/env python3

Note: If you decide to try this program on your system, please download and use the pre-release (https://launchpad.net/novabot-xaiml/trunk/v0.8a/ download/Novabot_Pre-Release_v0.9a.tar.xz). If you are a Python programmer and decide to view my code, do so here (http://bazaar.launchpad.net/~devyncjohnson-d/novabot-xaiml/trunk/files).
 
Last edited:


K

KenJackson

Guest
My Fedora 18 and PCLinuxOS systems don't have python3 installed, so without even trying I can see it wont' work.

My Fedora 19 laptop does have python3 installed, though I can't remember if I installed it or if it was installed by default. I tried running just the first 33 lines and it choked on the missing config file, so I created an empty one and ran again:
Code:
$ bin/devn-test
Traceback (most recent call last):
  File "bin/devn-test", line 32, in <module>
  write2file('./mem/BOTINIT_PID', getpid())
  File "bin/devn-test", line 18, in write2file
  with open(openfile, 'w') as file:
FileNotFoundError: [Errno 2] No such file or directory: './mem/BOTINIT_PID'
I didn't investigate further, but I guess directories ./conf and ./mem have to exist for the script to run. It might be better to create them if they don't exist or give an error message saying they must be created first.
 
D

DevynCJohnson

Guest
My Fedora 18 and PCLinuxOS systems don't have python3 installed, so without even trying I can see it wont' work.

My Fedora 19 laptop does have python3 installed, though I can't remember if I installed it or if it was installed by default. I tried running just the first 33 lines and it choked on the missing config file, so I created an empty one and ran again:
Code:
$ bin/devn-test
Traceback (most recent call last):
  File "bin/devn-test", line 32, in <module>
  write2file('./mem/BOTINIT_PID', getpid())
  File "bin/devn-test", line 18, in write2file
  with open(openfile, 'w') as file:
FileNotFoundError: [Errno 2] No such file or directory: './mem/BOTINIT_PID'
I didn't investigate further, but I guess directories ./conf and ./mem have to exist for the script to run. It might be better to create them if they don't exist or give an error message saying they must be created first.
What do you mean you think ./conf/ and ./mem/ should exist? Did you just try to execute the script in a directory separate from the files it came with? How did you test this?

By the way, after some miscellaneous programming for other parts of the script and release some updates, these users have reported that it now works. I never did pin-point the issue. Thanks anyway.
 



Top