i am unable to open stikcy note using subprocess and write to it please seee the code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • avgrohan
    New Member
    • Mar 2019
    • 1

    i am unable to open stikcy note using subprocess and write to it please seee the code

    import subprocess
    p=subprocess.Po pen(["C:\Program Files\WindowsAp ps\Microsoft.Mi crosoftStickyNo tes_3.1.55.0_x6 4__8wekyb3d8bbw e\Microsoft.Not es.exe"],stdin=subproce ss.PIPE)
    p.stdin.write(' hello')
  • dwblas
    Recognized Expert Contributor
    • May 2008
    • 626

    #2
    If you print "C:\Program Files\WindowsAp ps\Microsoft.Mi crosoftStickyNo tes_3 .1.55.0_x64__8w ekyb3d8bbwe\Mic rosoft.Notes.ex e" it will likely contain things you didn't put in it. That is because the backslash, "\", followed by a letter, can be translated to some other character, for example, "\t" is translated to a tab. You can use forward slashed in Python, no matter what your OS. Another option is to use raw strings https://docs.python.org/2.0/ref/strings.html

    Comment

    Working...