《Disney +》 迪士尼、Marvel、彼思、星球大戰…  單刀直入新《NieR Replicant ver.1.22474487139…》遊戲畫面   「Gran Saga」正式上線!已獲得App Store排行榜第1位!   發光電競口罩「Razer Zephyr」突然在發表會#RazerCon2021發售!立即售罄!   Astro’s Playroom:PlayStation 俏皮客串角色的幕後花絮   鎖定本週五的State of Play,觀看《Deathloop》的加長版介紹   The Last of Us Day 2021社群慶典   Cygames成立以遠端工作為主的3DCG製作子公司「株式會社CySphere」   社會人士專屬的電競聯賽!日本「AFTER 6 LEAGUE」Season2確定登場! 

Python CLI 的快速語法(Syntax)檢查

商業

Python、Python3 寫好程式後,程式不想要執行的情況,想要快速確認是否有語法異常,可以用下述作法達成:

  • python -m py_compile example.py
  • python3 -m py_compile example.py

故意寫個錯誤來跑 (example.py 寫個 「aaa x =」)

  • python3 -m py_compile example.py # 正常就沒有任何事情,有錯誤會如下述:
    File "example.py", line 3
    aaa x =
    ^ SyntaxError: invalid syntax

另外還有下述可以使用:

Tsung

隨機商業新聞

NordVPN