Python Forum
SyntaxError: EOL while scanning string literal
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SyntaxError: EOL while scanning string literal
#3
import _winreg
from _winreg import *
usr_input = raw_input('What Program would you like to search for? ')
location = 'SYSTEM\ControlSet001\services\'
RegLocation = location + usr_input
def getMDACversion():
    hKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, RegLocation)
    result = _winreg.QueryValueEx(hKey, "ImagePath")
    return result[0]
print getMDACversion()
Reply


Messages In This Thread
RE: SyntaxError: EOL while scanning string literal - by elliep - Jul-27-2017, 07:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Error on import: SyntaxError: source code string cannot contain null bytes kirkwilliams2049 7 7,135 Aug-03-2023, 06:00 PM
Last Post: Gribouillis
  trying to understand a string literal in a basic server program CompleteNewb 4 2,165 Nov-14-2021, 05:33 AM
Last Post: deanhystad
  EOF while scanning triple-quoted string literal louis216 1 3,989 Jun-30-2020, 04:11 AM
Last Post: bowlofred
  invalid literal for int() with base 10: '' mrsenorchuck 5 5,618 Apr-29-2020, 05:48 AM
Last Post: markfilan
  Syntax Error EOL while scanning string literal intjuma 0 2,511 Jun-28-2019, 01:56 AM
Last Post: intjuma
  SyntaxError: EOL while scanning string literal on with open() statement Regulus 3 7,406 Feb-23-2018, 06:40 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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