From me at the-compiler.org Tue Aug 2 23:02:52 2016 From: me at the-compiler.org (Florian Bruhin) Date: Tue, 2 Aug 2016 23:02:52 +0200 Subject: [qutebrowser] qutebrowser v0.8.1 released! (with important privacy fix) Message-ID: <20160802210252.kv7c5oy5hvloaomz@tonks> Hi, I'm happy to annouce the release of qutebrowser v0.8.2! This release comes with various bugfixes, including a fix for a privacy issue: ---------------------------------------------------------------------- Since v0.2.0, qutebrowser didn't set QtWebKit's private browsing flag correctly if it was changed in a running instance (:set general private-browsing true). While everything handled by qutebrowser directly (history, cookies, cache) is not affected, some things handled by QtWebKit are affected: - HTML5 local storage - Passing private browsing mode to NPAPI plugins (like Flash) - Possibly other locations where QtWebKit checks private browsing which I didn't find due to WebKit's complexity. qutebrowser instances launched after private-browsing was set in the config are not affected. I recommend you update ASAP, and review your local-storage and offline-storage folders for unwanted entries. Their location: - Linux: ~/.local/share/qutebrowser/ - Windows: %APPDATA%\Local\qutebrowser\data - OS X: ~/Library/Application Support/qutebrowser If you're for some reason unable to update, this patch will fix the issue: https://github.com/The-Compiler/qutebrowser/commit/43ff1b0d97d989aca1002db7667f7a1b84a686d9 As a workaround, you can also do :restart after setting private-browsing. Feel free to contact me privately for any questions, and sorry for one of those "this really shouldn't have happened" bugs :-/ ---------------------------------------------------------------------- Other than that issue, this release also fixes various bugs introduced in v0.8.0, as well as some older issues: - Fixed crash when using hints with JS disabled in some rare circumstances. - When hinting input fields (`:t`), also consider input elements without a type. - Fixed crash when opening an invalid URL with a percent-encoded and a real @ in it - Fixed default `;o` and `;O` bindings - Fixed local storage not working (and possible other bugs) when using a relative path with `--basedir`. - Fixed crash when deleting a quickmark with Ctrl-D - Fixed HTML5 video playback on Windows - Fixed crash when using `:prompt-open-download` with a file with chars not encodable with the OS' filesystem encoding (e.g. with `LC_ALL=C`) - Fixed `:prompt-open-download` with a too long filename (> 255 bytes) - Fixed crash when cancelling a download after doing `:prompt-open-download` - Fixed crash when writing a download to disk fails with `:prompt-open-download`. Florian -- http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I love long mails! | http://email.is-not-s.ms/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From ryan at rcorre.net Wed Aug 3 14:43:18 2016 From: ryan at rcorre.net (Ryan Roden-Corrent) Date: Wed, 3 Aug 2016 08:43:18 -0400 Subject: [qutebrowser] Help me change Control-W behavior. In-Reply-To: <20160730020500.GA518@zen-arch> References: <20160730020500.GA518@zen-arch> Message-ID: <20160803124318.GA971@desktop-arch.localdomain> To follow up, this was just implemented in two recent PRs: https://github.com/The-Compiler/qutebrowser/pull/1712 https://github.com/The-Compiler/qutebrowser/pull/1715 unix-filename-rubout deletes everything back to the previous /, backward-delete-word deletes everything back to the last non-alphanumeric character. -Ryan On Fri 07/29/16 10:05PM, Ryan Roden-Corrent wrote: > This PR [https://github.com/The-Compiler/qutebrowser/pull/1592] changed the > behavior to match readline's unix-word-rubout. What you're looking for is what > readline calls 'unix-filename-rubout'. You can press ctrl-backspace for this > behavior, but it can't be rebound. I've filed an issue for this, as I find it > useful as well: https://github.com/The-Compiler/qutebrowser/issues/1710. > > On Fri 07/29/16 04:19PM, Ernesto Gabriel wrote: > > hey dev, > > > > Before the latest update, pressing Control-W when there was prompt in the > > statusbar deleted everything back to a slash or space. > > Now, it deletes everything back to the space, and it's annoying because > > when it prompts "save file to", it deletes the entire suggested path and > > requires me to type in the path again. > > How can I revert this behavior? > > > > sincerely, > > > > a fan of qutebrowser. From q09yyd4t1ph7a1 at gmail.com Mon Aug 22 03:18:17 2016 From: q09yyd4t1ph7a1 at gmail.com (Ernesto Gabriel) Date: Sun, 21 Aug 2016 21:18:17 -0400 Subject: [qutebrowser] set up rtorrent to open when clicking on a magnet Message-ID: just like subject says I don't even know how to do it for normal torrent clients such as transmission rtorrent is different because it's a command line application the way it would open is like so "terminal-emulator-name -e rtorrent" I don't use a desktop environment btw. -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at the-compiler.org Mon Aug 22 07:06:40 2016 From: me at the-compiler.org (Florian Bruhin) Date: Mon, 22 Aug 2016 07:06:40 +0200 Subject: [qutebrowser] set up rtorrent to open when clicking on a magnet In-Reply-To: References: Message-ID: <20160822050640.x4zdp6x2cv37edgm@tonks> * Ernesto Gabriel [2016-08-21 21:18:17 -0400]: > just like subject says > I don't even know how to do it for normal torrent clients such as > transmission > rtorrent is different because it's a command line application > the way it would open is like so > "terminal-emulator-name -e rtorrent" > I don't use a desktop environment btw. qutebrowser uses Qt's QDesktopService.openUrl, which in turn uses xdg-open on Linux. You can probably *somehow* configure XDG to do what you want, but I'm afraid I have no idea how off-hand. Florian -- http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I love long mails! | http://email.is-not-s.ms/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: From zkdarian at gmail.com Sat Aug 27 04:24:47 2016 From: zkdarian at gmail.com (Z. K. Darian) Date: Fri, 26 Aug 2016 19:24:47 -0700 Subject: [qutebrowser] Qutebrowser audio with JACK backend In-Reply-To: References: Message-ID: <49931518-1a63-3921-fa6c-8d4767751061@gmail.com> How should I go about using Qutebrowser on a JACK server? Is there a configuration for QtMultimedia that'll do this for me? I can't find any documentation on it. From Z1693060 at students.niu.edu Sat Aug 27 16:06:32 2016 From: Z1693060 at students.niu.edu (Abraham Baker) Date: Sat, 27 Aug 2016 14:06:32 +0000 Subject: [qutebrowser] Qutebrowser crashes on wake from suspend Message-ID: Hi, Has anyone else had qutebrowser crash almost every time their computer wakes from suspend? I'm using: qutebrowser v0.8.2 Git commit: CPython: 3.5.2 Qt: 5.7.0 PyQt: 5.7 sip: 4.18 colorama: no pypeg2: 2.15 jinja2: 2.8 pygments: 2.1.3 yaml: 3.11 cssutils: no typing: yes PyQt5.QtWebEngineWidgets: no pdf.js: no Webkit: 538.1 Harfbuzz: old SSL: OpenSSL 1.0.2h 3 May 2016 Platform: Linux-4.7.1-1-ARCH-x86_64-with-arch, 64bit Desktop: awesome Frozen: False Imported from /usr/lib/python3.5/site-packages/qutebrowser OS Version: --- /etc/os-release --- NAME="Arch Linux" ID=arch PRETTY_NAME="Arch Linux" Thanks, Abe -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at seir.ch Sat Aug 27 19:23:52 2016 From: me at seir.ch (Rudi Seitz) Date: Sat, 27 Aug 2016 19:23:52 +0200 Subject: [qutebrowser] Qutebrowser crashes on wake from suspend In-Reply-To: References: Message-ID: <20160827192352.85cbaffddd292d75dfc247bb@seir.ch> > Has anyone else had qutebrowser crash almost every time their computer wakes from suspend? I cannot reproduce, and I'm using hiberate all the time. My setup: qutebrowser v0.8.2 Git commit: CPython: 3.5.2 Qt: 5.7.0 PyQt: 5.7 sip: 4.18 colorama: no pypeg2: 2.15 jinja2: 2.8 pygments: 2.1.3 yaml: 3.11 cssutils: no typing: yes PyQt5.QtWebEngineWidgets: no pdf.js: no Webkit: 538.1 Harfbuzz: old SSL: OpenSSL 1.0.2h 3 May 2016 Style: QFusionStyle Platform: Linux-4.7.2-1-ARCH-x86_64-with-arch, 64bit Desktop: None Frozen: False Imported from /usr/lib/python3.5/site-packages/qutebrowser OS Version: --- /etc/os-release --- NAME="Arch Linux" ID=arch PRETTY_NAME="Arch Linux" seir -- Powered by schokokeks.org -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 455 bytes Desc: not available URL: From me at the-compiler.org Sun Aug 28 00:04:10 2016 From: me at the-compiler.org (Florian Bruhin) Date: Sun, 28 Aug 2016 00:04:10 +0200 Subject: [qutebrowser] Qutebrowser audio with JACK backend In-Reply-To: <49931518-1a63-3921-fa6c-8d4767751061@gmail.com> References: <49931518-1a63-3921-fa6c-8d4767751061@gmail.com> Message-ID: <20160827220410.7ft3mslf32a27ux6@tonks> Hi, first of all, please send a new mail to the list instead of replying to an existing one when they're not related - your mail is now in the "set up rtorrent to open when clicking on a magnet" thread despite not being related to that at all ;) * Z. K. Darian [2016-08-26 19:24:47 -0700]: > How should I go about using Qutebrowser on a JACK server? Is there a > configuration for QtMultimedia that'll do this for me? I can't find any > documentation on it. It just uses GStreamer as far as I know - so I'd hope something like this would help: http://jackaudio.org/faq/gstreamer_via_jack.html Florian -- http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I love long mails! | http://email.is-not-s.ms/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: From me at the-compiler.org Sun Aug 28 00:07:15 2016 From: me at the-compiler.org (Florian Bruhin) Date: Sun, 28 Aug 2016 00:07:15 +0200 Subject: [qutebrowser] Qutebrowser crashes on wake from suspend In-Reply-To: <20160827192352.85cbaffddd292d75dfc247bb@seir.ch> Message-ID: <20160827220715.lrvv6v2yhhmnapoh@tonks> * Abraham Baker [2016-08-27 14:06:32 +0000]: > Has anyone else had qutebrowser crash almost every time their computer wakes from suspend? I've seen one or two such crashes, but definitely not "almost every time". Either way it's unfortunately unlikely I can do anything about it other than hoping it'll go away with the new QtWebEngine backend ;) * Rudi Seitz [2016-08-27 19:23:52 +0200]: > I cannot reproduce, and I'm using hiberate all the time. I'm guessing you mean suspend-to-disk with hibernate, while Abe means suspend-to-RAM. Though from the point of view of an application, I wouldn't really expect a big difference... Florian -- http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I love long mails! | http://email.is-not-s.ms/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: From davidnebauer3 at bigpond.com Sun Aug 28 03:08:13 2016 From: davidnebauer3 at bigpond.com (David Nebauer) Date: Sun, 28 Aug 2016 10:38:13 +0930 Subject: [qutebrowser] Where is log output in Windows Message-ID: <89740555-dfd1-6340-bcbb-ed7b57acd972@bigpond.com> Does anyone know how to access log output in Windows? When I run "qutebrowser --loglevel info --debug" in a linux console the log messages are output to the console. If I run the same command at a Windows 7 command prompt there is no output. ---------------------------------------------------------------- qutebrowser v0.8.2 Git commit: v0.8.2-dirty (2016-08-02 18:33:59 +0200) CPython: 3.4.3 Qt: 5.5.1 PyQt: 5.5.1 sip: 4.17 colorama: 0.3.7 pypeg2: 2.15 jinja2: 2.8 pygments: 2.1.3 yaml: 3.11 cssutils: 1.0.1 $Id$ typing: no PyQt5.QtWebEngineWidgets: no pdf.js: 1.4.20 (bundled) Webkit: 538.1 Harfbuzz: system SSL: OpenSSL 1.0.1i 6 Aug 2014 Style: QWindowsVistaStyle Platform: Windows-7-6.1.7601-SP1, 64bit Desktop: None Frozen: True Imported from C:\Program Files\qutebrowser\library.zip\qutebrowser OS Version: 7, 6.1.7601, SP1, Multiprocessor Free From davidnebauer3 at bigpond.com Sun Aug 28 03:38:04 2016 From: davidnebauer3 at bigpond.com (David Nebauer) Date: Sun, 28 Aug 2016 11:08:04 +0930 Subject: [qutebrowser] How to run a userscript in Windows Message-ID: <44030f13-2295-eb90-9755-0887b7d446dd@bigpond.com> On linux I can successfully run a userscript by placing it in ~/.local/share/qutebrowser/userscripts and running the following command in qutebrowser: :spawn --userscript SCRIPT.py where SCRIPT.py is the script file name. I can also run the same command with the full script filepath: :spawn --userscript ~/.local/share/qutebrowser/userscripts/SCRIPT.py On windows I placed the same script in C:\Users\ME\AppData\Local\qutebrowser\userscripts where ME is my windows user account name. The python launcher is set up such that python scripts can run directly from the command line. Running this command in qutebrowser: :spawn --userscript SCRIPT.py resulted in the error: Error while spawning userscript: The process failed to start. The same error occurs if the full path is used: :spawn --userscript C:\Users\ME\AppData\Local\qutebrowser\userscripts\SCRIPT.py In fact, the same error occurs if I use a nonsense, non-existent script name or path, so a possible cause of the errors is that qutebrowser is unable to locate the script filein windows. I also tried the following variations: :spawn --userscript SCRIPT :spawn --userscript C:\Users\ME\AppData\Local\qutebrowser\userscripts\SCRIPT :spawn --userscript file:///C:/Users/ME/AppData/Local/qutebrowser/userscripts/SCRIPT.py :spawn --userscript file:///C:/Users/ME/AppData/Local/qutebrowser/userscripts/SCRIPT :spawn --userscript file:///C/Users/ME/AppData/Local/qutebrowser/userscripts/SCRIPT.py :spawn --userscript file:///C/Users/ME/AppData/Local/qutebrowser/userscripts/SCRIPT but all resulted in the same error message. How do you run userscripts in windows? ------------------------------------------------------------- qutebrowser v0.8.2 Git commit: v0.8.2-dirty (2016-08-02 18:33:59 +0200) CPython: 3.4.3 Qt: 5.5.1 PyQt: 5.5.1 sip: 4.17 colorama: 0.3.7 pypeg2: 2.15 jinja2: 2.8 pygments: 2.1.3 yaml: 3.11 cssutils: 1.0.1 $Id$ typing: no PyQt5.QtWebEngineWidgets: no pdf.js: 1.4.20 (bundled) Webkit: 538.1 Harfbuzz: system SSL: OpenSSL 1.0.1i 6 Aug 2014 Style: QWindowsVistaStyle Platform: Windows-7-6.1.7601-SP1, 64bit Desktop: None Frozen: True Imported from C:\Program Files\qutebrowser\library.zip\qutebrowser OS Version: 7, 6.1.7601, SP1, Multiprocessor Free From Z1693060 at students.niu.edu Sun Aug 28 22:25:53 2016 From: Z1693060 at students.niu.edu (Abraham Baker) Date: Sun, 28 Aug 2016 20:25:53 +0000 Subject: [qutebrowser] Qutebrowser crashes on wake from suspend In-Reply-To: <20160827220715.lrvv6v2yhhmnapoh@tonks> References: <20160827192352.85cbaffddd292d75dfc247bb@seir.ch> , <20160827220715.lrvv6v2yhhmnapoh@tonks> Message-ID: I cleared all history + local storage, but the crash just happened again (so this occurs roughly daily since I suspend/wake ~4 times a day). It has to do with the Qt library since I always get this error: "Unfortunately, this crash occurred in Qt (the library qutebrowser uses), and QtWebKit (the current backend) is not maintained anymore. Since I can't do much about those crashes I disabled the crash reporter for this case, but this will likely be resolved in the future with the new QtWebEngine backend." So, it seems like this will get fixed once you replace the backend! Thanks for working on this so much; qute seems like one of the few browsers that offers vim-bindings (that doesn't lose support with every update like certain FF addons :) Abe ________________________________ From: qutebrowser on behalf of Florian Bruhin Sent: Saturday, August 27, 2016 5:07:15 PM To: qutebrowser at lists.qutebrowser.org Subject: Re: [qutebrowser] Qutebrowser crashes on wake from suspend * Abraham Baker [2016-08-27 14:06:32 +0000]: > Has anyone else had qutebrowser crash almost every time their computer wakes from suspend? I've seen one or two such crashes, but definitely not "almost every time". Either way it's unfortunately unlikely I can do anything about it other than hoping it'll go away with the new QtWebEngine backend ;) * Rudi Seitz [2016-08-27 19:23:52 +0200]: > I cannot reproduce, and I'm using hiberate all the time. I'm guessing you mean suspend-to-disk with hibernate, while Abe means suspend-to-RAM. Though from the point of view of an application, I wouldn't really expect a big difference... Florian -- http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I love long mails! | http://email.is-not-s.ms/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at the-compiler.org Mon Aug 29 07:29:05 2016 From: me at the-compiler.org (Florian Bruhin) Date: Mon, 29 Aug 2016 07:29:05 +0200 Subject: [qutebrowser] Where is log output in Windows In-Reply-To: <89740555-dfd1-6340-bcbb-ed7b57acd972@bigpond.com> References: <89740555-dfd1-6340-bcbb-ed7b57acd972@bigpond.com> Message-ID: <20160829052905.ljzmtfp3zdgcatvq@tonks> * David Nebauer [2016-08-28 10:38:13 +0930]: > Does anyone know how to access log output in Windows? > > When I run "qutebrowser --loglevel info --debug" in a linux console the log > messages are output to the console. > > If I run the same command at a Windows 7 command prompt there is no output. As far as I know, on Windows, an application can be marked either as windowed application (no stdout available at all), or as console application (a console window will pop up on every start from the GUI). qutebrowser is configured as the former, so I don't think there's any way to get output in the console. What you can do however is ":open qute:log" to view the logs of a running qutebrowser instance. Florian -- http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I love long mails! | http://email.is-not-s.ms/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: From davidnebauer3 at bigpond.com Wed Aug 31 15:55:18 2016 From: davidnebauer3 at bigpond.com (David Nebauer) Date: Wed, 31 Aug 2016 23:25:18 +0930 Subject: [qutebrowser] How to run a userscript in Windows In-Reply-To: <44030f13-2295-eb90-9755-0887b7d446dd@bigpond.com> References: <44030f13-2295-eb90-9755-0887b7d446dd@bigpond.com> Message-ID: <4f552abe-3d12-f895-a309-2687375806b5@bigpond.com> On 28/08/16 11:08, David Nebauer wrote: > Error while spawning userscript: The process failed to start. Here is the relevant log output: command called: spawn ['--userscript', 'SCRIPT.py'] Calling qutebrowser.browser.commands.CommandDispatcher.spawn(, 'SCRIPT.py', True, False, False) Executing SCRIPT.py with args [], userscript=True writable location for ConfigLocation: C:/Users/ME/AppData/Local/qutebrowser writable location for AppLocalDataLocation: C:/Users/ME/AppData/Local/qutebrowser writable location for DownloadLocation: C:/Users/ME/Downloads SCRIPT.py is no absolute path writable location for AppLocalDataLocation: C:/Users/ME/AppData/Local/qutebrowser writable location for AppLocalDataLocation: C:/Users/ME/AppData/Local/qutebrowser Userscript to run: C:\Users\ME\AppData\Local\qutebrowser\data\userscripts\SCRIPT.py HTML stored from webview Text stored from webview Both text/HTML stored, kicking off userscript! Starting process. Executing: 'C:\Users\ME\AppData\Local\qutebrowser\data\userscripts\SCRIPT.py' Stack for error message: File "C:\Users\florian\proj\qutebrowser\.tox\cxfreeze-windows\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in File "qutebrowser/__main__.py", line 29, in File "scripts/dev\..\..\scripts\..\qutebrowser\qutebrowser.py", line 163, in main File "scripts/dev\..\..\scripts\..\qutebrowser\app.py", line 108, in run File "scripts/dev\..\..\scripts\..\qutebrowser\app.py", line 118, in qt_mainloop File "scripts/dev\..\..\scripts\..\qutebrowser\app.py", line 863, in eventFilter File "scripts/dev\..\..\scripts\..\qutebrowser\app.py", line 823, in _handle_key_event File "scripts/dev\..\..\scripts\..\qutebrowser\keyinput\modeman.py", line 318, in eventFilter File "scripts/dev\..\..\scripts\..\qutebrowser\keyinput\modeman.py", line 170, in _eventFilter_keypress File "scripts/dev\..\..\scripts\..\qutebrowser\keyinput\basekeyparser.py", line 305, in handle File "scripts/dev\..\..\scripts\..\qutebrowser\keyinput\basekeyparser.py", line 134, in _handle_special_key File "scripts/dev\..\..\scripts\..\qutebrowser\keyinput\keyparser.py", line 44, in execute File "scripts/dev\..\..\scripts\..\qutebrowser\commands\runners.py", line 291, in run File "scripts/dev\..\..\scripts\..\qutebrowser\commands\command.py", line 524, in run File "scripts/dev\..\..\scripts\..\qutebrowser\mainwindow\statusbar\command.py", line 167, in command_accept File "scripts/dev\..\..\scripts\..\qutebrowser\commands\runners.py", line 303, in run_safely File "scripts/dev\..\..\scripts\..\qutebrowser\commands\runners.py", line 291, in run File "scripts/dev\..\..\scripts\..\qutebrowser\commands\command.py", line 524, in run File "scripts/dev\..\..\scripts\..\qutebrowser\browser\commands.py", line 1021, in spawn File "scripts/dev\..\..\scripts\..\qutebrowser\browser\commands.py", line 1069, in _run_userscript File "scripts/dev\..\..\scripts\..\qutebrowser\commands\userscripts.py", line 400, in run_async File "scripts/dev\..\..\scripts\..\qutebrowser\browser\webkit\webkittab.py", line 522, in dump_async File "scripts/dev\..\..\scripts\..\qutebrowser\commands\userscripts.py", line 126, in store_text File "scripts/dev\..\..\scripts\..\qutebrowser\commands\userscripts.py", line 159, in _run_process File "scripts/dev\..\..\scripts\..\qutebrowser\misc\guiprocess.py", line 147, in start File "scripts/dev\..\..\scripts\..\qutebrowser\misc\guiprocess.py", line 94, in on_error File "scripts/dev\..\..\scripts\..\qutebrowser\utils\message.py", line 144, in error Error while spawning userscript: The process failed to start. Displaying text: Error while spawning userscript: The process failed to start. (severity=Severity.error) queue: deque([]) / delta: None Displaying immediately Setting severity to Severity.error Setting temp text to 'Error while spawning userscript: The process failed to start.'. Deleting temporary file C:\Users\ME\AppData\Local\Temp\tmpsfc69iqx. Deleting temporary file C:\Users\ME\AppData\Local\Temp\tmp4zzbva7k.html. Deleting temporary file C:\Users\ME\AppData\Local\Temp\tmpzfag7irl.txt. From daniel at kingdread.de Wed Aug 31 22:36:47 2016 From: daniel at kingdread.de (Daniel Schadt) Date: Wed, 31 Aug 2016 22:36:47 +0200 Subject: [qutebrowser] How to run a userscript in Windows In-Reply-To: <4f552abe-3d12-f895-a309-2687375806b5@bigpond.com> References: <44030f13-2295-eb90-9755-0887b7d446dd@bigpond.com> <4f552abe-3d12-f895-a309-2687375806b5@bigpond.com> Message-ID: <3d3fba81-7a6e-45a8-a6e7-68d9e40b34da@kingdread.de> > command called: spawn ['--userscript', 'SCRIPT.py'] You're trying to call a Python userscript, which is basically just a text file interpreted with python.exe. So you're trying to call a "text file" as an application, which won't work on Windows - not even when you set .py files to open with Python. It's basically the same as trying to run a .txt as userscript, it's just not a valid Win32 application. So as far as I can tell, the only things you can run on Windows as (user)script are native .exe and .bat/.cmd files. So to solve this, you can either use "\path\to\python.exe \path\to\script.py" as command for spawn (without the --userscript flag), or you can write a simple .bat file that just calls your real userscript under the hood. Also note that you're using the frozen version of qutebrowser, so to run Python scripts outside of the qutebrowser executable, you probably need a second (normal) Python installation. I hope this helps, as I'm usually not a Windows user myself (and I might be wrong... ;)) Daniel From me at the-compiler.org Wed Aug 31 23:08:59 2016 From: me at the-compiler.org (Florian Bruhin) Date: Wed, 31 Aug 2016 23:08:59 +0200 Subject: [qutebrowser] How to run a userscript in Windows In-Reply-To: <3d3fba81-7a6e-45a8-a6e7-68d9e40b34da@kingdread.de> References: <44030f13-2295-eb90-9755-0887b7d446dd@bigpond.com> <4f552abe-3d12-f895-a309-2687375806b5@bigpond.com> <3d3fba81-7a6e-45a8-a6e7-68d9e40b34da@kingdread.de> Message-ID: <20160831210859.ckbwq2zkddn6t7fd@tonks> * Daniel Schadt [2016-08-31 22:36:47 +0200]: > > command called: spawn ['--userscript', 'SCRIPT.py'] > > You're trying to call a Python userscript, which is basically just a > text file interpreted with python.exe. So you're trying to call a "text > file" as an application, which won't work on Windows - not even when > you set .py files to open with Python. It's basically the same as > trying to run a .txt as userscript, it's just not a valid Win32 > application. So as far as I can tell, the only things you can run on > Windows as (user)script are native .exe and .bat/.cmd files. That's what I suspected as well, but I wanted to try things out before answering, and then didn't get to it yet :D I'm guessing even from cmd.exe you couldn't simply run a .py file, right? > So to solve this, you can either use > "\path\to\python.exe \path\to\script.py" > as command for spawn (without the --userscript flag), or you can write > a simple .bat file that just calls your real userscript under the hood. > > Also note that you're using the frozen version of qutebrowser, so to > run Python scripts outside of the qutebrowser executable, you probably > need a second (normal) Python installation. Crazy idea, let's ship a general-purpose python.exe (if cx_Freeze doesn't do that already) and interpret shebangs on Windows in qutebrowser (no, please don't) :D Florian -- http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I love long mails! | http://email.is-not-s.ms/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: From daniel at kingdread.de Wed Aug 31 23:36:02 2016 From: daniel at kingdread.de (Daniel Schadt) Date: Wed, 31 Aug 2016 23:36:02 +0200 Subject: [qutebrowser] How to run a userscript in Windows In-Reply-To: <20160831210859.ckbwq2zkddn6t7fd@tonks> References: <44030f13-2295-eb90-9755-0887b7d446dd@bigpond.com> <4f552abe-3d12-f895-a309-2687375806b5@bigpond.com> <3d3fba81-7a6e-45a8-a6e7-68d9e40b34da@kingdread.de> <20160831210859.ckbwq2zkddn6t7fd@tonks> Message-ID: <0b4a5648-558a-eb4b-bbb6-5df3ddebcfc7@kingdread.de> On 08/31/2016 11:08 PM, Florian Bruhin wrote: > I'm guessing even from cmd.exe you couldn't simply run a .py file, > right? Actually... You can! To quote the "man page" ("help page"?)[1]: > You can run nonexecutable files through their file association by > typing the name of the file as a command. Typing the path to a non-executable (or by using "start") will use the set association. What I tried was using `subprocess`, which does not do this - and I guess the underlying C calls (`CreateProcess` iirc) show the same behaviour (but I haven't tested this yet). And it gave the same error for .py files as it did for .txt files, which is "not a valid Win32 application". > Crazy idea, let's ship a general-purpose python.exe (if cx_Freeze > doesn't do that already) and interpret shebangs on Windows in > qutebrowser (no, please don't) :D Sounds good, we could probably use `ast` to parse the source, and build our own interpreter (QutePy? PyPy v2?)... Stop giving me stupid ideas :P Daniel [1]: https://technet.microsoft.com/en-us/library/cc770297(v=ws.11).aspx