ons.initHeight = (options.clipheight / options.scale)
if options.width>options.initWidth:
options.initWidth = options.width
if options.height>options.initHeight:
options.initHeight = options.height
app = AppKit.NSApplication.sharedApplication()
# create an app delegate
delegate = AppDelegate.alloc().init()
AppKit.NSApp().setDelegate_(delegate)
# create a window
rect = Foundation.NSMakeRect(0,0,100,100)
win = AppKit.NSWindow.alloc()
win.initWithContentRect_styleMask_backing_defer_ (rect,
AppKit.NSBorderlessWindowMask, 2, 0)
if options.debug:
win.orderFrontRegardless()
# create a webview object
webview = WebKit.WebView.alloc()
webview.initWithFrame_(rect)
# turn off scrolling so the content is actually x wide and not x-15
webview.mainFrame().frameView().setAllowsScrolling_(objc.NO)
webview.setPreferencesIdentifier_('webkit2png')
webview.preferences().setLoadsImagesAutomatically_(not options.noimages)
# add the webview to the window
win.setContentView_(webview)
# create a LoadDelegate
loaddelegate = WebkitLoad.alloc().init()
loaddelegate.options = options
loaddelegate.urls = args
webview.setFrameLoadDelegate_(loaddelegate)
app.run()
if __name__ == '__main__' : main()
Best,
James
--
https://mail.python.org/mailman/listinfo/python-list
On Tuesday, May 30th, 2023 at 10:18 PM, Chris Angelico wrote:
> Yep, what you're seeing there is the namespace and nothing else. But
> if you mess with an actual builtin object, it'll be changed for the
> other interpreter too.
>
> > > > import ctypes
> > > > ctypes.cast(id(42),
On Tuesday, May 30th, 2023 at 9:14 PM, Greg Ewing wrote:
> Globals you create by executing code in the REPL have their own
> namespace. But everything else is shared -- builtins, imported
> Python modules, imported C extension modules, etc. etc.
Thanks for the explanation. Could you elaborate on
Originally posted to idle-dev, but thought this might be a better place. Let me
know if it isn't.
Hi,
I was curious about the internals of IDLE, and noticed that IDLE uses executes
user code in a "subprocess" that's separate from the Python interpreter that is
running IDLE itself (which does
to discuss further; off-list. I can be reached
using "JamesBTobin (at) Gmail (dot) Com". Kind regards, James
--
https://mail.python.org/mailman/listinfo/python-list
ot;. Kind regards, James
--
https://mail.python.org/mailman/listinfo/python-list
在 2022年9月2日星期五 UTC+2 00:17:23, 写道:
> On 02Sep2022 07:01, Chris Angelico wrote:
> >On Fri, 2 Sept 2022 at 06:55, James Tsai wrote:
> >> No but very often when I have written a neat list/dict/set
> >> comprehension, I find it very necessary
> >> to defi
在 2022年9月1日星期四 UTC+2 18:16:03, 写道:
> On Fri, 2 Sept 2022 at 02:10, James Tsai wrote:
> >
> > Hello,
> >
> > I find it very useful if I am allowed to define new local variables in a
> > list comprehension. For example, I wish to have something like
> >
在 2022年9月1日星期四 UTC+2 18:34:36, 写道:
> On 9/1/22, James Tsai wrote:
> >
> > I find it very useful if I am allowed to define new local variables in a
> > list comprehension. For example, I wish to have something like
> > [(x, y) for x in range(10) for y := x ** 2 if
在 2022年9月1日星期四 UTC+2 16:15:17, 写道:
> James Tsai writes:
>
> > I find it very useful if I am allowed to define new local variables in
> > a list comprehension. For example, I wish to have something like
> > [(x, y) for x in range(10) for y := x ** 2 if x + y <
Hello,
I find it very useful if I am allowed to define new local variables in a list
comprehension. For example, I wish to have something like
[(x, y) for x in range(10) for y := x ** 2 if x + y < 80], or
[(x, y) for x in range(10) with y := x ** 2 if x + y < 80].
For now this functionality can
Change by James Gerity :
--
nosy: +SnoopJeDi
___
Python tracker
<https://bugs.python.org/issue46726>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from James Marchant :
When using `create_autospec()` to create a mock object, it doesn't respect
values passed through in the style described for passing mock configurations in
the Mock constructor
(https://docs.python.org/3.8/library/unittest.mock.html
James Gerity added the comment:
> Why was it decided to not raise a syntax error...
I'm not sure if such a decision was even ever made, the error happens before
normalization is applied. I.e. the parser is doing two things here: (1)
validating the syntax against the grammar and (2) build
Change by James Gerity :
--
nosy: +SnoopJeDi
___
Python tracker
<https://bugs.python.org/issue46555>
___
___
Python-bugs-list mailing list
Unsubscribe:
James Gerity added the comment:
My thought was to add something like this to the top of functions.rst:
```
Note that some of the functions listed here have the :ref:`default return value
of ``None``.
```
For reference, the builtins this applies to are:
* breakpoint()
* delattr()
* exec
James Gerity added the comment:
> advertising that all functions default to returning None
This is already communicated in § 4.7 ("Defining Functions") of the official
tutorial.
I think it would be a good idea to revise that section so that this property of
functions is a litt
Change by James Gerity :
--
title: print() docs do not indicate its return value -> return value of
builtins is not clearly indicated
___
Python tracker
<https://bugs.python.org/issu
On Wednesday, January 19, 2022 at 11:14:28 PM UTC-5, cameron...@gmail.com wrote:
> But I recommend you use shell=False and make:
>
> cmd = ["/usr/bin/transmission-remote", "--torrent", str(torrentno), "--info"]
I like that. :-)
--
https://mail.python.org/mailman/listinfo/python-list
On Wednesday, January 19, 2022 at 11:08:58 PM UTC-5, Dennis Lee Bieber wrote:
> Don't you need to provide for that %s? Perhaps
>
> cmd="/usr/bin/transmission-remote --torrent %s --info" % torrentno
That works, thanks.
--
https://mail.python.org/mailman/listinfo/python-list
I'm trying to run a shell command but the stdout is empty:
import subprocess
torrentno=8
cmd="/usr/bin/transmission-remote --torrent %s --info", str(torrentno)
res=subprocess.run(cmd, shell=True, check=True, universal_newlines=True,
capture_output=True)
print(res)
Change by James Casbon :
--
components: +Library (Lib)
type: -> enhancement
___
Python tracker
<https://bugs.python.org/issue46292>
___
___
Python-bugs-lis
New submission from James Casbon :
LogRecord makes microseconds available via the msecs attribute. This patch
adds microseconds via usecs attribute.
Some regulators (eg MIFID II) require accuracy greater than 1ms in some
industries.
This patch calls time_ns rather than time so
James Gerity added the comment:
The original question was closer to the related issue of "indicate return types
for all built-ins," conversation log follows (UTC-5):
```
09:33:50 ringo__ | is there a stdlib api docs which actually has *full*
functions
James Gerity added the comment:
I opened this ticket on behalf of a user who asked about print() specifically
in #python on the Libera IRC network, who I assume does not find this obvious.
I don't think it would be tenable to add this note to every built-in, but
that's not the intended
Change by James Gerity :
--
keywords: +patch
pull_requests: +28642
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30435
___
Python tracker
<https://bugs.python.org/issu
Change by James Gerity :
--
assignee: docs@python
components: Documentation
nosy: SnoopJeDi, docs@python
priority: normal
severity: normal
status: open
title: print() docs do not indicate its return value
versions: Python 3.11
___
Python tracker
New submission from James Lawrie :
The datagram_received:
def datagram_received(self, data, addr):
if self.recvfrom:
self.recvfrom.set_result((data, addr))
self.recvfrom = None
Throws an exception if self.recvfrom is a Future Cancelled:
Exception in callback
James Gerity added the comment:
Correction: the bug whose resolution adds the OverflowError mentioned above is
bpo-24522, not bpo-43255
--
___
Python tracker
<https://bugs.python.org/issue46
Change by James Gerity :
--
keywords: +patch
pull_requests: +28168
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29943
___
Python tracker
<https://bugs.python.org/issu
New submission from James Gerity :
The docstrings for `json.JSONEncoder, json.dump(), json.dumps()` all refer to
`OverflowError` when describing the behavior of the `check_circular` parameter,
but the module's test of this parameter catches a `RecursionError` and the
documentation does make
James Ferguson added the comment:
Echoing nmatravolgyi's comments - I got here after hitting this bug and I too
am amazed it's been around so long and hasn't been addressed.
It makes cancellation in my application very unreliable, and the reason I need
well-controlled cancellation
James Gerity added the comment:
The Makefile issue was fixed in bpo-37725 (GitHub:
https://github.com/python/cpython/commit/c6bbcd258302b4b9b3d4f3c39bb5f7ff0120ec67),
but the change wasn't ported to the 3.7, 3.8 branches. Those versions are now
security-only, so this issue can probably just
James Bowery added the comment:
My mistake. Disregard.
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/i
New submission from James Bowery :
Comment out the |= line and it prints "{'b':2}" as expected.
$ cat t.py
scoped_dict = {'b':2}
def scoped_def():
print(scoped_dict)
scoped_dict |= {'a',1}
scoped_def()
$ p t.py
Traceback (most recent call last):
File "/home/jabowery/
James Lawrie added the comment:
Sorry. This was a pebkac error, I was setting nameserver instead of nameservers
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from James Lawrie :
The DNS async resolver allows you to specify a list of nameservers to use, but
they are ignored and the system nameservers are used instead.
Test code below demonstrating the issue:
# cat test.py
import dns.asyncresolver
import asyncio
from pprint import
Change by Sam James :
--
nosy: +thesamesam
___
Python tracker
<https://bugs.python.org/issue14527>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Sam James :
--
nosy: +thesamesam
___
Python tracker
<https://bugs.python.org/issue45598>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Sam James :
--
nosy: +thesamesam
___
Python tracker
<https://bugs.python.org/issue45350>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Sam James :
--
nosy: +thesamesam
___
Python tracker
<https://bugs.python.org/issue45643>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Sam James :
--
nosy: +thesamesam
___
Python tracker
<https://bugs.python.org/issue45256>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Sam James :
--
nosy: +thesamesam
___
Python tracker
<https://bugs.python.org/issue44525>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Sam James :
--
nosy: +thesamesam
___
Python tracker
<https://bugs.python.org/issue44828>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Sam James :
--
nosy: +thesamesam
___
Python tracker
<https://bugs.python.org/issue45484>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Sam James :
--
nosy: +thesamesam
___
Python tracker
<https://bugs.python.org/issue45668>
___
___
Python-bugs-list mailing list
Unsubscribe:
Zayden Micheal James added the comment:
Oh so the problem will resolve itself when they, support Python 3.10 PIP 21.2.4.
Sorry for the inconvenience. Can't wait for the libraries to be resolved and
optimized
--
___
Python tracker
<ht
Zayden Micheal James added the comment:
I am using Python 3.10 and PIP 21.2.4. All installations worked fine with
Python 3.9.
I tried combinations such as:
["pip", "pip3", "python3 -m pip", "python -m pip3", "python -m pip","pyth
Zayden Micheal James added the comment:
This issue is still persisting with other libraries aswell such as matplotlib
and the above mentioned.
--
nosy: -eric.smith
resolution: third party ->
status: closed -> open
type: compile error ->
New submission from Zayden Micheal James :
When I try to install numpy using python version 3.10, pip version 21.2.4
it gives me a PEP517 error, with a bunch of other exceptions.
When I try to install tensorflow using python version 3.10, pip version 21.2.4
it gives me an error saying
Change by Sam James :
--
nosy: +thesamesam
___
Python tracker
<https://bugs.python.org/issue45433>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Sam James :
--
nosy: +thesamesam
___
Python tracker
<https://bugs.python.org/issue44751>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from James Wilcox :
This program behaves differently when run under the profiler (either profile or
cProfile) versus when run normally.
```
from __future__ import annotations # ***
import dataclasses
@dataclasses.dataclass
class C:
x: dataclasses.InitVar[int]
def
James Gerity added the comment:
The cause of DeprecationWarning sometimes [1] not being issued is I believe
because in string_parser.c [2] the module is explicitly set to NULL and the
filename will be '' or '' or somesuch, which eventually that
ends up being normalized to something
James Saryerwinnie added the comment:
> What's the actual scenario that this broke?
I only noticed this because a project that I work on
(https://github.com/aws/chalice/) started failing CI for seemingly unrelated
changes. A specific test run is here:
https://github.com/jamesls/chal
New submission from James Saryerwinnie :
There was a change in behavior in Python 3.8.10 when using relative paths in
sys.path. It appears that the paths are now converted to absolute paths that
are cached and can cause import errors in some cases.
Repro:
$ cat repro.sh
#!/bin/bash
python
It's called Oracle's Truffle. Truffle runs all those languages with an
autogenerated JIT.
This is my response to the neos drama.
--
https://mail.python.org/mailman/listinfo/python-list
New submission from James Murphy :
Currently, the bisect module's functions all assume the user is maintaining a
sorted list/sequence in increasing order. From the docs:
"This module provides support for maintaining a list in sorted order without
having to sort the list after each inse
Directly removing the Global Interpreter Lock (GIL) would break a lot
of libraries that implicitly assume it is there. What if Python had
"realms" that each had separate GILs?
The "realms" (not sure if "subinterpreter" is the correct term here)
could share objects.
--
James Russell added the comment:
I have been reviewing the Install process as we need to start installing /
patching Python and I have seen the same issue as mentioned below however the
difference for me is I am running the install on a Silent command line.
I cannot seem to override
Good day for everyone.
I have new asyncio project which use aiohttp connector and asyncio
protocols/transports for tunneling packets through Tor Network cleanly.
Project called aiotor: https://github.com/torpyorg/aiotor
If someone with experience in asyncio field can make code review I will
Good day everyone.
I have new asyncio project which use aiohttp connector and asyncio
protocols/transports for tunneling packets through Tor Network cleanly.
Project called aiotor: https://github.com/torpyorg/aiotor
If someone with experience in asyncio field can make code review I will
be
James Oldfield added the comment:
There's some confusion here over what autocommit=True would do. I believe the
last three comments give three different interpretations! Géry said
conn.autocommit would change to False when I start a transaction with
execute("BEGIN"), Mike said i
James Oldfield added the comment:
> Yes if you are talking about SQLite, the database ENGINE
I sure was! In this comment I will stick to saying either "SQLite engine" or
"sqlite3 driver" as appropriate, hopefully that will be clearer.
> But here I am talking
James Oldfield added the comment:
If this ever gets implemented, "autocommit" would be a terrible name for it.
That word has a very specific meaning in SQLite, which is essentially the same
as "not in a transaction started with BEGIN ...". At the moment, if you want to
New submission from James B Wilkinson :
> On Dec 21, 2020, at 11:11 PM, Raymond Hettinger
> wrote:
>
>
> Change by Raymond Hettinger :
>
>
> --
> stage: -> resolved
> status: open -> closed
I see that this has been marked “resolved” and closed
Change by James B Wilkinson :
--
nosy: the.doc
priority: normal
severity: normal
status: open
title: I
___
Python tracker
<https://bugs.python.org/issue42
Change by James Guillochon :
--
components: +macOS
nosy: +ned.deily, ronaldoussoren
___
Python tracker
<https://bugs.python.org/issue42504>
___
___
Python-bug
James Guillochon added the comment:
Closing in favor of https://bugs.python.org/issue42504 which has more details
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/i
New submission from James Guillochon :
See the discussion here
https://github.com/Homebrew/homebrew-core/pull/65866#issuecomment-735366297,
but this is currently a blocker for compilation via home-brew on Apple Silicon.
Current workaround is to set the deployment target to "11.0&quo
Change by James Gerity :
--
keywords: +patch
nosy: +SnoopJeDi2
nosy_count: 2.0 -> 3.0
pull_requests: +22414
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23532
___
Python tracker
<https://bugs.python.org/i
New submission from James Gerity :
Now that CPython uses the new PEG parser, it would be helpful to include a
reference to the guiding PEP (617) on the docs page
(https://docs.python.org/3/reference/grammar.html) that gives the grammar.
--
assignee: docs@python
components
James Addison added the comment:
Thanks Senthil; please take your time. This isn't urgent, and would likely
benefit from further standardization of the URL query string and/or
form-encoded data formats (outside the Python project) to achieve consensus.
A fully-considered answer at a later
James Addison added the comment:
No problem, and thanks for the heads-up Tal! I'll raise this as a topic on
python-dev if it still seems worth pursuing, after collecting some more
thoughts about it.
--
___
Python tracker
<ht
Is there a python library available that converts a type-annotated Python
function into a webpage with HTML forms?
Something like:
def foo(name: str, times: int):
return f"Hello {name}!" * times
serve_from(foo, host="0.0.0.0", port=3000)
Turning into a server that serves something like
On 9/8/20 10:35 PM, James Moe wrote:
> Module PyQt5 is most definitely installed. Apparently there is more to getting
> modules loaded than there used to be.
>
Cause: Operator Error
The python installation had become rather messy resulting in the errors I
showed. After installi
env('DISPLAY', ':0.0')
import datetime
import gettext
import re
import subprocess
import shutil
import signal
from contextlib import contextmanager
from tempfile import TemporaryDirectory
import qttools<<<--- line 35
qttools.registerBackintimePath('common')
...
[ end ]
--
James Moe
jmm-list at sohnen-moe dot com
Think.
--
https://mail.python.org/mailman/listinfo/python-list
James Barrett added the comment:
https://github.com/python/cpython/pull/21852
--
___
Python tracker
<https://bugs.python.org/issue40782>
___
___
Python-bug
Change by James Barrett :
--
keywords: +patch
pull_requests: +20979
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21852
___
Python tracker
<https://bugs.python.org/issu
James Franks added the comment:
Hope this helps:
I'm running Python Shell 3.8.5 on MacOSx 10.15.6 (Catalina). I can reproduce
this hang easily.
Open any existing module or create a new one. Can save the existing module or
a new one just fine under the same name. (File menu - Save)
Using
James Gray added the comment:
Bonjour, je vois que nous ne sommes pas les seuls dans ce cas, nous avons
besoin que les robots indexent nos pages html mais qu'elles n'indexent pas
celles en /*.php$ ainsi que les ressources PC en PDF. Nous avons tenté en vain
plusieurs solutions en passant par
James Corbett added the comment:
I would love to get this issue resolved; it seems like everyone agrees that
it's a bug. It came up for me recently: https://bugs.python.org/issue41047.
Judging from the comments above, the consensus is that the relevant line,
`self._check_value(action, value
James Corbett added the comment:
I think this would have been a better fit for a StackOverflow issue:
https://stackoverflow.com/questions/tagged/python. Also, it's not a compilation
error and it doesn't have anything to do with CPython's testing framework.
Anyway, I don't think
Change by James Corbett :
--
keywords: +patch
pull_requests: +20816
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21673
___
Python tracker
<https://bugs.python.org/issu
New submission from James Corbett :
As described in
https://stackoverflow.com/questions/25847035/what-are-signature-and-text-signature-used-for-in-python-3-4,
https://bugs.python.org/issue20586, and
https://stackoverflow.com/questions/50537407/add-a-signature-with-annotations-to-extension
James Corbett added the comment:
I was careless in my example, it would need to be `cls.skipTest(reason)`.
However, that really doesn't have anything to do with why it should be a
`classmethod` instead of an instance method: it's so that you can call
`skipTest` from `classmethods`, namely
New submission from James Thistlewood :
I stumbled across this by trying to implement a call to the latter, while
reading the docs for the former.
I think this is quite confusing and unnecessary that the APIs between these two
definitions should differ. The same goes
New submission from James Foster :
https://docs.python.org/3.8/library/ast.html shows seven elements:
arguments = (arg* posonlyargs, arg* args, arg? vararg, arg* kwonlyargs,
expr* kw_defaults, arg? kwarg, expr* defaults)
https://docs.python.org/3.7/library/ast.html shows
Change by Rhodri James :
--
nosy: -Rhodri James
___
Python tracker
<https://bugs.python.org/issue38863>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Rhodri James :
--
nosy: -Rhodri James
___
Python tracker
<https://bugs.python.org/issue24764>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Rhodri James :
--
nosy: -Rhodri James
___
Python tracker
<https://bugs.python.org/issue21705>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Rhodri James :
--
nosy: -Rhodri James
___
Python tracker
<https://bugs.python.org/issue1047397>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Rhodri James :
--
nosy: -Rhodri James
___
Python tracker
<https://bugs.python.org/issue39727>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Rhodri James :
--
nosy: -Rhodri James
___
Python tracker
<https://bugs.python.org/issue10879>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Rhodri James :
--
nosy: -Rhodri James
___
Python tracker
<https://bugs.python.org/issue9968>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Rhodri James :
--
nosy: -Rhodri James
___
Python tracker
<https://bugs.python.org/issue41140>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Rhodri James :
--
nosy: -Rhodri James
___
Python tracker
<https://bugs.python.org/issue41139>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Rhodri James :
--
nosy: -Rhodri James
___
Python tracker
<https://bugs.python.org/issue2>
___
___
Python-bugs-list mailing list
Unsubscribe:
On 17/07/2020 20:12, J. Pic wrote:
And Hollidays ;)
Nah, that's next week ;-)
Le ven. 17 juil. 2020 à 21:03, Rhodri James a écrit :
On 17/07/2020 19:33, Steve wrote:
Sorry folks, I really messed that one up. I tried to doctor up a reply
to
get the address correct but failed to delete
out about.
I think there are fewer experts with time lurking around here (and I
don't count myself as one of those, TBH). Recent controversies and the
attempts to moderate them have probably upset quite a lot of people one
way or another.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.o
1 - 100 of 4053 matches
Mail list logo