Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Insert scrypt inside file.py ?
#12
(Oct-06-2019, 08:13 PM)Gribouillis Wrote:
JohnnyCoffee Wrote:How do I insert any python script into file2.py ?
You can do
 from pathlib import Path Path('file2.py').write_text( """ print("hello world, I'm file2.py") """) 
Thanks.
Reply


Messages In This Thread
Insert scrypt inside file.py ? - by JohnnyCoffee - Oct-05-2019, 02:59 PM
RE: Insert scrypt inside file.py ? - by snippsat - Oct-05-2019, 07:45 PM
RE: Insert scrypt inside file.py ? - by Gribouillis - Oct-05-2019, 09:30 PM
RE: Insert scrypt inside file.py ? - by Gribouillis - Oct-06-2019, 06:25 AM
RE: Insert scrypt inside file.py ? - by snippsat - Oct-06-2019, 08:54 AM
RE: Insert scrypt inside file.py ? - by snippsat - Oct-06-2019, 06:32 PM
RE: Insert scrypt inside file.py ? - by Gribouillis - Oct-06-2019, 08:13 PM
RE: Insert scrypt inside file.py ? - by JohnnyCoffee - Oct-09-2019, 03:27 PM

Forum Jump:

User Panel Messages

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