Re: it's a shame... python error over error

2025-01-03 Thread Chris Angelico via Python-list
On Sat, 4 Jan 2025 at 09:22, aotto1968 via Python-list wrote: > > On 30.12.24 18:29, Michael Torrie wrote: > > On 12/26/24 12:34 AM, aotto1968 via Python-list wrote: > >> sorry you don't understand the problem… > >> > >> > You managed to make a build of Python that attempts to link to a DLL > >>

Re: it's a shame... python error over error

2025-01-03 Thread aotto1968 via Python-list
On 30.12.24 18:29, Michael Torrie wrote: On 12/26/24 12:34 AM, aotto1968 via Python-list wrote: sorry you don't understand the problem… > You managed to make a build of Python that attempts to link to a DLL I never touch the OpenSUSE python. the OpenSUSE python try to use my sqalite3. The

Re: it's a shame... python error over error

2024-12-30 Thread Michael Torrie via Python-list
On 12/26/24 12:34 AM, aotto1968 via Python-list wrote: > sorry you don't understand the problem… > > > You managed to make a build of Python that attempts to link to a DLL > > I never touch the OpenSUSE python. the OpenSUSE python try to use my > sqalite3. The *only* mechanism that would cause

Re: it's a shame... python error over error

2024-12-29 Thread Chris Angelico via Python-list
On Mon, 30 Dec 2024 at 15:02, aotto1968 via Python-list wrote: > > You managed to make a build of Python that attempts to link to a DLL > > I never touch the OpenSUSE python. the OpenSUSE python try to use my > sqalite3. You keep saying this, but do you even know what "make install" does? Are y

Re: it's a shame... python error over error

2024-12-29 Thread aotto1968 via Python-list
On 26.12.24 19:33, Michael Torrie wrote: On 12/25/24 10:46 PM, Chris Angelico wrote: Right. That's exactly what would happen if he'd built Python using absolute paths to libraries, which is the normal way to do it. And so the solution is to rebuild Python using absolute paths to libraries. You

Re: it's a shame... python error over error

2024-12-29 Thread aotto1968 via Python-list
On 26.12.24 04:55, Michael Torrie wrote: On 12/25/24 3:55 PM, Chris Angelico via Python-list wrote: On Thu, 26 Dec 2024 at 09:27, aotto1968 via Python-list wrote: It is not only an *usage* error it is also an *security* error because: 1) "cnf" is using OS python 2) os "root" python 3) using *

Re: it's a shame... python error over error

2024-12-29 Thread aotto1968 via Python-list
On 26.12.24 04:55, Michael Torrie wrote: On 12/25/24 3:55 PM, Chris Angelico via Python-list wrote: On Thu, 26 Dec 2024 at 09:27, aotto1968 via Python-list wrote: It is not only an *usage* error it is also an *security* error because: 1) "cnf" is using OS python 2) os "root" python 3) using *

Re: it's a shame... python error over error

2024-12-29 Thread aotto1968 via Python-list
On 26.12.24 06:46, Chris Angelico wrote: On Thu, 26 Dec 2024 at 14:57, Michael Torrie via Python-list wrote: On 12/25/24 3:55 PM, Chris Angelico via Python-list wrote: On Thu, 26 Dec 2024 at 09:27, aotto1968 via Python-list wrote: It is not only an *usage* error it is also an *security* err

Re: it's a shame... python error over error

2024-12-29 Thread aotto1968 via Python-list
On 25.12.24 23:55, Chris Angelico wrote: On Thu, 26 Dec 2024 at 09:27, aotto1968 via Python-list wrote: It is not only an *usage* error it is also an *security* error because: 1) "cnf" is using OS python 2) os "root" python 3) using **my** local non-root library Yes. And YOU were the one who

Re: it's a shame... python error over error

2024-12-26 Thread Michael Torrie via Python-list
On 12/25/24 10:46 PM, Chris Angelico wrote: > Right. That's exactly what would happen if he'd built Python using > absolute paths to libraries, which is the normal way to do it. And so > the solution is to rebuild Python using absolute paths to libraries. You're right. Definitely appears to be a p

Re: it's a shame... python error over error

2024-12-25 Thread Chris Angelico via Python-list
On Thu, 26 Dec 2024 at 14:57, Michael Torrie via Python-list wrote: > > On 12/25/24 3:55 PM, Chris Angelico via Python-list wrote: > > On Thu, 26 Dec 2024 at 09:27, aotto1968 via Python-list > > wrote: > >> It is not only an *usage* error it is also an *security* error because: > >> > >> 1) "cnf"

Re: it's a shame... python error over error

2024-12-25 Thread Michael Torrie via Python-list
On 12/25/24 8:55 PM, Michael Torrie wrote: > This is Python related, but > it's not necessarily python's fault per se. It's also a good reminder to use venv. Then there's no way of activating your custom python with its custom sqlite3 library unless you explicitly activate the venv. -- https://m

Re: it's a shame... python error over error

2024-12-25 Thread Michael Torrie via Python-list
On 12/25/24 3:55 PM, Chris Angelico via Python-list wrote: > On Thu, 26 Dec 2024 at 09:27, aotto1968 via Python-list > wrote: >> It is not only an *usage* error it is also an *security* error because: >> >> 1) "cnf" is using OS python >> 2) os "root" python >> 3) using **my** local non-root librar

Re: it's a shame... python error over error

2024-12-25 Thread Chris Angelico via Python-list
On Thu, 26 Dec 2024 at 09:27, aotto1968 via Python-list wrote: > It is not only an *usage* error it is also an *security* error because: > > 1) "cnf" is using OS python > 2) os "root" python > 3) using **my** local non-root library Yes. And YOU were the one who installed a new root Python. This i

Re: it's a shame... python error over error

2024-12-25 Thread aotto1968 via Python-list
On 25.12.24 12:05, aotto1968 wrote: I get angry… next python error… 1) The OpenSUSE command "cnf" checks if a special package feature is installed. 2) I recently compiled **my** SQLite3 library specifically tailored to **my** requirement and installed it in **my** SQLite3 project directory and

Re: it's a shame... python error over error

2024-12-25 Thread aotto1968 via Python-list
I get angry… next python error… 1) The OpenSUSE command "cnf" checks if a special package feature is installed. 2) I recently compiled **my** SQLite3 library specifically tailored to **my** requirement and installed it in **my** SQLite3 project directory and never changed the OpenSUSE installat

Re: it's a shame... python error over error

2024-12-17 Thread Michael Torrie via Python-list
On 12/16/24 12:08 AM, aotto1968 via Python-list wrote: > If I read the answers I come to the conclusion that the "supporters" at > python doesn't ever understand the problem. Sorry you feel that way. Various people gave the best advice they could based on what you had provided. You were given s

Re: it's a shame... python error over error

2024-12-16 Thread Grant Edwards via Python-list
On 2024-12-16, aotto1968 via Python-list wrote: > If I read the answers I come to the conclusion that the "supporters" > at python doesn't ever understand the problem. You should definitely demand to speak to the manager and request your money back. -- Grant -- https://mail.python.org/mailman

Re: it's a shame... python error over error

2024-12-16 Thread Peter J. Holzer via Python-list
On 2024-12-16 08:08:46 +0100, aotto1968 via Python-list wrote: > On 13.12.24 11:36, aotto1968 wrote: > > it's a shame... > > almost every tool I touch that uses "python" in some way has some > > configuration error because apparently a __private__ python installation > > __isn't__ properly "underst

Re: it's a shame... python error over error

2024-12-16 Thread aotto1968 via Python-list
On 13.12.24 11:36, aotto1968 wrote: it's a shame... almost every tool I touch that uses "python" in some way has some configuration error because apparently a __private__ python installation __isn't__ properly "understood". -> I think after ~30 years *python* should be able to handle a shared-

Re: it's a shame... python error over error

2024-12-14 Thread Michael Torrie via Python-list
On 12/14/24 10:31 AM, aotto1968 via Python-list wrote: > The CORE problem is that python3 works well in *my* environment but the > installation is done as root and root does not use *my* environment. > > the mono build search for a working python3 and find *my* > > HOME/ext/x86_64-suse-linux-gnu/

Re: it's a shame... python error over error

2024-12-14 Thread Chris Angelico via Python-list
On Sun, 15 Dec 2024 at 06:05, aotto1968 via Python-list wrote: > The CORE problem is that python3 works well in *my* environment but the > installation is done as root and root does not use *my* environment. > So, it's an environment problem, NOT a Python problem. You messed up your installation.

Re: it's a shame... python error over error

2024-12-14 Thread aotto1968 via Python-list
On 14.12.24 10:56, Peter J. Holzer wrote: On 2024-12-13 11:36:01 +0100, aotto1968 via Python-list wrote: it's a shame... almost every tool I touch that uses "python" in some way has some configuration error because apparently a __private__ python installation __isn't__ properly "understood". ->

Re: it's a shame... python error over error

2024-12-14 Thread Michael Torrie via Python-list
On 12/14/24 2:56 AM, Peter J. Holzer via Python-list wrote: > So it might be because it's in a different directory ("HOME/ext/..." is > a relative path. That will not work in a different directory. Also > "HOME" is a strange choice for a directory name. Did you mean $HOME?) or > because the accepta

Re: it's a shame... python error over error

2024-12-14 Thread Michael Torrie via Python-list
On 12/13/24 1:56 PM, aotto1968 via Python-list wrote: > the problem is *not* to setup an environment variable, the problem is that > python is *not* > able to setup the *python* environment by it self. You're mistaken in this case. Nothing you've posted indicates the problem is in Python itself.

Re: it's a shame... python error over error

2024-12-14 Thread Peter J. Holzer via Python-list
On 2024-12-13 11:36:01 +0100, aotto1968 via Python-list wrote: > it's a shame... > almost every tool I touch that uses "python" in some way has some > configuration error because apparently a __private__ python installation > __isn't__ properly "understood". > > -> I think after ~30 years *python*

Re: it's a shame... python error over error

2024-12-13 Thread aotto1968 via Python-list
On 13.12.24 19:24, Barry wrote: On 13 Dec 2024, at 15:54, aotto1968 via Python-list wrote: HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open shared object file: No such file or directory This is a debug build? Try

Re: it's a shame... python error over error

2024-12-13 Thread Barry via Python-list
> On 13 Dec 2024, at 15:54, aotto1968 via Python-list > wrote: > > HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared > libraries: libpython3.12d.so.1.0: cannot open shared object file: No such > file or directory This is a debug build? Try setting LD_LIBRARY_PAT

Re: it's a shame... python error over error

2024-12-13 Thread aotto1968 via Python-list
On 13.12.24 11:44, aotto1968 wrote: On 13.12.24 11:36, aotto1968 wrote: it's a shame... almost every tool I touch that uses "python" in some way has some configuration error because apparently a __private__ python installation __isn't__ properly "understood". -> I think after ~30 years *pytho

Re: it's a shame... python error over error

2024-12-13 Thread aotto1968 via Python-list
On 13.12.24 11:36, aotto1968 wrote: it's a shame... almost every tool I touch that uses "python" in some way has some configuration error because apparently a __private__ python installation __isn't__ properly "understood". -> I think after ~30 years *python* should be able to handle a shared-

Re: it's really strange.how does it work?

2012-08-14 Thread Chris Rebert
On Tue, Aug 14, 2012 at 10:07 PM, levi nie wrote: > ok,what does "start, stop = 0, start" in the code mean? > it's really strange.how does it work? It's just parallel assignment (http://en.wikipedia.org/wiki/Assignment_%28computer_science%29#Parallel_assignment ). As to exactly how it works: htt

Re: it's really strange.how does it work?

2012-08-14 Thread Ramchandra Apte
Even I got confused a bit: explaination: this is called iterable unpacking `start, stop = 0, start` is the same as: temp = start start = 0 stop = temp On 15 August 2012 10:37, levi nie wrote: > ok,what does "start, stop = 0, start" in the code mean? > it's really strange.how does it work? > > co

Re: It's ...

2009-07-01 Thread J. Cliff Dyer
On Tue, 2009-06-30 at 13:24 -0700, Beni Cherniavsky wrote: > On Jun 24, 11:40 pm, "J. Cliff Dyer" wrote: > > Also note that you can iterate over a file several times: > > > > f = open('foo.txt') > > for line in f: > > print line[0] # prints the first character of every line > > for line in f:

Re: It's ...

2009-06-30 Thread Beni Cherniavsky
On Jun 24, 11:40 pm, "J. Cliff Dyer" wrote: > Also note that you can iterate over a file several times: > > f = open('foo.txt') > for line in f: > print line[0] # prints the first character of every line > for line in f: > print line[1] #prints the second character of every line > No, yo

Re: It's ...

2009-06-27 Thread Angus Rodgers
On Sat, 27 Jun 2009 03:32:12 -0300, "Gabriel Genellina" wrote: >Iterators were added in Python 2.2. Just my luck. :-) >See PEP 234 http://www.python.org/dev/peps/pep-0234/ You've got to love a language whose documentation contains sentences beginning like this: "Among its chief virtues are

Re: It's ...

2009-06-26 Thread Gabriel Genellina
En Thu, 25 Jun 2009 14:07:19 -0300, Angus Rodgers escribió: On Thu, 25 Jun 2009 17:56:47 +0100, I burbled incoherently: [...] does the new feature, by which a file becomes iterable, operate by some kind of coercion of a file object to a list object, via something like x.readlines()? Sorry

Re: It's ...

2009-06-26 Thread Angus Rodgers
On Thu, 25 Jun 2009 18:22:48 +0100, MRAB wrote: >Angus Rodgers wrote: >> On Thu, 25 Jun 2009 10:31:47 -0500, Kirk Strauser >> wrote: >> >>> At 2009-06-24T19:53:49Z, Angus Rodgers writes: >>> print ''.join(map(detab, f.xreadlines())) >>> An equivalent in modern Pythons: >>> >> print

Re: It's ...

2009-06-25 Thread MRAB
Angus Rodgers wrote: On Thu, 25 Jun 2009 10:31:47 -0500, Kirk Strauser wrote: At 2009-06-24T19:53:49Z, Angus Rodgers writes: print ''.join(map(detab, f.xreadlines())) An equivalent in modern Pythons: print ''.join(line.expandtabs(3) for line in file('h071.txt')) I guess the code below

Re: It's ...

2009-06-25 Thread Angus Rodgers
On Thu, 25 Jun 2009 17:56:47 +0100, I found a new way to disgrace myself, thus: >[...] something like x.readlines()? ^ I don't know how that full stop got in there. Please ignore it! -- Angus Rodgers -- http://mail.python.org/mailman/listinfo/python-list

Re: It's ...

2009-06-25 Thread Angus Rodgers
On Thu, 25 Jun 2009 17:56:47 +0100, I burbled incoherently: >[...] does the new feature, >by which a file becomes iterable, operate by some kind of coercion >of a file object to a list object, via something like x.readlines()? Sorry to follow up my own post yet again (amongst my weapons is a fana

Re: It's ...

2009-06-25 Thread Angus Rodgers
On Thu, 25 Jun 2009 17:53:51 +0100, I wrote: >On Thu, 25 Jun 2009 10:31:47 -0500, Kirk Strauser > wrote: > >>At 2009-06-24T19:53:49Z, Angus Rodgers writes: >> >>> print ''.join(map(detab, f.xreadlines())) >> >>An equivalent in modern Pythons: >> > print ''.join(line.expandtabs(3) for line in

Re: It's ...

2009-06-25 Thread Angus Rodgers
On Thu, 25 Jun 2009 10:31:47 -0500, Kirk Strauser wrote: >At 2009-06-24T19:53:49Z, Angus Rodgers writes: > >> print ''.join(map(detab, f.xreadlines())) > >An equivalent in modern Pythons: > print ''.join(line.expandtabs(3) for line in file('h071.txt')) I guess the code below would also ha

Re: It's ...

2009-06-25 Thread Kirk Strauser
At 2009-06-24T19:53:49Z, Angus Rodgers writes: > stop = 3 # Tab stops every 3 characters > from types import StringType # Is this awkwardness necessary? > detab = lambda s : StringType.expandtabs(s, stop) # Or use def > f = open('h071.txt') # Do some stuff to f, perhaps, and then: > f.seek

Re: It's ...

2009-06-24 Thread Scott David Daniels
Scott David Daniels wrote: Angus Rodgers wrote: ... my first ... question is how best to find out what's changed from version 2.1 > to version 2.5. (I've recently installed 2.5.4) Consecutively read: http://docs.python.org/whatsnew/2.2.html As someone else pointed out: http://www.p

Re: It's ...

2009-06-24 Thread J. Clifford Dyer
On Wed, 2009-06-24 at 14:54 -0700, Aahz wrote: > In article , > J. Cliff Dyer wrote: > > > >Glad you're enjoying Beazley. I would look for something more > >up-to-date. Python's come a long way since 2.1. I'd hate for you to > >miss out on all the iterators, booleans, codecs, subprocess, yield,

Re: It's ...

2009-06-24 Thread Angus Rodgers
On Wed, 24 Jun 2009 22:43:01 +0100, I wrote: >No point in nailing this polly to the perch any more! Indeed not, so please skip what follows (I've surely been enough of an annoying newbie, already!), but I've just remembered why I wrote my program in such an awkward way. I wanted to be able to im

Re: It's ...

2009-06-24 Thread Aahz
In article , J. Cliff Dyer wrote: > >Glad you're enjoying Beazley. I would look for something more >up-to-date. Python's come a long way since 2.1. I'd hate for you to >miss out on all the iterators, booleans, codecs, subprocess, yield, >unified int/longs, decorators, decimals, sets, context ma

Re: It's ...

2009-06-24 Thread Angus Rodgers
On Wed, 24 Jun 2009 14:10:54 -0700, Scott David Daniels wrote: >Angus Rodgers wrote: > >> from types import StringType # Is this awkwardness necessary? >Nope I'm starting to see some of the mental haze that was confusing me. >Also, expandtabs is an instance method, so the roundabout is not ne

Re: It's ...

2009-06-24 Thread Angus Rodgers
On Wed, 24 Jun 2009 22:12:33 +0100, I wrote: >How exactly do I get detab, as a function from strings to strings >(for a fixed tab size)? (It's OK - this has been explained in another reply. I'm still a little hazy about what exactly objects are in Python, but the haze will soon clear, I'm sure,

Re: It's ...

2009-06-24 Thread Angus Rodgers
On Wed, 24 Jun 2009 16:40:29 -0400, "J. Cliff Dyer" wrote: >On Wed, 2009-06-24 at 20:53 +0100, Angus Rodgers wrote: >> [...] >> from types import StringType # Is this awkwardness necessary? > >Not anymore. You can just use str for this. > >> detab = lambda s : StringType.expandtabs(s, stop) #

Re: It's ...

2009-06-24 Thread Scott David Daniels
Angus Rodgers wrote: ... my first ... question is how best to find out what's changed from version 2.1 > to version 2.5. (I've recently installed 2.5.4) Consecutively read: http://docs.python.org/whatsnew/2.2.html http://docs.python.org/whatsnew/2.3.html http://docs.python.org/whatsn

Re: It's ...

2009-06-24 Thread J. Cliff Dyer
On Wed, 2009-06-24 at 20:53 +0100, Angus Rodgers wrote: > ... my first Python program! So please be gentle (no fifty ton > weights on the head!), but tell me if it's properly "Pythonic", > or if it's a dead parrot (and if the latter, how to revive it). > Yay. Welcome to Python. > I'm working

Re: It's ...

2009-06-24 Thread Angus Rodgers
On Wed, 24 Jun 2009 20:53:49 +0100, I wrote: >[...] my first newbie question is how best to find out >what's changed from version 2.1 to version 2.5. >[...] is there a quick online way to find this out? One way seems to be:

Re: It's ok to __slots__ for what they were intended

2007-12-22 Thread John Nagle
Fredrik Lundh wrote: > John Nagle wrote: > >> I'd like to hear more about what kind of performance gain can be >> obtained from "__slots__". I'm looking into ways of speeding up >> HTML parsing via BeautifulSoup. If a significant speedup can be >> obtained when navigating large trees of sma

Re: It's ok to __slots__ for what they were intended

2007-12-21 Thread MrJean1
You are correct. Mea culpa. /Jean Brouwers On Dec 21, 1:41 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > MrJean1 wrote: > > My milage does vary, see this older post > > >   > > > Similar figures are shown with Python 2.5, bot

Re: It's ok to __slots__ for what they were intended

2007-12-21 Thread Chris Mellon
On Dec 21, 2007 2:07 PM, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > John Nagle wrote: > > > I'd like to hear more about what kind of performance gain can be > > obtained from "__slots__". I'm looking into ways of speeding up > > HTML parsing via BeautifulSoup. If a significant speedup can be

Re: It's ok to __slots__ for what they were intended

2007-12-21 Thread Fredrik Lundh
MrJean1 wrote: > My milage does vary, see this older post > > > > Similar figures are shown with Python 2.5, both for 32- and 64-bit. unless I'm missing something, you're measuring object creation time. I'm measuring attribu

Re: It's ok to __slots__ for what they were intended

2007-12-21 Thread MrJean1
My milage does vary, see this older post Similar figures are shown with Python 2.5, both for 32- and 64-bit. /Jean Brouwers On Dec 21, 12:07 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > John Nagle wrote: > >      I'd like

Re: It's ok to __slots__ for what they were intended

2007-12-21 Thread Fredrik Lundh
John Nagle wrote: > I'd like to hear more about what kind of performance gain can be > obtained from "__slots__". I'm looking into ways of speeding up > HTML parsing via BeautifulSoup. If a significant speedup can be > obtained when navigating large trees of small objects, that's worth > qu

Re: It's ok to __slots__ for what they were intended

2007-12-21 Thread John Nagle
Chris Mellon wrote: > On 20 Dec 2007 19:50:31 -0800, Aahz <[EMAIL PROTECTED]> wrote: >> In article <[EMAIL PROTECTED]>, >> Carl Banks <[EMAIL PROTECTED]> wrote: Someday I'll have time to write up a proper page about why you shouldn't use __slots__ > Barking out your blanket warning

Re: It's ok to __slots__ for what they were intended (was: Don't use __slots__ (was Re: Why custom objects take so much memory?))

2007-12-21 Thread Chris Mellon
On 20 Dec 2007 19:50:31 -0800, Aahz <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Carl Banks <[EMAIL PROTECTED]> wrote: > >On Dec 18, 4:49 pm, [EMAIL PROTECTED] (Aahz) wrote: > >> In article <[EMAIL PROTECTED]>, > >> Chris Mellon <[EMAIL PROTECTED]> wrote: > >>> > >>>You can reduc

Re: It's ok to __slots__ for what they were intended (was: Don't use __slots__ (was Re: Why custom objects take so much memory?))

2007-12-20 Thread Aahz
In article <[EMAIL PROTECTED]>, Carl Banks <[EMAIL PROTECTED]> wrote: >On Dec 18, 4:49 pm, [EMAIL PROTECTED] (Aahz) wrote: >> In article <[EMAIL PROTECTED]>, >> Chris Mellon <[EMAIL PROTECTED]> wrote: >>> >>>You can reduce the size of new-style classes (inherit from object) by >>>quite a bit if yo

Re: It's ok to __slots__ for what they were intended (was: Don't use __slots__ (was Re: Why custom objects take so much memory?))

2007-12-18 Thread Carl Banks
On Dec 18, 4:49 pm, [EMAIL PROTECTED] (Aahz) wrote: > In article <[EMAIL PROTECTED]>, > > Chris Mellon <[EMAIL PROTECTED]> wrote: > > >You can reduce the size of new-style classes (inherit from object) by > >quite a bit if you use __slots__ to eliminate the class dictionary. > > You can also reduce