Re: Ad-hoc SQL query builder for Python3?

2021-04-26 Thread Robert Latest via Python-list
Rich Shepard wrote: > For those interested I've found a couple of possibilities: PyPika and > SQLbuilder. I'll be looking deeply into them to learn their capabilities. In case nobody mentioned it before, don't forget to take a look at SQLAlchemy. The object-relational-mapper (ORM) creates a 1:1 ma

Re: Not found in the documentation

2021-04-26 Thread Paul Bryan
I agree. I would be useful for it to be documented elsewhere, especially in docstrings. I wonder if this is/was a conscious decision to keep Python runtime smaller? Paul On Mon, 2021-04-26 at 18:24 -0700, elas tica wrote: > Le mardi 27 avril 2021 à 01:44:04 UTC+2, Paul Bryan a écrit : > > From >

Re: Not found in the documentation

2021-04-26 Thread 2QdxY4RzWzUUiLuE
On 2021-04-26 at 18:24:18 -0700, elas tica wrote: > [...] I was expecting to find [a description of what str returns for > various types] in the Built-in Types section from the PSL > documentation. The representation returned by str over a complex > number is not stated. The same for fraction obj

Re: Not found in the documentation

2021-04-26 Thread elas tica
Le mardi 27 avril 2021 à 01:44:04 UTC+2, Paul Bryan a écrit : > From > https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy > > : > Thanks for the reference. I was expecting to find this information in the Built-in Types section from the PSL documentation. The repr

Re: Not found in the documentation

2021-04-26 Thread Paul Bryan
From  https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy : > The string representations of the numeric classes, computed > by__repr__() and __str__(), have the following properties: > * They are valid numeric literals which, when passed to their >class constructor,

Not found in the documentation

2021-04-26 Thread elas tica
Python documentation doesn't seem to mention anywhere what is the str value of an int: is it right? the same for float, Fraction, complex, etc? Not worth to be documented? Perphaps str(42) returns "forty two" or "XLII" or "101010" ... -- https://mail.python.org/mailman/listinfo/python-list

Re: async watch directory for new files

2021-04-26 Thread Barry Scott
> On 24 Apr 2021, at 21:12, Zoran wrote: > > As I can see https://pypi.org/project/inotify/ > is not asyncio frendly. > Whatever I use, it should be asynchronous. > Final OS is linux (Centos 7), but I am doing development on Windows 10 > machine, so it wo

Re: "py.ini" question

2021-04-26 Thread Barry Scott
> On 26 Apr 2021, at 09:13, Gisle Vanem wrote: > > Thank for confirming what I suspected. And as I wrote earlier: > Since I'm on a 64-bit Python, a 'py -3' totally seems to ignore > 'py.ini', unless it says: >[defaults] >python3=3.6 >python3=3.6-32 You can prove that py.ini is i

Re: "py.ini" question

2021-04-26 Thread Barry Scott
> On 24 Apr 2021, at 20:56, Gisle Vanem wrote: > > On that, I'm getting: > Requested Python version (0) not installed > > Is that '-0' some 3.9+ feature? No its a lot older then 3.9 I cannot remember when -0 was first supported but I've been using -0 for a long long time. I using the explo

c-types Structure and equality with bytes/bytearray

2021-04-26 Thread Michael Hull
Hello everyone, I've been working with ctypes recently, and I've come across what seems to be some slightly confusing behaviour, when comparing ctype's Structure against `bytes` and `bytearray` objects import ctypes class Int(ctypes.Structure): _fields_ = [("first_16", ctypes.c_int8),

Re: Are there Python modules that allow a program to write to the screen?

2021-04-26 Thread Grant Edwards
On 2021-04-26, Stephen Tucker wrote: > I have old software written in GWBASIC that I use to plot diagrams on the > screen. Pygame is probably the closest thing to what you're describing. If you want to produce professional looking plots from data, then matplotlib or one of the Gnuplot wrappers (

Re: Are there Python modules that allow a program to write to the screen?

2021-04-26 Thread Michael Torrie
On 4/26/21 12:38 AM, Stephen Tucker wrote: > Hi, > > I have old software written in GWBASIC that I use to plot diagrams on the > screen. > > In Windows 10, I have to resort to using the DOSBox emulator to run it. > > I would dearly like to re-write it in Python - ideally Python 2.7. > > What, i

Re: Problems deploying from poetry development environment

2021-04-26 Thread Loris Bennett
"Loris Bennett" writes: > Hi, > > I am developing using poetry and deploying to a directory on an NFS > server. The steps I have been using are > > 1. poetry build > 2. poetry install > 3. PYTHONUSERBASE=/my/nfs/dir pip3 install --user > ~/git/funky_prog/dist/funky_prog-0.2.0-py3-none-any

Re: Ad-hoc SQL query builder for Python3?

2021-04-26 Thread Rich Shepard
On Sat, 24 Apr 2021, Rich Shepard wrote: My web searches are not finding what I need to include in an application I'm building: an ad-hoc sql query builder. For those interested I've found a couple of possibilities: PyPika and SQLbuilder. I'll be looking deeply into them to learn their capabil

Problems deploying from poetry development environment

2021-04-26 Thread Loris Bennett
Hi, I am developing using poetry and deploying to a directory on an NFS server. The steps I have been using are 1. poetry build 2. poetry install 3. PYTHONUSERBASE=/my/nfs/dir pip3 install --user ~/git/funky_prog/dist/funky_prog-0.2.0-py3-none-any.whl --upgrade This worked. The programs

EuroPython 2021: Call for Proposals Open

2021-04-26 Thread M.-A. Lemburg
We're happy to announce the EuroPython 2021 Call for Proposals (CFP) and are accepting proposals for talks, training sessions, workshops, panels, poster sessions, helpdesks and other interactive sessions at EuroPython 2021. * EuroPython 2021 Call for Proposals (CFP) * https://ep2

Re: Ad-hoc SQL query builder for Python3?

2021-04-26 Thread Peter J. Holzer
On 2021-04-25 15:23:57 -0700, Rich Shepard wrote: > On Sun, 25 Apr 2021, Peter J. Holzer wrote: > > What should that sql query builder build the queries from? Or in other > > words what is the user supposed to input? > > Peter, > > From the dialog box offering tables, columns, and rows from which

Re: "py.ini" question

2021-04-26 Thread Gisle Vanem
Ralf M. wrote: I think the problem / misunderstanding is that Gisle put in py.ini only  [defaults]  python=3.6 and expected this to make py -3 start 3.6. However py -3 looks for a key named 'python3' and, not finding it, uses default behaviour (ignoring the 'python' key), i.e. starts the mos

Re: Are there Python modules that allow a program to write to the screen?

2021-04-26 Thread Chris Angelico
On Mon, Apr 26, 2021 at 4:40 PM Stephen Tucker wrote: > > Hi, > > I have old software written in GWBASIC that I use to plot diagrams on the > screen. > > In Windows 10, I have to resort to using the DOSBox emulator to run it. > "The screen" isn't really a viable target in a modern world, so it de