Python Forum
Cannot get cmd to print Python file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannot get cmd to print Python file
#11
(May-15-2024, 10:24 AM)Schauster Wrote: So if I understood correctly, if I have the 3 >>>, then I cannot call python scripts? But if I am outside of the >>>, I can call them if I type python first then the correct path?
Exactly. When you have the 3 >>> you are within the "Python interpreter". You type python statements and they are executed by Python. When you are outside the >>>, you are in Windows' command interpreter and you type Windows commands, which includes calling a program such as python.exe.
Schauster likes this post
« We can solve any problem by introducing an extra level of indirection »
Reply
#12
one of CMD rules is you need add quote "" when the path or the argument has spaces.

example:
 ./"msgbox agrument test.py" skks ksk kks ksv "ss ss" dd  dd dd  "lakk                      aaaa"
Schauster likes this post
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Saving the print result in a text file Calli 8 3,957 Sep-25-2022, 06:38 PM
Last Post: snippsat
  failing to print not matched lines from second file tester_V 14 8,800 Apr-05-2022, 11:56 AM
Last Post: codinglearner
  Print to a New Line when Appending File DaveG 0 1,665 Mar-30-2022, 04:14 AM
Last Post: DaveG
Sad Want to Save Print output in csv file Rasedul 5 15,273 Jan-11-2022, 07:04 PM
Last Post: snippsat
  Convert legacy print file to XLSX file davidm 1 2,465 Oct-17-2021, 05:08 AM
Last Post: davidm
  Why it does not print(file.read()) Rejaul84 1 3,205 Jul-01-2021, 10:37 PM
Last Post: bowlofred
  get two characters, count and print from a .txt file Pleiades 9 4,938 Oct-05-2020, 09:22 AM
Last Post: perfringo
  Cannot redirect print to a file tester_V 3 3,239 Sep-11-2020, 12:21 AM
Last Post: tester_V
  Print/write to file function tpolim008 4 3,857 Apr-01-2020, 07:59 PM
Last Post: tpolim008
  Print date, Time and output to file tpolim008 3 3,196 Mar-26-2020, 06:49 PM
Last Post: ndc85430

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020