Python Forum
Difference between Python's os.system and Perl's system command
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Difference between Python's os.system and Perl's system command
#1
Question 
On Windows 10, I am converting a perl script to python, but I have a problem.

The command in the perl script file is:

Quote:system ("a dot exe file with 3 options");

In Python, I use the exact same argument in the following system call:

os.system ("a dot exe file with 3 options")
Note: The two above commands have the exact same string!

My problem is that the executable program is supposed to create 4 files in C:\Temp. The perl script does create all 4 files as it is supposed too. But, the Python script creates only 1 file then gives me a popup window saying, "COULD NOT OPEN THIS C:\TEMP". The program then deletes the file it created.

I know nothing about the executable. It was created my someone years ago.

I tried changing one property of the executable file, so that all users execute it as an administrator. But, that didn't solve the problem.

I tried making all the files involved to be readable but that also didn't work.

Is there a difference between the Perl "system(...)" command and the Python "os.system(...)" command that I should be aware of?

Should I use a different command instead of "os.system()"?

Thank you,
Mike
Reply


Messages In This Thread
Difference between Python's os.system and Perl's system command - by Agile741 - Nov-27-2019, 09:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  FileNotFoundError: [WinError 2] The system cannot find the file specified NewBiee 2 1,496 Jul-31-2023, 11:42 AM
Last Post: deanhystad
  What is the difference between Command Prompt and Sublimes yaoyao22 1 588 Jul-09-2023, 02:56 PM
Last Post: snippsat
  Os.system("shutdown"); command not found cosmin1805 4 1,617 Nov-13-2022, 02:07 PM
Last Post: cosmin1805
  [split] Please help with menu system dvejsa 4 1,234 Sep-13-2022, 08:01 PM
Last Post: dvejsa
  Alarm system with state, class, enum. Frankduc 0 1,240 May-04-2022, 01:26 PM
Last Post: Frankduc
  simulation of alarm system Frankduc 6 1,596 Apr-21-2022, 03:45 PM
Last Post: Frankduc
  Python Flask Realtime system printout (console) ffmpeg jttolleson 3 2,860 Apr-18-2022, 06:39 PM
Last Post: jttolleson
  Avoid third party functions to wrote my python code into system debug-log? mark 9 2,139 Apr-09-2022, 08:41 PM
Last Post: mark
  Help with multi-window system garynewport 3 2,176 Mar-16-2022, 03:05 AM
Last Post: deanhystad
  Advice for Inventory System Extra 0 1,283 Feb-18-2022, 09:25 PM
Last Post: Extra

Forum Jump:

User Panel Messages

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