Python Launcher Pops Up When Py-based App Is Running (Mac)

2023-09-17 Thread James Greenham via Python-list
might need to be larger so clipped image is right size) options.initWidth = (options.clipwidth / options.scale) options.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

Re: Why does IDLE use a subprocess?

2023-05-31 Thread James Schaffler via 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), ctypes.POINTER(cty

Re: Why does IDLE use a subprocess?

2023-05-30 Thread James Schaffler via Python-list
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 p

Why does IDLE use a subprocess?

2023-05-30 Thread James Schaffler via Python-list
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 t

JOB | Linux Platform Engineer (India and Singapore)

2023-04-24 Thread James Tobin
like 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

JOB | Lead Linux Sysadmin (Edinburgh/London)

2023-03-08 Thread James Tobin
om". Kind regards, James -- https://mail.python.org/mailman/listinfo/python-list

Re: Local variable definition in Python list comprehension

2022-09-02 Thread James Tsai
在 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

Re: Local variable definition in Python list comprehension

2022-09-01 Thread James Tsai
在 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 > >

Re: Local variable definition in Python list comprehension

2022-09-01 Thread James Tsai
在 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

Re: Local variable definition in Python list comprehension

2022-09-01 Thread James Tsai
在 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 < 80

Local variable definition in Python list comprehension

2022-09-01 Thread James Tsai
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

Re: empty stdout (subprocess.run)

2022-01-20 Thread James Smith
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

Re: empty stdout (subprocess.run)

2022-01-20 Thread James Smith
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

empty stdout (subprocess.run)

2022-01-19 Thread James Smith
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) CompletedProcess(args=('/usr/b

Universal compiler that runs Java, Ruby, C++, and Python in a single VM

2021-03-16 Thread James Lu
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

Python subinterpreters with separate GILs

2021-02-10 Thread James Lu
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. -- https://mail.python.org/mail

Asyncio project code review

2021-01-08 Thread James
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

asyncio project code review

2021-01-08 Thread James
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 a

A library that converts a type-annotated function into a webpage with HTML forms?

2020-09-30 Thread James Lu
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 thi

Re: [SOLVED] Module exists and cannot be found

2020-09-10 Thread James Moe via Python-list
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

Module exists and cannot be found

2020-09-08 Thread James Moe via Python-list
27;, ''): os.putenv('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

Re: An I connected here?

2020-07-17 Thread Rhodri James
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 d

Re: An I connected here?

2020-07-17 Thread Rhodri James
t sufficiently intrigued to go find 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

Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-05 Thread Rhodri James
On 04/07/2020 16:38, Random832 wrote: On Fri, Jul 3, 2020, at 08:48, Rhodri James wrote: As I said in my preamble, it doesn't matter whether you believe that is true or think it's utter bollocks. I asked the question to get the Steering Council's opinion, not anyone

Re: New to python - Just a question

2020-07-03 Thread Rhodri James
Python, you can read a file one line at a time, so how to count the number of lines in a file should be pretty obvious. Figuring out how to do that for every *.cpp file in a directory will involve looking through the standard library, or getting a bash script to do it for you :-) -- Rhodri J

Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread Rhodri James
On 03/07/2020 15:28, Jon Ribbens via Python-list wrote: On 2020-07-03, Rhodri James wrote: On 02/07/2020 23:46, Random832 wrote: On Thu, Jul 2, 2020, at 18:29, Michael Torrie wrote: Come again? I can see no other link in the verbage with the "relics of white supremacy" that she r

Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread Rhodri James
at is true or think it's utter bollocks. I asked the question to get the Steering Council's opinion, not anyone else's. If you collectively really must rehash the arguments again, please have the decency to do so in a different thread. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-02 Thread Rhodri James
or do not give a monkey's, should _any_ political opinion be in the repo? -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Formal Question to Steering Council (re recent PEP8 changes)

2020-07-02 Thread Rhodri James
ons. I mention this merely to reinforce the idea that these things are still answers as well as hostages to fortune. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Code of Conduct address "hold message"

2020-06-30 Thread Rhodri James
On 30/06/2020 15:25, Rhodri James wrote: Having just had occasion to use the code of conduct link (conduct...@python.org), I got back the message:   Your mail to 'conduct...@python.org' with the subject       Is being held until the list moderator can review it for approval

Code of Conduct address "hold message"

2020-06-30 Thread Rhodri James
nature of Thank you for your email about "". We will deal with it as soon as we can." Plus the usual platitudes about valuing my input and appreciating my custom which don't necessarily apply here ;-/ Any chance of getting the message altered to something a bit more fr

Re: Pycharm offers only implementation of an abstract getter but not an abstract setter

2020-06-25 Thread Rhodri James
On 24/06/2020 22:46, zljubi...@gmail.com wrote: Why Pycharm didn't offer a setter as well as getter? This is a general Python mailing list. If you have specific questions/complaints about PyCharm, they are probably better addressed directly to the makers of PyCharm. -- Rhodri

Re: Python-list Digest, Vol 201, Issue 9

2020-06-09 Thread Rhodri James
en insert it into the __dict__ as 'from', although a custom serializer would probably be preferable from a design standpoint. Might it be simpler to use a dict from the start? You could have a dictionary key of "from" without any problems. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Can't download Pygame and Pgzero

2020-06-05 Thread Rhodri James
. Which version of Windows are you using? What exactly did you do to install Pygame and Pgzero, in order, and what exactly went wrong. Please copy and paste any error messages, don't send screenshots because the mailing list will strip them off and we won't see them. -- Rhodri

Re: Friday Finking: Imports, Namespaces, Poisoning, Readability

2020-06-05 Thread Rhodri James
ore likely to change my own module to fit :-) - do you prefer PSL's importlib over Python's native import-s, for one of these (or any other) reason? Um, why would I? -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Binary Sort on Python List __xor__

2020-06-01 Thread Rhodri James
ense whatsoever for lists like ["The", "quick", "brown", "fox"]. There's a decent purpose for a class implementing the features you want, but I honestly don't think the generic list class is it. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: .dll problem

2020-05-29 Thread Rhodri James
oogle turns up when you search for "windows runtime missing" explains what's going on and points to this link. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Behaviour of os.path.join

2020-05-27 Thread Rhodri James
t they expect). I'm faintly gobsmacked that anyone expects something like that to work. If you want a directory, create it. That's what os.mkdir (and the pathlib equivalent) is for. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Behaviour of os.path.join

2020-05-27 Thread Rhodri James
ade without a significant number of complaints (as in I can't remember the last one, and I've been around here for a while -- it's too hot for me to want to go hunt in the archives :-). How are these unexpected extensionless files getting created? -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Behaviour of os.path.join

2020-05-27 Thread Rhodri James
ing on the filing system. Anything else is, as you have discovered, error-prone. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Behaviour of os.path.join

2020-05-26 Thread Rhodri James
documentation says, "If a component is an absolute path, all previous components are thrown away and joining continues from the absolute path component." Since "\\" is an absolute path component, all the previous components are thrown away and you are left with just "\\". -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Behaviour of os.path.join

2020-05-26 Thread Rhodri James
t; pathlib.PureWindowsPath('/').is_absolute() |False Thanks, that seems to suggest that there is an issue and that I should hence submit this as an issue. It is indeed most curious as to why this obviously absolute path is not recognised as such :-) -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: stderr writting before stdout

2020-05-25 Thread Rhodri James
On 24/05/2020 05:27, Souvik Dutta wrote: Is there any precedence or priority order by which sys.stderr.write() and sys.stdout.write() works. No. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Strings: double versus single quotes

2020-05-23 Thread Rhodri James
nt of view of someone who writes more C code than Python, not having to remember a new set of habits for Python makes life a lot simpler. Chacun à son goût and all that. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: why no camelCase in PEP 8?

2020-05-19 Thread Rhodri James
h the same difficulty really. I certainly don't find it "hard" to grep for _snake_case. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Installation Problem

2020-05-05 Thread Rhodri James
more detailed advice. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

=+ for strings

2020-05-03 Thread James Smith
I tried: dt=+"{:02d}".format(day) but I got: dt=+"{:02d}".format(day) TypeError: bad operand type for unary +: 'str' This works: dt=dt+"{:02d}".format(day) Why can't I do the shortcut on strings? -- https://mail.python.org/mailman/listinfo/python-list

Re: python Netcdf and ncdump

2020-04-30 Thread Rhodri James
cdump. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: [RELEASE] Python 3.9.0a6 is now available for testing

2020-04-29 Thread Rhodri James
1 0 1 0 1 01 0 OK I don't see any violation of quoting or parentheses matching. Still trying to figure out what this lambda does. Presumably it's something to do with recognising string prefixes? -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: What variable type is returned from Open()?

2020-04-17 Thread Rhodri James
On 17/04/2020 22:27, dcwhat...@gmail.com wrote: On Friday, April 17, 2020 at 2:11:17 PM UTC-4, Rhodri James wrote: And people wonder why I stick to gdb when at all possible :-) Never worked with it. Is it a debugger for compiled code, i.e. it steps through the executable while displaying the

Re: What variable type is returned from Open()?

2020-04-17 Thread Rhodri James
d useless bits of code to cast something to (uint8_t *) because I want to see the bytes and the IDE will not give up on trying to interpret them for me. And people wonder why I stick to gdb when at all possible :-) -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Floating point problem

2020-04-17 Thread Rhodri James
*binary* format, what constitutes an *exact* decimal may be a little surprising! -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: RFC: For Loop Invariants

2020-04-11 Thread Rhodri James
ou care enough, refactor it as a comprehension: count = sum(1 for a in chars if a in seek) It it's not so simple, neither the comprehension nor your proposal are going to be as readable as the twice nesting. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: How To Change Package Representation on Shell?

2020-04-01 Thread Rhodri James
on't think you can. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: How to instantiate a custom Python class inside a C extension?

2020-04-01 Thread Rhodri James
On 01/04/2020 18:24, Musbur wrote: Am 01.04.2020 15:01 schrieb Rhodri James: I believe you do it in C as you would in Python: you call the Series class! pyseries = PyObject_CallObject((PyObject *)&series_type, NULL); Well, that dumps core just as everything else I tried. What does

Re: How to instantiate a custom Python class inside a C extension?

2020-04-01 Thread Rhodri James
ieve you do it in C as you would in Python: you call the Series class! pyseries = PyObject_CallObject((PyObject *)&series_type, NULL); -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Like c enumeration in python3

2020-03-23 Thread Rhodri James
. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-19 Thread Rhodri James
On 19/03/2020 14:47, Peter J. Holzer wrote: On 2020-03-19 14:24:35 +, Rhodri James wrote: On 19/03/2020 13:00, Peter J. Holzer wrote: It's more compact, especially, if "d" isn't a one-character variable, but an expression: fname, lname = db[people].employe

Re: Why is the program not printing three lines?

2020-03-19 Thread Rhodri James
ance is created. Try running this code: class first: print("from first") Just that. No instantiation, no "first()", nothing else. Just the class suite itself. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-19 Thread Rhodri James
act. I think the second version is more readable (and the third version, where you factored out the common lookup is better still). -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: How to build python binaries including external modules

2020-03-18 Thread James via Python-list
dule(s) to a list of default modules. Or is it possible? The goal was to build python for cross-platforms with external modules. James -- https://mail.python.org/mailman/listinfo/python-list

How to build python binaries including external modules

2020-03-18 Thread James via Python-list
When you build python binaries from source, how to add external modules? For example, to install cython, conventional method is building python first, then running setup.py for cython. I'd like to combine the 2-step into one. Thanks James -- https://mail.python.org/mailman/listinfo/python-list

Re: Python question

2020-03-11 Thread Rhodri James
media app." Email works exceedingly well for this sort of thing, despite Google's antics. +10 The best response to "This system breaks when I abuse it" is almost always "Well stop abusing it then." -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: encapsulating a global variable

2020-02-26 Thread Rhodri James
from threading disasters by itself, though it will make it easier to protect it as you need. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: encapsulating a global variable

2020-02-25 Thread Rhodri James
or me since get_it(piece) returns the error: builtins.TypeError: get_it() takes no arguments It works for me (pace sticking something in GetIt.seen to avoid getting a KeyError). You aren't muddling up the class name and instance name are you? -- Rhodri James *-* Kynesim Lt

Re: encapsulating a global variable

2020-02-25 Thread Rhodri James
you have a global class instance hanging around, which is not actually any better than a global dictionary. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: time.localtime add a parameter for timezone

2020-02-24 Thread Rhodri James
ccasions when you want it, but more often you should be working in UTC not local time. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Paper Print Help

2020-02-20 Thread Rhodri James
On 20/02/2020 15:08, Duram wrote: On 19/02/2020 12:17, Rhodri James wrote: On 19/02/2020 14:22, Duram via Python-list wrote: I have a drawing in a .gif file with (a,b) pixels and want to paperprint it in a position (x,y), what would be the code? What have you tried? Nothing, I did not find

Re: Paper Print Help

2020-02-19 Thread Rhodri James
On 19/02/2020 14:22, Duram via Python-list wrote: I have a drawing in a .gif file with (a,b) pixels and want to paperprint it in a position (x,y), what would be the code? What have you tried? -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Technical debt - was Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-12 Thread Rhodri James
On 12/02/2020 17:46, Python wrote: On Wed, Feb 12, 2020 at 01:16:03PM +, Rhodri James wrote: On 12/02/2020 00:53, Python wrote: In pretty much every job I've ever worked at, funding work (e.g. with humans to do it) with exactly and precisely the resources required is basically impos

Re: Technical debt - was Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-12 Thread Rhodri James
d to pay the cost of a replacement project, which will accrue its own technical debt... -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: ERROR in loading data

2020-02-04 Thread Rhodri James
on the interactive command line or a look in the documents will tell you that strings indeed do not have a loads_data() method. I don't know what library you are intending to use, but you need to open your file with that first. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: when uses time.clock,there are always mistakes

2020-02-03 Thread Rhodri James
ile "", line 1, in   t = time.clock()   AttributeError: module 'time' has no attribute 'clock' It is correct, there is no time.clock() function. The documentation is here: https://docs.python.org/3/library/time.html -- Rhodri James *-* Kynesim Ltd --

Re: Dynamic Data type assignment

2020-01-28 Thread Rhodri James
input, converts it to a string (stripping a trailing newline), and returns that. When EOF is read, EOFError is raised. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Friday Finking: Enum by gum

2020-01-24 Thread Rhodri James
quire that behaviour. It's horses for courses, as ever. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-ideas] Re: Enhancing Zipapp

2020-01-08 Thread Rhodri James
On 08/01/2020 18:08, many people wrote lots of stuff... Folks, could we pick one list and have the discussion there, rather than on both python-list and python-ideas? Getting *four* copies of Andrew's emails is a tad distracting :-) -- Rhodri James *-* Kynesim Ltd -- https://mail.pytho

Re: Python, Be Bold!

2020-01-06 Thread Rhodri James
s -- or lack of OSes -- which have no graphical interface). -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Python, Be Bold! - The Draft

2020-01-06 Thread Rhodri James
ft utterly irrelevant to me and those like me. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Dataset training using Kmeans

2020-01-06 Thread Rhodri James
you are far more likely than me to recognise which of them are relevant to your circumstances. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Front end

2020-01-01 Thread James Lu
I would use software like Airtable. You set the columns, Airtable produces a type-checked form. Every spreadsheet also comes with its own API, so you can exfiltrate the data programmatically easily. On Sat, Dec 28, 2019, 10:36 L A Smit wrote: > Hi > > Don't know if this is the correct subject bu

Re: hexdump module installation error

2019-12-19 Thread Rhodri James
7;hexdump.py': [Errno 2] No such file or directory user@USERnoMacBook-Air LibraBrowser % Huh. You've done a "pip3 install hexdump" so I don't know what might be happening here. Sorry. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: hexdump module installation error

2019-12-19 Thread Rhodri James
for that. c) I would much prefer it if you didn't top-post, but interleaved your replies like I've done here. I find it hard to follow top-posted messages because they reverse the normal flow of conversation. On Wed, Dec 18, 2019 at 11:39 PM Rhodri James wrote: On 18/12/2019 0

Re: hexdump module installation error

2019-12-18 Thread Rhodri James
aw it. Could you copy and paste (DON'T retype!) the error instead, so we can all read it? -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Python3 - How do I import a class from another file

2019-12-12 Thread Rhodri James
It doesn't. This happens to be the behaviour in CPython, but other implementations vary as Chris has explained several times now. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Rhodri James
have further-reaching implications for those implementations. I can't speak to the details; the only other implementation I use is Micropython, and I don't use that often enough to have cared about the details of garbage collection beyond noting that it's different to CPython. -- Rho

Re: Python3 - How do I import a class from another file

2019-12-10 Thread Rhodri James
's an implementation detail of your computer. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Python3 - How do I import a class from another file

2019-12-10 Thread Rhodri James
On 10/12/2019 19:00, R.Wieser wrote: MRAB, You merely disabled the mark-and-sweep collector. Nope. Go check the docs on "gc" Yep. Go and check the docs on "gc" *carefully* *plonk* -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Python3 - How do I import a class from another file

2019-12-10 Thread Rhodri James
rt of space before deleting the object, for example, which might not happen until your script terminates. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Randomizing Strings In A Microservices World

2019-12-10 Thread Rhodri James
an individual machine) to each service. So do that, using whatever digits you have left after the unique machine number. * Mash these two numbers into a single ten digit identifier. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Regarding problem in python 3.8.0 installation

2019-12-09 Thread Rhodri James
.. I'm afraid this is a text-only mailing list, so your screenshot has been stripped off before any of us could see it. Please could you copy and paste the text of the error message you receive. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: ImportError: No module named Adafruit_SSD1306 Update

2019-12-05 Thread Rhodri James
On 05/12/2019 19:30, Rhodri James wrote: On 05/12/2019 18:49, RobH wrote: Update: I did python3 Internet.py and now only get this error: pi@raspberrypi:~/Downloads $ python3 Internet.py    File "Internet.py", line 24 font = ImageFont.truetype( 'Minec

Re: ImportError: No module named Adafruit_SSD1306 Update

2019-12-05 Thread Rhodri James
wn about this, and demand that we use either all tabs or all spaces for our indentation. That's what you've fallen foul off; there must be a mix of tabs and spaces in that line! -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: nonlocal fails ?

2019-11-14 Thread Rhodri James
al_variable = n love_my_global(3) # prints 'It was 5' show_my_global() # prints '3' -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

A more

2019-11-14 Thread James Lu
Where do I go to find a more complete specification for Python? I want to learn about common semi-internal language features used by popular libraries, because I am reimplementing Python. The reference guide says: > While I am trying to be as precise as possible, I chose to use English > rather t

Re: nonlocal fails ?

2019-11-14 Thread Rhodri James
scope *excluding globals.*" (my emphasis.) MyVar is a global here, so nonlocal explicitly doesn't pick it up. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Launching a Script on the Linux Platform

2019-11-12 Thread Rhodri James
The original idea of the shebang line invoking env, as far I recall, was that you'd get the "proper" system python3 wherever it had been put rather than something random and possibly malicious. I guess that means to go for your first option. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Using Makefiles in Python projects

2019-11-12 Thread Rhodri James
eemed that worthwhile. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Using Makefiles in Python projects

2019-11-11 Thread Rhodri James
o tell!) Trying to work cross-platform with NMake/GNU make is every bit as horrid as you're imagining when you start getting clever, and I haven't tried doing it for years. Generally when I'm working on both Windows and Linux, Cygwin is involved anyway so I just use GNU mak

Re: Using Makefiles in Python projects

2019-11-11 Thread Rhodri James
ke that comes with Visual Studio, for example, and use it in preference to the IDE when I can. Yes, it's a hassle, but it's a hassle you're going to go through anyway. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Syntax Suggestion: Pass Function Definition as Argument

2019-11-11 Thread Rhodri James
is probably right, but this is a toy example and just as easily written with lambdas if you're that worried about using up names. -10 from me. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   8   9   10   >