Ask coding questions

← Back to all posts
problem with TESTOS 2
Ryanand (32)

so i made some .sh files and when python opens them it does not work perfectly when i do:
(example)

echo hello!

when python opens it, it's this:

echo hello!

instead of:

hello!

help me!

https://repl.it/@Ryanand/TestOS-2-DEMO

Commentshotnewtop
pyelias (931)

Opening a .sh file is not the same as running its contents. If you want to run the files, use os.system like you did in main.py.

Scoder12 (349)

@pyelias Wouldn't subprocess be better?

Ryanand (32)

hmmm cant choose between your advices