Jump to content

Chamar um script python a partir da shell


oliveiracarlos

Recommended Posts

Boa noite,

Tenho um ficheiro "Exercicio.py" que tem como função abrir um ficheiro cujo nome está contido no script, neste caso "Texto.txt".

Gostava de saber se é possivél chamar esta função pela shell de comandos da seguinte forma:

abre trabalho.txt, em vez de python Exercicio.py?

Tenho pesquisado bastante e não consegui nenhuma resposta a esta duvida.

mais uma vez obrigado pela vossa ajuda.

Link to comment
Share on other sites

"[Os jovens da actual geração]não lêem porque não envolve um telecomando que dê para mirar e atirar, não falam porque a trapalhice é rainha e o calão é rei" autor: thoga31

Life is a genetically transmitted disease, induced by sex, with death rate of 100%.

Link to comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.