Passing options to Python executable in non-interactive mode

后端 未结 4 880
故里飘歌
故里飘歌 2021-01-21 04:09

I would like to pass some options to Python (version 2.6) every time, not just in interactive mode. Is there a file I can put such commands in?

EDIT: Specifically, I\'m

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-21 04:43

    I'm sorry, I don't quite understand exactly what your question is, but, you might try:

    import warnings
    warnings.simplefilter("ignore", DeprecationWarning)
    

    So, this might not really answer the question.

提交回复
热议问题