Python Forum
Running python code meant for Notepad++ plugin independently
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Running python code meant for Notepad++ plugin independently
#4
(Jan-28-2019, 05:39 PM)greektranslator Wrote: Right, thanks, how do I define the file on which the replacements will run?

To my knowledge, a txt file open in this way runs within the python environment, thus not opening any external editors. I'm still a newbie myself. But I've been working on a project that deals with txt editing. It's been my experience that no external editors (notepad, notepad++, gedit, vim, etc.) opens when you run with open() as f:. Beyond that, what you're doing with the for loop, is beyond my knowledge. If I were you, I'd make a smaller test txt file and run some experiments before running it on the real thing.

Scratch that, I reread your post.

To define the file that you are editing, that is the part in the quotes. So think about it this way: with open("C:\\absolute\\path\\to\\file.txt") as f
Reply


Messages In This Thread
RE: Running python code meant for Notepad++ plugin independently - by maxtimbo - Jan-28-2019, 06:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  problem in running a code akbarza 7 653 Feb-14-2024, 02:57 PM
Last Post: snippsat
  writing and running code in vscode without saving it akbarza 1 393 Jan-11-2024, 02:59 PM
Last Post: deanhystad
  the order of running code in a decorator function akbarza 2 529 Nov-10-2023, 08:09 AM
Last Post: akbarza
  how include a python code in notpad++ plugin akbarza 2 650 Sep-25-2023, 08:25 PM
Last Post: deanhystad
Question Trouble installing modules/libraries and getting Notepad++ to show cyrillic letters Dragiev 6 2,264 Jul-24-2022, 12:55 PM
Last Post: Dragiev
  Code running many times nad not just one? korenron 4 1,372 Jul-24-2022, 08:12 AM
Last Post: korenron
  Error while running code on VSC maiya 4 3,776 Jul-01-2022, 02:51 PM
Last Post: maiya
  code running for more than an hour now, yet didn't get any result, what should I do? aiden 2 1,514 Apr-06-2022, 03:41 PM
Last Post: Gribouillis
  Why is this Python code running twice? mcva 5 5,293 Feb-02-2022, 10:21 AM
Last Post: mcva
  Python keeps running the old version of the code quest 2 3,788 Jan-20-2022, 07:34 AM
Last Post: ThiefOfTime

Forum Jump:

User Panel Messages

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