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
ul, but many programming books
are outdated and are more historical artifacts at this point.
songbird
--
https://mail.python.org/mailman/listinfo/python-list
> 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
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
=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
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
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
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
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.
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
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
d, 0 newly installed, 0 to remove and 222 not upgraded.
songbird
--
https://mail.python.org/mailman/listinfo/python-list
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
ot root 5479736 Dec 8 02:51 python3.9
thanks,
songbird
--
https://mail.python.org/mailman/listinfo/python-list
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
ain for trying and for the feedback. :)
songbird
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
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
just hope the lessons have been learned going
forwards.
songbird
--
https://mail.python.org/mailman/listinfo/python-list
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
, 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
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
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
&
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
d.
this would be a heck of a lot of fun.
songbird
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
y the number
of modules being used and it drains more time).
songbird
--
https://mail.python.org/mailman/listinfo/python-list
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
o Dan's answer.
>
> [snip]
ok, thanks!
songbird
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
;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@
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
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
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
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
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
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
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
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
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
've seen looks to be
either not adopted widely or not actively developed/maintained.
songbird
--
https://mail.python.org/mailman/listinfo/python-list
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
entertaining.
my code is all python 3 so that at least should
simplify some things.
songbird
--
https://mail.python.org/mailman/listinfo/python-list
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
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
.
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
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
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
have translators
for other languages as a part of their larger ecosystem.
songbird
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
Ben Finney wrote:
> songbird writes:
>
>> can i put multiple License lines in setup.py
>> classifiers like: ?
>>
>> "License :: OSI Approved :: ???",
>> "License :: OSI Approved :: ???",
>
> Yes.
>
> The
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
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
thanks, i'll put it on the list to seek.
songbird
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
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
78 matches
Mail list logo