Community
    • Login

    Python script and windows 10

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    pythonscriptconvertpython
    2 Posts 2 Posters 2.5k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Paulina PadlinkaP Offline
      Paulina Padlinka
      last edited by

      Hi!

      I am having problems with python script on windows 10. On windows 7 is working (its a converting script) but on windows 10 is not. There is an error. Is anybody has problems like this? Have you got any idea what can I do?

      Here is the script:

      import os;
      import sys;
      filePathSrc=“D:\teksty”
      for root, dirs, files in os.walk(filePathSrc):
      for fn in files:
      if fn[-4:] != ‘.jar’ and fn[-5:] != ‘.ear’ and fn[-4:] != ‘.gif’ and fn[-4:] != ‘.jpg’ and fn[-5:] != ‘.jpeg’ and fn[-4:] != ‘.xls’ and fn[-4:] != ‘.GIF’ and fn[-4:] != ‘.JPG’ and fn[-5:] != ‘.JPEG’ and fn[-4:] != ‘.XLS’ and fn[-4:] != ‘.PNG’ and fn[-4:] != ‘.png’ and fn[-4:] != ‘.cab’ and fn[-4:] != ‘.CAB’ and fn[-4:] != ‘.ico’:
      notepad.open(root + “\” + fn)
      console.write(root + “\” + fn + “\r\n”)
      notepad.runMenuCommand(“Encoding”, “Convert to UTF-8”)
      notepad.save()
      notepad.close()

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC Offline
        Claudia Frank @Paulina Padlinka
        last edited by

        @Paulina-Padlinka

        Did you check if python script plugin has been installed successfully?
        Open python script console and print something to it.
        If everything is ok with the installation, did you change the ui language?
        The runMenuCommand function must have the exact spelling.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors