10
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

powershellで標準入力の入力元をファイルへ変更するメモ

Last updated at Posted at 2019-05-02

ローカル環境でPythonの標準入力を外部ファイルにするよう
リダイレクトしたかったのだけれど、
powershellだと、

hogehoge.py <  input.txt

しようとすると、

演算子 '<' は、今後の使用のために予約されています。

とエラーが出て使えなかったけれど以下で実行可能でした。

Get-Content input.txt | python .\hogehoge.py

<コメント>
このごろPythonに手を出し始めて、
手始めにpaizaの問題を、VSCode上で解こうとして、行き当たった問題でした。

10
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?