<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[I wanna to run cmd.exe to open url in default browser]]></title><description><![CDATA[<p dir="auto">objective: create url in python script; load page in default browser in win10 from npp python script.<br />
status: aint got no satisfaction</p>
<p dir="auto">code frag:  I ran the following from console input area at bot of console one line at a time<br />
x=r’cmd.exe start https:yahoo.com’<br />
console.write(x) #show x on console</p>
<p dir="auto">y=console.run(x)</p>
<p dir="auto">console.write(y) #show y  on console</p>
<p dir="auto">console output:<br />
Python 2.7.6-notepad++ r2 (default, Apr 21 2014, 19:26:54) [MSC v.1600 32 bit (Intel)]<br />
Initialisation took 31ms<br />
Ready.</p>
<blockquote>
<blockquote>
<blockquote>
<p dir="auto">x=r’cmd.exe start https:yahoo.com’<br />
console.write(x) #show x on console<br />
cmd.exe start https:yahoo.com&gt;&gt;&gt; y=console.run(x)<br />
Microsoft Windows [Version 10.0.17134.706]<br />
© 2018 Microsoft Corporation. All rights reserved.</p>
</blockquote>
</blockquote>
</blockquote>
<p dir="auto">C:\Program Files (x86)\Notepad++&gt;&gt;&gt;&gt; console.write(y) #show y  on console</p>
<p dir="auto">help: what am I doing wrong?<br />
start:http:yahoo.com #launchs yahoo in a new tab in my browser  from a cmd window</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/17439/i-wanna-to-run-cmd-exe-to-open-url-in-default-browser</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Jul 2026 07:41:53 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/17439.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 11 Apr 2019 22:29:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to I wanna to run cmd.exe to open url in default browser on Sat, 13 Apr 2019 04:48:51 GMT]]></title><description><![CDATA[<p dir="auto">@kopalypse<br />
Thank you for the webbrowser suggestion.  I tried it and it gets me 90% to my objective.<br />
on my PC It lauches a window in internet exploror 11, not my default browser.  Thank you for the suggestion and I will look deeper down this path to see if I can change this default.</p>
<p dir="auto">@ PeterJones<br />
your code samples and comments  are perfect guidance for my knowledge level.<br />
I have much to learn, thank you all for your responses.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42232</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42232</guid><dc:creator><![CDATA[Raymond Lew]]></dc:creator><pubDate>Sat, 13 Apr 2019 04:48:51 GMT</pubDate></item><item><title><![CDATA[Reply to I wanna to run cmd.exe to open url in default browser on Fri, 12 Apr 2019 16:00:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/raymond-lew" aria-label="Profile: Raymond-Lew">@<bdi>Raymond-Lew</bdi></a> said:</p>
<blockquote>
<p dir="auto">help: what am I doing wrong?</p>
</blockquote>
<p dir="auto">I’ll assume that the forum formatting was what deleted your <code>//</code>, because what rendered as <code>https:yahoo.com</code> would never work, since it’s really <code>https://yahoo.com</code>.</p>
<p dir="auto">Notice you said “<code>start:http:yahoo.com</code> #launchs yahoo in a new tab in my browser from a cmd window”.  And then you didn’t pass “start” to the <code>console.run()</code> command?  That was part of your problem.  Unfortunately, <code>start</code> is not an executable that <code>console.run()</code> can see.  Instead, you have to tell <code>console.run()</code> to launch cmd.exe, and tell cmd.exe to launch start, and tell start to launch the URL.</p>
<p dir="auto">The following sequence of interactive commands opened three tabs of <a href="http://yahoo.com" rel="nofollow ugc">yahoo.com</a> in my default browser:</p>
<pre><code>&gt;&gt;&gt; console.run('cmd /c start https://yahoo.com/')
0
&gt;&gt;&gt; url = r'https://yahoo.com/'
&gt;&gt;&gt; console.run('cmd /c start '+url)
0
&gt;&gt;&gt; console.run('cmd /c start {}'.format(url))
0
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/42213</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42213</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 12 Apr 2019 16:00:09 GMT</pubDate></item><item><title><![CDATA[Reply to I wanna to run cmd.exe to open url in default browser on Fri, 12 Apr 2019 10:27:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/raymond-lew" aria-label="Profile: Raymond-Lew">@<bdi>Raymond-Lew</bdi></a></p>
<p dir="auto">within the script you might do</p>
<pre><code>import webbrowser
webbrowser.open(r'https://notepad-plus-plus.org/community')
</code></pre>
<p dir="auto">Just a note, if you are using PythonScript plugin you have to use python2 syntax.<br />
Migration to python3 has not be done yet.  and to add code like this to the forum<br />
here, you can type <code>~~~ YOUR CODE ~~~</code></p>
]]></description><link>https://community.notepad-plus-plus.org/post/42197</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42197</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Fri, 12 Apr 2019 10:27:25 GMT</pubDate></item><item><title><![CDATA[Reply to I wanna to run cmd.exe to open url in default browser on Fri, 12 Apr 2019 03:17:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan" aria-label="Profile: Alan">@<bdi>Alan</bdi></a> Kilborn<br />
my end goal is to simply launch  a uri(constructed from text in my doc) in my default browser   as a new tab   I’m a python <a href="http://newbie.so" rel="nofollow ugc">newbie.so</a> if there are good, simple python ways to  do what I want, I obviously don’t know where to start.  I’m happy to follow any advice/pointers you’re ready to offer.  let me know If you would like more backgound;  the yahoo uri is just my quick test case, obviously  does not work.  Thanks in Advance,</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42193</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42193</guid><dc:creator><![CDATA[Raymond Lew]]></dc:creator><pubDate>Fri, 12 Apr 2019 03:17:22 GMT</pubDate></item><item><title><![CDATA[Reply to I wanna to run cmd.exe to open url in default browser on Fri, 12 Apr 2019 02:56:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/raymond-lew" aria-label="Profile: Raymond-Lew">@<bdi>Raymond-Lew</bdi></a></p>
<p dir="auto">Not sure what the end goal truly is.  If the goal is simply to open a url in a browser there are better ways.  Python has process control commands, why not use them rather than trying some awful convolution with CMD.EXE?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42192</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42192</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 12 Apr 2019 02:56:11 GMT</pubDate></item></channel></rss>