how can i make travis ci use input in python?

I̶ ̶j̶u̶s̶t̶ ̶d̶e̶l̶e̶t̶e̶d̶ ̶t̶h̶e̶ ̶̶i̶n̶p̶u̶t̶(̶)̶̶ ̶a̶n̶d̶ ̶r̶e̶p̶l̶a̶c̶e̶d̶ ̶i̶t̶ ̶w̶i̶t̶h̶ ̶t̶h̶e̶ ̶v̶a̶r̶i̶a̶b̶l̶e̶ ̶I̶ ̶w̶a̶n̶t̶e̶d̶ ̶i̶n̶ ̶a̶ ̶n̶e̶w̶ ̶f̶i̶l̶e̶ ̶I̶ ̶m̶a̶d̶e̶,̶ ̶t̶h̶e̶n̶ ̶I̶ ̶t̶e̶s̶t̶e̶d̶ ̶t̶h̶a̶t̶

A better way is to use the environment variables, so you just change the travis.yml file.

For example change cave = input() to cave = os.eviron['cave'] when in your tavis.yml file it says

env:
  global:
    - cave=4

Don’t forget to import os at the start of your script.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top