Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Path
#5
(Jul-06-2022, 10:12 PM)deanhystad Wrote: Most command shells have tools for doing this sort of thing. A bash shell script
#!/bin/bash

for py_file in $(find /Users/myusername/PycharmProjects folder *.py)
do
    python $py_file
done
I'm sure something similar can be done in the power shell or which ever shell you prefer.

Thanks for the script. Do I need to run this all the time?

ideally which ever .py exits in my projects folder I should be able to run it without changing the path every time.

Im looking for some solution like this. I guess I am doing some mistake in the interpreter or script profile path settings.
Reply


Messages In This Thread
Script Path - by tfernandes - Jul-05-2022, 08:31 PM
RE: Script Path - by snippsat - Jul-05-2022, 09:14 PM
RE: Script Path - by tfernandes - Jul-06-2022, 08:19 PM
RE: Script Path - by deanhystad - Jul-06-2022, 10:12 PM
RE: Script Path - by tfernandes - Jul-07-2022, 07:58 AM
RE: Script Path - by deanhystad - Jul-07-2022, 12:35 PM
RE: Script Path - by tfernandes - Jul-07-2022, 01:28 PM
RE: Script Path - by jefsummers - Jul-07-2022, 02:10 PM
RE: Script Path - by tfernandes - Jul-07-2022, 09:48 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Script File Failure-Path Error? jerryf 13 3,666 Nov-30-2022, 09:58 AM
Last Post: jerryf
  Simple Python script, path not defined dubinaone 3 2,795 Nov-06-2021, 07:36 PM
Last Post: snippsat
  WebDriverException: Message: 'PATH TO CHROME DRIVER' executable needs to be in PATH Led_Zeppelin 1 2,280 Sep-09-2021, 01:25 PM
Last Post: Yoriz
  .pth file does not show up in sys.path when configuring path. arjunsingh2908 2 5,896 Jul-03-2018, 11:16 AM
Last Post: arjunsingh2908

Forum Jump:

User Panel Messages

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