Python Forum
Strange problem related to "python service"
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Strange problem related to "python service"
#1
Hello,

I faced to a quite strange problem: if my python program is started as service certain commands aren't executed correctly whereas if I start it in python environment the same commands executed correctly.
For example if the following command
bbb = os.popen('ls').read()
is executed in python environment, in bbb variable there is content of current directory
In the case of launching as service the bbb variable is empty.
Any comments ?
Thanks.
Reply
#2
Resolved.
If program is used as a service, the full path to linux command must be specified, i.e. instead of
bbb = os.popen('ls').read()
do
bbb = os.popen('/bin/ls').read()
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  strange behavior of chess library in Python max22 1 308 Jan-18-2024, 06:35 PM
Last Post: deanhystad
  I have an problem related to ujson in python dixitaditya248 2 2,663 Apr-12-2021, 08:11 AM
Last Post: bowlofred
  Although this is a talib related Q it's mostly related to python module installing.. Evalias123 4 5,681 Jan-10-2021, 11:39 PM
Last Post: Evalias123
  Strange Problem when reading from excel faryad13 3 2,392 Nov-04-2020, 03:48 PM
Last Post: DeaD_EyE
  Super Urgent, work related. Gimp Python tsurubaso 5 2,957 Oct-19-2020, 08:18 AM
Last Post: tsurubaso
  Strange Python Bug Excelsiscelia 2 1,860 Sep-28-2020, 03:12 AM
Last Post: Excelsiscelia
  Beginner, my recursion returns None, and related problem zpacemanzpiff 2 1,806 Jul-02-2020, 04:25 AM
Last Post: zpacemanzpiff
  R-PYTHON INTEGRATION RELATED PROBLEM arnab93 0 1,446 Jun-05-2020, 02:07 PM
Last Post: arnab93
  Use Python to start/stop a server service via a webform? oakleaf2001 0 1,756 Apr-04-2020, 06:14 AM
Last Post: oakleaf2001
  Create Service like window service jesssajan 3 2,986 Mar-06-2020, 01:09 PM
Last Post: ibreeden

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020