Re: Pip installs to unexpected place

2025-04-21 Thread songbird via Python-list
lobal (in the sense that it applies to > all users) PYTHONPATH for that to happen. You just need a PYTHONPATH > that is set for all processes of that user - which the user can > certainly set without sudo (usually by editing .bashrc or maybe using > their desktop environment's settings dialog). yes, that is part of what .bashrc is for, making sure your environment variables are set how you'd like them. songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: Book recommendation? For getting up to date

2025-02-20 Thread songbird via Python-list
ul, but many programming books are outdated and are more historical artifacts at this point. songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: Keeping a list of records with named fields that can be updated

2022-12-19 Thread songbird
> NTRow(alpha=1, beta='two', gamma=3.0) > > Convert to dataclass: > > >>> dcrow = DCRow(*ntrow) > >>> dcrow > DCRow(alpha=1, beta='two', gamma=3.0) thanks, once i get the data in from the file i only have to reference it, but for the rest of the code i can use the dataclass instead and that will be easier to read than dicts. :) your help is appreciated. :) songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: Keeping a list of records with named fields that can be updated

2022-12-18 Thread songbird
each field in a dataclass and not have to specify a _replace for each change. is there an easy way to convert from namedtuple to dataclass? i can see there is a _asdict converter, but don't really like how that turns out as then i have to do a bunch of: rec['fieldname'] = blah rec.fieldname is much easier to understand. songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: Keeping a list of records with named fields that can be updated

2022-12-15 Thread songbird
=42, baz=3) > > An alternative would be dataclasses where basic usage is just as easy: > > >>> from dataclasses import make_dataclass > >>> Row = make_dataclass("Row", "foo bar baz".split()) > >>> row = Row(1, 2, 3) > >>> row > Row

Keeping a list of records with named fields that can be updated

2022-12-14 Thread songbird
hat I need to update. I've not gotten beyond that yet as I'm still learning. Suggestions? Thanks! :) songbird -- https://mail.python.org/mailman/listinfo/python-list

my python progress

2021-09-01 Thread songbird
data[indx_right+2] = int(blue_y) data[indx_left+3] = int(alpha_y) data[indx_right+3] = int(alpha_y) red_y -= step_y_red green_y -= step_y_green blue_y -= step_y_blue alpha_y -= step_y_alpha img_data = ImageData(width, height, 'RGBA', bytes(data)) return img_data = so never give up hope of teaching an old dog some new tricks. :) songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: A beginning beginner's question about input, output and . . .

2021-01-13 Thread songbird
he >> Linux kernel... > > > What do you mean, "until" ? > > https://medium.com/@yon.goldschmidt/running-python-in-the-linux-kernel-7cbcbd44503c > > http://www.kplugs.org/ yes! haha! :) love it! wish i had time to play now. songbird -- https://mail.python.org/mailman/listinfo/python-list

conceptual problem (was: A beginning beginner's question about input, output and . . .

2021-01-13 Thread songbird
roblem is that to me OOP means being able to encapsulate data structures and code from other parts of the program, but to me it doesn't look like that is how python is designed. this is probably a complete aside to this whole thread and perhaps even this newsgroup so i'll subthread this.

Re: A beginning beginner's question about input, output and . . .

2021-01-11 Thread songbird
here you'd see a lot of dumb things i've said too. don't worry. i'm sure i'll make other dumb posts too, but at the moment i'm mostly in a holding pattern for a while. i have a few other big projects i need to finish before i get back to python again. songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: Debian testing and virtual environment error message

2020-12-27 Thread songbird
Chris Angelico wrote: > On Mon, Dec 28, 2020 at 2:56 AM songbird wrote: ...needed to pull a few more things from unstable... > Ah, yep, that makes sense. I was a tad concerned about the mismatch of > versions, but honestly, I don't think I've ever installed Python from &g

Re: Debian testing and virtual environment error message

2020-12-27 Thread songbird
d, 0 newly installed, 0 to remove and 222 not upgraded. songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: Debian testing and virtual environment error message

2020-12-26 Thread songbird
songbird wrote: ... > The package mentioned is installed: > > >= > > $ dpkg -l | grep python3-venv > ii python3-venv 3.9.0-4amd64 >pyvenv-3 binary for python3 (default python3 version) > here is somethi

Re: Debian testing and virtual environment error message

2020-12-26 Thread songbird
ot root 5479736 Dec 8 02:51 python3.9 thanks, songbird -- https://mail.python.org/mailman/listinfo/python-list

Debian testing and virtual environment error message

2020-12-26 Thread songbird
d password # apt-get install python-is-python3 -t unstable Reading package lists... Done Building dependency tree Reading state information... Done python-is-python3 is already the newest version (3.8.6-3). 0 upgraded, 0 newly installed, 0 to remove and 250 not upgraded. = any idea

Re: songbird's ngfp

2020-11-06 Thread songbird
ain for trying and for the feedback. :) songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: Best way to determine user's screensize?

2020-11-02 Thread songbird
Grant Edwards wrote: > On 2020-11-01, songbird wrote: > >> to keep a program simple i made it to open in the center. > > That's not simple: it actually takes _extra_ work to do that. this was the first python3 program i wrote, i certainly do not know python3 or desktop a

Re: Best way to determine user's screensize?

2020-11-01 Thread songbird
Mats Wichmann wrote: > On 10/30/20 6:47 PM, songbird wrote: ... >> do you object to a window being put in the approximate >> center of the screen? > > Absolutely! I'm fighting that on a system which, after an update, > insists on opening new terminal windows

Re: Best way to determine user's screensize?

2020-11-01 Thread songbird
Grant Edwards wrote: > On 2020-10-31, songbird wrote: ... >> do you object to a window being put in the approximate >> center of the screen? > > YES. I've configured my window manager so windows start up where I > want them to start up. It's none of the applicat

Re: Best way to determine user's screensize?

2020-10-30 Thread songbird
Chris Angelico wrote: ... > I add my voice to those who detest applications that think they know > best and decide that they own the entire screen. It is incredibly > annoying. do you object to a window being put in the approximate center of the screen? songbird -- https://mail.p

Re: 1 line demo

2020-01-14 Thread songbird
Sam Olyk wrote: ... while all of this is interesting to a point please use a suitable nntp test group available instead of spamming this group. optimally the best would be to set up your own local server and then test using that. thanks songbird -- https://mail.python.org/mailman

Re: PyInstaller needs Funding by your Company

2020-01-08 Thread songbird
hink a larger company may just instead fork their own copy or fund an internal developer to track this project IF it is that important to them. he may resign or limit his participation in the future as with any other volunteer effort. it is GPL code. songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: python 2 to 3 converter

2019-12-10 Thread songbird
Chris Angelico wrote: > On Tue, Dec 10, 2019 at 4:41 PM songbird wrote: >> >> Chris Angelico wrote: >> ... >> > What if neither works, because there are assumptions that don't work? >> >> then you get stuck doing it by hand, but you would have &g

Re: python 2 to 3 converter

2019-12-10 Thread songbird
Chris Angelico wrote: > On Tue, Dec 10, 2019 at 12:15 PM songbird wrote: >> >> Chris Angelico wrote: >> ... >> > >> > Here's an example piece of code. >> > >> > sock = socket.socket(...) >> > name = input("Enter your

Re: python 2 to 3 converter

2019-12-09 Thread songbird
just hope the lessons have been learned going forwards. songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: python 2 to 3 converter

2019-12-09 Thread songbird
ned a thousand uses of match and found the pattern used above and then examined what those programs did with that match what would you select as the first type, the one used the most first, if that doesn't work go with the 2nd, etc. songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: python 2 to 3 converter

2019-12-09 Thread songbird
, think SCPI > commands being sent to a serial port. why not assume one, see if it works and then if it doesn't you know it is the other? if those are the only two choices then that speeds things up. songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: python 2 to 3 converter

2019-12-09 Thread songbird
dy been converted that contains similar patterns - eventually you would have enough of an idea of which things to try first to speed things up. yes, this is a generally hard issue if you are talking random strings and not sure what is what, but in the case of a computer language it is already s

Re: python 2 to 3 converter

2019-12-09 Thread songbird
Greg Ewing wrote: > On 8/12/19 9:30 pm, songbird wrote: >>wouldn't it make more sense to just go back and fix the >> converter program than to have to manually convert all this >> python2 code? > > Anything that isn't already fixed by 2to3 is probably &

Re: python 2 to 3 converter

2019-12-08 Thread songbird
Chris Angelico wrote: > On Sun, Dec 8, 2019 at 7:36 PM songbird wrote: >> this would be a heck of a lot of fun. > > Then go ahead and do it. i know you're just being flip here and that's fine with me. that said, i'd love to! how big is PyPI? (huge) will it

python 2 to 3 converter

2019-12-08 Thread songbird
d. this would be a heck of a lot of fun. songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: Conway's game of Life, just because.

2019-05-08 Thread songbird
don't have a lot of time now to work on it. maybe by next fall/winter... :) songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: revisiting the "What am I running on?" question

2019-03-01 Thread songbird
Terry Reedy wrote: > On 2/22/2019 7:55 AM, songbird wrote: >> eryk sun wrote: >> ... >>> The win-amd64 ABI is significantly different, but at the API level >>> there isn't a drastic difference between 32-bit and 64-bit Windows, so >>> there's

Re: revisiting the "What am I running on?" question

2019-02-23 Thread songbird
Terry Reedy wrote: > On 2/22/2019 7:55 AM, songbird wrote: >> eryk sun wrote: >> ... >>> The win-amd64 ABI is significantly different, but at the API level >>> there isn't a drastic difference between 32-bit and 64-bit Windows, so >>> there's

Re: revisiting the "What am I running on?" question

2019-02-22 Thread songbird
Chris Angelico wrote: >songbird wrote: ... >> "Do I have temporary directory and file creation >> permissions on this system or not?" > > Then ask that question instead! And the answer might well be here: > > https://docs.python.org/3/library/tempfile.html

Re: revisiting the "What am I running on?" question

2019-02-22 Thread songbird
for those who are using the startswith syntax and checking for "win" alone then you could change the string returned to "win32-win64" or some other string with the prefix "win" and it would still work with no changes needed. songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: revisiting the "What am I running on?" question

2019-02-22 Thread songbird
Chris Angelico wrote: > On Thu, Feb 21, 2019 at 12:56 AM songbird wrote: >> Thomas Jollans wrote: >> ... >> > I'm fairly sure "win32" was used on W9x as well. In any case it *was* >> > correct at the time, as early versions of Python also ran on DO

Re: revisiting the "What am I running on?" question

2019-02-20 Thread songbird
Chris Angelico wrote: > songbird wrote: ... >> no win64? > > The value "win32" means Windows (or, more technically, "Windows NT > family", as opposed to Win95/Win98 - but since Win XP, that's the only > type of Windows there is). If you actually c

Re: revisiting the "What am I running on?" question

2019-02-20 Thread songbird
y the number of modules being used and it drains more time). songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: Gtk. GUI app pgming

2019-02-19 Thread songbird
https://pypi.org/project/ngfp/ the python 3 code itself is rather atrocious in parts but that's a whole different issue... lol (i'm still obviously learning :) ) songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: revisiting the "What am I running on?" question

2019-02-19 Thread songbird
o Dan's answer. > > [snip] ok, thanks! songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: revisiting the "What am I running on?" question

2019-02-19 Thread songbird
Rick Johnson wrote: ... > The standard idiom for regexp match objects is to test for truthiness, not to > use an except-clause. > > m = re.search("^[A-Za-z]:", sysprobetmp) > if m: > ... ok, thanks! :) songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: revisiting the "What am I running on?" question

2019-02-19 Thread songbird
values are: System platform value Linux 'linux' Windows 'win32' Windows/Cygwin 'cygwin' Mac OS X'darwin' = no win64? no arm(s)? no legs(a joke :)... the above is missing a lot of devices. i looked around for

Re: revisiting the "What am I running on?" question

2019-02-17 Thread songbird
songbird wrote: ... > result = re.search("^/(tmp)|(var)|(usr)|(opt)|(home)", sysprobetmp) i changed that line to: result = re.search("^/((tmp)|(var)|(usr)|(opt)|(home))", sysprobetmp) just to make sure the leading slash is not just grouped with the first str

revisiting the "What am I running on?" question

2019-02-17 Thread songbird
;Result : -->" + result.group(0) + "<--\n") return ("windows") except: pass return ("unknown") def main (): print (sysprobe()) if __name__ == "__main__": main() = on my system i get: = (env) me@

Re: Why float('Nan') == float('Nan') is False

2019-02-13 Thread songbird
infinitely large (even if it isn't infinitely subdivisible)... so to me every one of those proofs is conditional upon assumptions (which also drags the p = np question into such assumptions). it's fun to think about. :) songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: Problem in Installing version 3.7.2(64 bit)

2019-01-29 Thread songbird
articles and replies). usenet has usually been a text only service unless you have a specific binary group (some usenet servers have them and others don't). asking the person to upload the image to someplace else and provide a link to the image would be a thing for the FAQ if there were

Re: preferences file

2019-01-28 Thread songbird
DL Neil wrote: > On 29/01/19 1:29 AM, Karsten Hilbert wrote: >> On Mon, Jan 28, 2019 at 07:02:47AM -0500, songbird wrote: >> >>>> What about running a multi-tenant application (for multiple users who >>>> are not also system-users) - cf them logging-on t

Re: preferences file

2019-01-28 Thread songbird
Karsten Hilbert wrote: > On Mon, Jan 28, 2019 at 10:23:31AM -0500, songbird wrote: >> Karsten Hilbert wrote: >> > On Mon, Jan 28, 2019 at 07:02:47AM -0500, songbird wrote: >> > >> >> > What about running a multi-tenant application (for multiple users wh

Re: preferences file

2019-01-28 Thread songbird
Karsten Hilbert wrote: > On Mon, Jan 28, 2019 at 07:02:47AM -0500, songbird wrote: > >> > What about running a multi-tenant application (for multiple users who >> > are not also system-users) - cf them logging-on to run their own. It is >> > appropriate, possib

Re: preferences file

2019-01-28 Thread songbird
rate from Barney's. Ideally they will > not be sub-dirs of the application/package. if it is per user defined then $HOME/.config/, $HOME/.local/share/ and any temporary data can go in $HOME/.cache/ will do it for posix on Windows there is the per user app stuff which i haven't sorted out yet. $HOME changes per user login name change. songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: Fatal Python error

2019-01-27 Thread songbird
ncodings' > >:Current thread 0x3c7c (most recent call first > > Process finished with exit code -1073740791 (0xC409) https://stackoverflow.com/questions/54087049/fatal-python-error-initfsencoding-unable-to-load-the-file-system-codec songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: preferences file

2019-01-26 Thread songbird
Karsten Hilbert wrote: > On Sat, Jan 26, 2019 at 05:35:26PM -0500, songbird wrote: > >> >> if the system doesn't have home directories but does have >> >> /usr/local you can put things in there (just check to make >> >> sure first that you aren&#

Re: preferences file

2019-01-26 Thread songbird
Karsten Hilbert wrote: > On Fri, Jan 25, 2019 at 11:04:51AM -0500, songbird wrote: > >> if the system doesn't have home directories but does have >> /usr/local you can put things in there (just check to make >> sure first that you aren't clobbering some

Re: preferences file

2019-01-25 Thread songbird
've seen looks to be either not adopted widely or not actively developed/maintained. songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: The following modules appear to be missing ['_sysconfigdata']

2019-01-09 Thread songbird
of my list of modules are supported but not sure all are without a test. will have to look into it further. tks. :) songbird (not the OP, but in a similar and perhaps more complicated boat... -- https://mail.python.org/mailman/listinfo/python-list

Re: The following modules appear to be missing ['_sysconfigdata']

2019-01-09 Thread songbird
entertaining. my code is all python 3 so that at least should simplify some things. songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: The following modules appear to be missing ['_sysconfigdata']

2019-01-09 Thread songbird
MRAB wrote: > On 2019-01-09 14:56, songbird wrote: >> Chris Angelico wrote: >> ... >>> You want it to work with minimal effort? Then forget about py2exe and >>> just distribute your .py files. WAY easier. >> >>which then forces the work onto every

Re: The following modules appear to be missing ['_sysconfigdata']

2019-01-09 Thread songbird
ve a Windows machine here at all i can only read up on it as much as i can and try to take some notes with me of things to check and try out and hope that is enough. i should be ok, but i'm not a Windows expert by far. so ... :) songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: The following modules appear to be missing ['_sysconfigdata']

2019-01-09 Thread songbird
. a build farm for common architectures would help a lot of developers avoid all this thrashing. songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: the python name

2019-01-04 Thread songbird
Rick Johnson wrote: ... > You're singing a sad tune songbird, but i feel your pain... like all things, this too shall pass... :) songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: the python name

2019-01-04 Thread songbird
Peter J. Holzer wrote: > songbird wrote: hi, thank you for your reply. ... > Almost all of these points don't seem to be related to the language, but > to your environment. an application isn't useful unless it actually can be deployed and used in an environment. t

Re: What can python replace?

2019-01-04 Thread songbird
have translators for other languages as a part of their larger ecosystem. songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: the python name

2019-01-03 Thread songbird
Rick Johnson wrote: > songbird wrote: > ... >> if you want to know the perspective of a new person >> to the language and to help out make it better i have >> a few suggestions for where to spend your time in a >> way that will help out people a great deal. > &g

Re: the python name

2019-01-02 Thread songbird
COBOL aren't dead i don't see Python going away any time soon. if you want to know the perspective of a new person to the language and to help out make it better i have a few suggestions for where to spend your time in a way that will help out people a great deal. songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: the python name

2019-01-02 Thread songbird
ing new to Python i'm not concerned about the name of it as much as having fun in figuring out what to do with it. songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: setup.py and licensing questions

2018-12-12 Thread songbird
Ben Finney wrote: > songbird writes: > >> can i put multiple License lines in setup.py >> classifiers like: ? >> >> "License :: OSI Approved :: ???", >> "License :: OSI Approved :: ???", > > Yes. > > The

setup.py and licensing questions

2018-12-12 Thread songbird
put on my own code and the artwork i've done). can i put multiple License lines in setup.py classifiers like: ? "License :: OSI Approved :: ???", "License :: OSI Approved :: ???", thanks, songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: What Python books to you recommend to beginners?

2018-12-03 Thread songbird
A person wrote via e-mail: > songbird wrote: >> Dennis Lee Bieber wrote: ... [post ok'd by them] > >my goal in learning python was to use it as a way of > > picking up OOP concepts in a more concrete way (theory > > alone doesn't give me enough hands on

Re: What Python books to you recommend to beginners?

2018-12-03 Thread songbird
thanks, i'll put it on the list to seek. songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: What Python books to you recommend to beginners?

2018-12-02 Thread songbird
Dennis Lee Bieber wrote: > On Sun, 2 Dec 2018 12:40:44 -0500, songbird > declaimed the following: > >> as references those are useful, but howabout >>something a bit more conceptual or design oriented? >> > > At that level, you are not looking for &qu

Re: What Python books to you recommend to beginners?

2018-12-02 Thread songbird
python program. i can hack stuff together and it works, but it doesn't look pretty... :) songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: Overwhelmed by the Simplicity of Python. Any Recommendation?

2018-11-03 Thread songbird
s going on as i read more of the history and how the language has developed. i won't consider myself fluent until i start "thinking" in it and can visualise the data structures/objects in my head and such as i currently do for C. songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: pyglet, i don't understand why this code isn't working

2018-11-02 Thread songbird
Peter Otten wrote: > songbird wrote: >> MRAB wrote: >>> On 2018-11-02 19:58, songbird wrote: >>>> >>>>hello, :) >>>> > >>> [snip] >>> In __init__ you initialise self.animation_initial_turn_it_off to True. >>&g

Re: pyglet, i don't understand why this code isn't working

2018-11-02 Thread songbird
MRAB wrote: > On 2018-11-02 19:58, songbird wrote: >> >>hello, :) >> >>my question is below, a bit of background first. >> i'm very new to python and picking it up by working >> on a project for fun. >> >>please don't cr

pyglet, i don't understand why this code isn't working

2018-11-02 Thread songbird
est_off, 5, marble_anim_sprite) pyglet.clock.schedule_once(test_on, 10, marble_anim_sprite) @window.event def on_draw(): window.clear() marble_anim_sprite.draw() @marble_anim_sprite.event def on_animation_end (): print ("on_animation_end ") pyglet.app.run() = songbird -- https://mail.python.org/mailman/listinfo/python-list

amusing error message

2018-11-02 Thread songbird
he 'on_animation_end' event was dispatched with 0 arguments, but the handler 'on_animation_end' at /home/me/src/salsa/ngfp/my_sprite.py:23 is written with 0 arguments. 0 <> 0! :) songbird -- https://mail.python.org/mailman/listinfo/python-list

Re: introduction

2018-11-02 Thread songbird
on it and picking up ideas as i go and have time to study more. i'm woefully bad at OOP concepts and it takes me a while for things to sink in. i see familiar names here from other lists i've been reading and writing to a few. :) songbird -- https://mail.python.org/mailman/listinfo/python-list