473,394 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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

import subprocess
p=subprocess.Popen(["C:\Program Files\WindowsApps\Microsoft.MicrosoftStickyNotes_3 .1.55.0_x64__8wekyb3d8bbwe\Microsoft.Notes.exe"],stdin=subprocess.PIPE)
p.stdin.write('hello')
Mar 20 '19 #1
1 1023
dwblas
626 Expert 512MB
If you print "C:\Program Files\WindowsApps\Microsoft.MicrosoftStickyNotes_3 .1.55.0_x64__8wekyb3d8bbwe\Microsoft.Notes.exe" 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
Mar 20 '19 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: White Wolf | last post by:
Hello, I am looking for Hungarians, who read this newsgroup and are interested in the Standard C++ Programming Language. I am trying to help to organize a group of Hungarians, who are expert...
13
by: Stumped and Confused | last post by:
Hello, I really, really, need some help here - I've spent hours trying to find a solution. In a nutshell, I'm trying to have a user input a value in form's textfield. The value should then be...
4
by: Nevyn Twyll | last post by:
Is there any way I can use a code-behind event (like a btn_Click event) to write some javascript into the Response? I was thinking of using Response.Write() to write the following code into the...
2
by: agphoto | last post by:
There is big or problem in open file in read and write mode.. $file = "data.txt"; $fp = fopen($file,"w+"); $line = fgets($fp,"120"); // i need only 1st line to read and upto 120 bytes echo...
9
by: Phoe6 | last post by:
Hi all, Consider this scenario, where in I need to use subprocess to execute a command like 'ping 127.0.0.1' which will have a continuous non- terminating output in Linux. # code # This...
3
by: Jarek Zgoda | last post by:
Hi, all, anybody has an idea on how to set ulimit (-v in my case, linux) for process started using subprocess.Popen? -- Jarek Zgoda Skype: jzgoda | GTalk: zgoda@jabber.aster.pl | voice:...
5
by: satyabhaskar | last post by:
hi all, In my web page i have created radio buttons dynamically on to the page .....following is my code string Course, Semester, Section; int rowsCount; string con =...
0
by: kavijaya | last post by:
Error message: "Unable to retrieve nodes using SelectSingleNode." Can anyone tell me correct way of implementing this? The following code always returns null: (XML I am working with) <?xml...
1
by: chakrod swapna | last post by:
hiiiiiii , im trying to write c code for imagedisplay,and at the basic stages i get struct of problem ' error: unknown type name ‘AnsiString’ ' plsssss help me...... my code is here: int...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.