Peter J. Holzer wrote:
> [-- text/plain, encoding quoted-printable, charset: us-ascii, 32 lines --]
>
> On 2025-01-14 11:32:35 +0000, Chris Green via Python-list wrote:
> > Use a virtual environment, what do I have to do then to make using
> > my program (t
and
use that. My PYTHONPATH will need to point to it but I can't see
any further issues with doing this.
Anything else? As far as I can see using pipx doesn't help me at
all (see recent thread here).
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
se I might as well use a GUI. I have written
a (fairly simple) Gtk based python program, I was just trying to avoid
all the GUI overheads for a little new project.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
rustbuck...@nope.com wrote:
>
> This is what I was going to suggest. Rich is super easy to use.
OK, thanks, Rich is on my shortlist then.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Stefan Ram wrote:
> Chris Green wrote or quoted:
> >E.g. I want to install and use pksheet but, as it's not available from
> >the Debian repositories, I'll have to install it from PyPi.
>
> I can't dig up any "pksheet" on PyPI. So, you got to ta
in its own environment. Can pipx help me with this?
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Are there any packages that offer this sort of thing? I'd prefer ones
from the Debian repositories but that's not absolutely necessary.
It might also be possible/useful to use the mouse for this.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Stefan Ram wrote:
> Chris Green wrote or quoted:
> >From: =?utf-8?B?U8OpYmFzdGllbiBDcmlnbm9u?=
>
> In Python, when you roll with decode_header from the email.header
> module, it spits out a list of parts, where each part is like
> a tuple of (decoded string, cha
wrapped bit
altogether as I'm only interested in the 'real' address. How can I
easily remove the UTF8 section in a way that will work whether or not
it's there?
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
quite nicely with a text mode E-Mail client such
as mutt so you can keep threads separate, follow sub-threads, etc.
Not quite as good as this list gatewayed to usenet though, there's
really nothing so good as usenet for proper discourse (!).
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Stefan Ram wrote:
> Chris Green wrote or quoted:
> >That's exactly the sort of solution I was wondering about. Is there a
> >ready made module/library for handling this sort of thing? Basically
> >it will just be a string of a few tens of characters that would be
Lawrence D'Oliveiro wrote:
> On Sat, 6 Jul 2024 08:28:41 +0100, Chris Green wrote:
>
> > One fairly obvious way is to have single process/script which reads the
> > A2D values continuously and writes them to a file. All other scripts
> > then read from the file as n
Piergiorgio Sartor
wrote:
> On 06/07/2024 09.28, Chris Green wrote:
> > I have a Raspberry Pi in my boat that uses I2C to read a number of
> > voltages and currents (using ADS1115 A2D) so I can monitor the battery
> > condition etc.
> >
> > At present various
self has a mutex but I don't think this guarantees that
(for example) an A2D reading is atomic because one reading takes more
than one I2C bus access.
Would a mutex of some sort around each I2C transaction (i.e. complete
A2D reading) be a better way to go?
--
Chris Green
·
--
https://mail.pyt
s no sense! :-)
How can one not say something that one isn't aware of saying?
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Grant Edwards wrote:
> On 2024-02-16, Chris Green via Python-list wrote:
>
> > I'm looking for a simple way to make NaN values output as something
> > like '-' or even just a space instead of the string 'nan'.
>
> It would probably help if yo
dn wrote:
> On 18/02/24 09:53, Grant Edwards via Python-list wrote:
> > On 2024-02-17, Cameron Simpson via Python-list
> > wrote:
> >> On 16Feb2024 22:12, Chris Green wrote:
> >>> I'm looking for a simple way to make NaN values output as something
>
Amps
Starter Battery - nan voltsnan Amps
What I would like is for those 'nan' strings to be just a '-' or
something similar.
Obviously I can write conditional code to check for float('nan')
values but is there a neater way with any sort of formattin
red in a
file to provide what I need. The Python json package is very simple
to use and with an 'indent=' setting the resulting json is reasonably
human readable which is all I need.
Thus programs simply read the values from the json file into a
dictionary of dictionaries and the 'updater of values' program can
write them back after changes.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Jon Ribbens wrote:
> On 2023-12-11, Chris Green wrote:
> > Chris Green wrote:
> >> Is there a way to abbreviate the following code somehow?
> >>
> >> lv = {'dev':'bbb', 'input':'1', 'name':'Leisure v
Chris Green wrote:
> Is there a way to abbreviate the following code somehow?
>
> lv = {'dev':'bbb', 'input':'1', 'name':'Leisure volts'}
> sv = {'dev':'bbb', 'input':'0',
;:0, 'name':'BowProp Volts'}
It's effectively a 'table' with columns named 'dev', 'input' and
'name' and I want to access the values of the table using the variable
name.
I could, obviously, store the data in a database (sqlite), I have some
similar data in a database already but the above sort of format in
Python source is more human readable and accessible. I'm just looking
for a less laborious way of entering it really.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Thank you everyone for all the suggestions, I now have several
possibilities to follow up. :-)
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Thomas Passin wrote:
> On 12/5/2023 11:50 AM, MRAB via Python-list wrote:
> > On 2023-12-05 14:37, Chris Green via Python-list wrote:
> >> Is there a neat, pythonic way to store values which are 'sometimes'
> >> changed?
> >>
> >> My part
Paul Rubin wrote:
> Chris Green writes:
> > I could simply write the values to a file (or a database) and I
> > suspect that this may be the best answer but it does make retrieving
> > the values different from getting all other (nearly) constant values.
>
> I
does make retrieving
the values different from getting all other (nearly) constant values.
Are there any Python modules aimed specifically at this sort of
requirement?
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Stefan Ram wrote:
> Chris Green writes:
> >I have to say this seems very non-pythonesque to me, the 'obvious'
> >default simply doesn't work right, and I really can't think of a case
> >where the missing comma would make any sense at all.
>
> |6.
Chris Green wrote:
> This is driving me crazy, I'm running this code:-
OK, I've found what's wrong:-
> cr.execute(sql, ('%' + "2023-11" + '%'))
should be:-
cr.execute(sql, ('%' + x + '%',) )
I have to
imo$
It's treating the "2023-11" plus % at each end as separate variables to
the binding, this is crazy! I've done similar elsewhere and it works
OK, what on earth am I doing wrong here? It has to be something very
silly but I can't see it at the moment.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
t you're doing
>
> ... screen fades to black, title card "3 years later", fade in to ...
>
> * publish your package
>
Surely it's not that bad, the vast bulk of Debian, Ubuntu and other
distributions are installed via systems that sort out dependencies once
given a particular package's requirements. Python is surely not
unique in its dependency requirements.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Jon Ribbens wrote:
> On 2023-11-02, Chris Green wrote:
> > Jon Ribbens wrote:
> >> On 2023-11-02, Chris Green wrote:
> >> > I have a couple of systems which used to have python2 as well as
> >> > python3 but as Ubuntu and Debian verions have moved
Jon Ribbens wrote:
> On 2023-11-02, Chris Green wrote:
> > I have a couple of systems which used to have python2 as well as
> > python3 but as Ubuntu and Debian verions have moved on they have
> > finally eliminated all dependencies on python2.
> >
> > So they n
Jon Ribbens wrote:
> On 2023-11-02, Dieter Maurer wrote:
> > Chris Green wrote at 2023-11-2 10:58 +:
> >> ...
> >>So, going on from this, how do I do the equivalent of "apt update; apt
> >>upgrade" for my globally installed pip packages?
> >
r/bin/pip3 but they're
identical so presuably I can now simply use pip and it will be a
python3 pip.
So, going on from this, how do I do the equivalent of "apt update; apt
upgrade" for my globally installed pip packages?
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Dan Purgert wrote:
> On 2023-10-28, Chris Green wrote:
> > I am using the python3 smbus module, but it's hard work because of the
> > lack of documentation. Web searches confirm that the documentation is
> > somewhat thin!
> >
>
> The SMBus spec is availa
km wrote:
> Il Sat, 28 Oct 2023 17:08:00 +0100, Chris Green ha scritto:
>
> > I am using the python3 smbus module, but it's hard work because of the
> > lack of documentation. Web searches confirm that the documentation is
> > somewhat thin!
> >
> > I
pened R/W, users of this
module usually must have root permissions.
FILE
/usr/lib/python3/dist-packages/smbus.cpython-39-arm-linux-gnueabihf.so
Even a list of available methods would be handy! :-)
Presumably python3's smbus is just a wrapper so if I could find the underlying
Chris Angelico wrote:
> On Fri, 13 Oct 2023 at 01:48, Chris Green via Python-list
> wrote:
> >
> > In the following code is the event polled by the Python process
> > running the code or is there something cleverer going on such that
> > Python sees an interrupt wh
GPIO25 as input (button)
def my_callback(channel):
if GPIO.input(Pin):
print "Rising edge detected on 25"
else: # if port 25 != 1
print "Falling edge detected on 25"
GPIO.add_event_detect(Pin, GPIO.BOTH, my_
dard'
way of finding out parameter information?
It may well be that I'm simply banging up against the limit of what
documentation is available, I have managed to get code working OK.
It's just that I'd be happier if I really know what I was doing! :-)
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Alan Gauld wrote:
> On 31/08/2023 22:15, Chris Green via Python-list wrote:
>
> > class Gpiopin:
> >
> > def __init__(self, pin):
> > #
> > #
> > # scan through the GPIO chips to find the line/pin we wa
recent call last):
File "", line 1, in
File "/home/chris/.cfg/hosts/bbb/bin/ngp.py", line 24, in __init__
return
ValueError: Can't find pin 'P9_23'
>>>
Does a return in __init__() not do what I think it does?
How else could/should I do this?
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Chris Green wrote:
[snip code and question]
Sorry folks, it was a caching problem, I wasn't running the code I
thought I was running! When I made sure I had cleared everything out
and tried again it all worked as I expected.
--
Chris Green
·
--
https://mail.python.org/mailman/lis
Several helpful replies, thank you all.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
name.
person.Person('Fred')
...
...
If Fred doesn't exist in the database what sort of exception should
there be? Is it maybe a ValueError?
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Mike Dewhirst wrote:
> [-- multipart/mixed, encoding 7bit, 22 lines --]
>
> [-- text/plain, encoding base64, charset: UTF-8, 16 lines --]
>
> On 21/05/2023 5:53 am, Chris Green wrote:
> > I'm converting a bash script to python as it has become rather clumsy
> &g
interpreted as a date, in particular it accepts things like "tomorrow",
"yesterday" and "next thursday".
Is there anything similar in Python or would I be better off simply
using os.system() to run date from the python program?
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
round
>
> there must be this list is mirrored on one, and AFAICS some pythoners use
> that
> way to post (over the list)
Yes, me for one, a good newsreader is really a wonderful way to manage
technical 'lists' like this one. Usenet news is still very much alive
though a minority interest now I suspect.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
nt to do is throw the non-ASCII characters away as the
string I'm trying to match in the subject is guaranteed to be ASCII.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Keith Thompson wrote:
> Chris Green writes:
> > Chris Green wrote:
> >> I'm having a real hard time trying to do anything to a string (?)
> >> returned by mailbox.MaildirMessage.get().
> >>
> > What a twit I am :-)
> >
> >
Chris Green wrote:
> A bit more information, msg.get("subject", "unknown") does return a
> string, as follows:-
>
> Subject:
> =?utf-8?Q?aka_Marne_=C3=A0_la_Sa=C3=B4ne_(Waterways_Continental_Europe)?=
>
> So it's the 'searchTxt in msg.ge
Chris Green wrote:
> I'm having a real hard time trying to do anything to a string (?)
> returned by mailbox.MaildirMessage.get().
>
What a twit I am :-)
Strings are immutable, I have to do:-
newstring = oldstring.replace("_", " ")
Job done!
--
Chris G
#x27;s
failing. I.e. for some reason 'in' isn't working when the searched
string has utf-8 characters.
Surely there's a way to handle this.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
msg.get() that isn't managing to handle the accented string correctly?
Yes, I know that accented characters probably aren't allowed in
Subject: but I'm not going to get that changed! :-)
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Kushal Kumaran wrote:
> On Fri, Apr 28 2023 at 04:55:41 PM, Chris Green wrote:
> > I'm sure I'm missing something obvious here but I can't see an elegant
> > way to do this. I want to create a directory, but if it exists it's
> > not an error and the
Chris Angelico wrote:
> On Sat, 29 Apr 2023 at 14:27, Kushal Kumaran wrote:
> >
> > On Fri, Apr 28 2023 at 04:55:41 PM, Chris Green wrote:
> > > I'm sure I'm missing something obvious here but I can't see an elegant
> > > way to do this. I w
k? It feels rather clumsy.
I suppose I could test if the directory exists before the os.mkdir()
but again that feels a bit clumsy somehow.
I suppose also I could use os.mkdirs() with exist_ok=True but again
that feels vaguely wrong somehow.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
jak wrote:
> Chris Green ha scritto:
> > jak wrote:
> >> rbowman ha scritto:
> >>> On Sun, 9 Apr 2023 09:40:51 +0100, Chris Green wrote:
> >>>
> >>>> I'm looking for a Python (3) library to access (read only at present)
> >>&
rbowman wrote:
> On Sun, 9 Apr 2023 09:40:51 +0100, Chris Green wrote:
>
> > I'm looking for a Python (3) library to access (read only at present)
> > the metadata in MP4 video files, in particular I want to get at dates
> > and times.
> >
> > What
jak wrote:
> rbowman ha scritto:
> > On Sun, 9 Apr 2023 09:40:51 +0100, Chris Green wrote:
> >
> >> I'm looking for a Python (3) library to access (read only at present)
> >> the metadata in MP4 video files, in particular I want to get at dates
> >&
I'm looking for a Python (3) library to access (read only at present)
the metadata in MP4 video files, in particular I want to get at dates
and times.
What's available to do this? Ideally something available in the
Ubuntu repositories but I can install with PIP if necessary.
--
C
Roel Schroeven wrote:
> Chris Green schreef op 4/02/2023 om 16:17:
> > I am using Image from PIL and I'm getting a deprecation warning as
> > follows:-
> >
> > /home/chris/bin/picShrink.py:80: DeprecationWarning: ANTIALIAS is
> > deprecated
> and will
ost recent call last):
File "/home/chris/bin/picShrink.py", line 80, in
im.thumbnail(size, Resampling.LANCZOS)
NameError: name 'Resampling' is not defined
So, presumably there's more I need to change. Where can I find out what
I need to do?
--
Chris Gre
Chris Green wrote:
> Jon Ribbens wrote:
> > On 2023-01-28, Peter J. Holzer wrote:
> > > On 2023-01-27 21:04:58 +, Ben Bacarisse wrote:
> > >> It looks like you posted this question via Usenet. comp.lang.python is
> > >> essentially dead as a Usenet
post via the newsgroup,
> and I can see my postings reach the list because they appear
> in the list archive on the web.
>
As far as I am aware the mirroring of the Python mailing list on
comp.lan.python works perfectly. I love gmane! :-)
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Cameron Simpson wrote:
> On 10Jan2023 08:45, Chris Green wrote:
> >dn wrote:
> >> See also the wisdom of enabling comp.lang.python and python-list as
> >> 'mirrors', enabling those who prefer one mechanism/client to another,
> >> yet maintain
it's decided to
move to a forum format make that accessible by E-Mail.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
eturns" is often found in programming guidelines.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Barry Scott wrote:
>
>
> > On 11 Dec 2022, at 18:50, Chris Green wrote:
> >
> > My solution in the end was copied from one I found that was much
> > simpler and straightforward than most. I meant to post this earlier
> > but it got lost somewhere:-
Stefan Ram wrote:
> Chris Green writes:
> >import sys, termios, tty
>
> There might be some versions of Python and the Microsoft®
> Windows operating system where "termios" is not available.
>
Ah, I did originally say that this was a Unix/Linux only so
;n':
ch = getch().lower()
return ch
So getyn() reads a y or an n, ignores anything else and doesn't wait
for a return key. Keyboard input operation is restored to normal
after doing this. Using tty.setcbreak() rather than tty.setraw() means
that CTRL/C etc. still work if things g
Stefan Ram wrote:
> Chris Green writes:
> >Is the only way to read single characters from the keyboard to use
> >curses.cbreak() or curses.raw()? If so how do I then read characters,
>
> It seems that you want to detect keypresses and not read
> characters from a li
'Y' or 'N' answers to questions on
the command line.
Searching for ways to do this produces what seem to me rather clumsy
ways of doing it.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Barry Scott wrote:
>
>
> > On 7 Nov 2022, at 09:28, Chris Green wrote:
> >
> > Chris Green wrote:
> >>> 3: with your pseudo "python3" script in place, make all the scripts use
> >>> the "#!/usr/bin/env python3" shebang sug
m. The system is my hosting provider's cPanel platform which is
running a very old Linux and, as I've said has only python 2.
I can ask for python 3 on their system but I suspect that my voice is
a very tiny one and there are higher priority things to get done.
--
Chris Green
·
--
ht
Chris Green wrote:
> > 3: with your pseudo "python3" script in place, make all the scripts use
> > the "#!/usr/bin/env python3" shebang suggested above.
> >
> Yes, that sounds a good plan to me, thanks Cameron.
>
Doesn't '#!/usr/bin/en
Cameron Simpson wrote:
> On 06Nov2022 20:51, jak wrote:
> >Il 06/11/2022 11:03, Chris Green ha scritto:
> >>I have a number of python scripts that I run on a mix of systems. I
> >>have updated them all to run on python 3 but many will also run quite
> >>hap
rbowman wrote:
> On Sun, 6 Nov 2022 10:03:50 +0000, Chris Green wrote:
>
>
> > Is there a neat way of handling this? I could write a sort of wrapper
> > script to run via the shebang but that seems overkill to me.
>
> Can you symlink?
Not really, since the system
Peter J. Holzer wrote:
> [-- text/plain, encoding quoted-printable, charset: us-ascii, 28 lines --]
>
> On 2022-10-13 13:47:07 +0100, Chris Green wrote:
> > I have a short python3 program that collects E-Mails from a 'catchall'
> > mailbox, sends the few that might
e a few
years so I'm not sure if I;ll bother! :-)
The program is only run half-hourly by cron.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
break
It seems to be saying that the POP3 server has a problem, if so there's not
much I can do about it as it's my hosting provider's mail server. Is it
really saying the server has a problem?
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
A further little bit of information, I tried running getCatchall.py
from the command prompt and there was a long wait before it output the
same error message. I.e. it looks rather as if the server is not
responding to requests. (A 'long wait' is a minute or two)
--
Chris Green
·
Michael F. Stemper wrote:
> On 12/10/2022 07.20, Chris Green wrote:
> > jak wrote:
> >> Il 12/10/2022 09:40, jkn ha scritto:
> >>> On Wednesday, October 12, 2022 at 6:12:23 AM UTC+1, jak wrote:
>
> >>>> I'm afraid you will have to look fo
y comments/responses.
> >>> Paulo
> >>>
> >> I'm afraid you will have to look for the command in every path listed in
> >> the PATH environment variable.
> >
> > erm, or try 'which rm' ?
>
> You might but if you don
seful to have something that doesn't always give the
> right answer, even if it usually does? Is there any value whatsoever
> in a lie?
>
That's sort of in the same area as a stopped clock being right more
often than one that runs just a bit slow (or fast). :-)
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Barry Scott wrote:
>
>
> > On 22 Jan 2022, at 21:26, Chris Green wrote:
> >
> > I have a script that walks a quite deep tree of mail messages to find
> > and archive old messages. I'm trying to convert it from mbox to
> > maildir (as I now store my ma
Cameron Simpson wrote:
> On 22Jan2022 21:26, Chris Green wrote:
> >So I need to test whether a point I have reached in the hierarchy is a
> >maildir mailbox or not. Using mbox format it's easy because 'folders'
> >are directories and mailboxes are files.
27;, 'new' and 'tmp'.
Is there any 'ready made' way in python to tell whether a directory is
a maildir mailbox? If not I suppose I'll simply have to check if
there are 'cur', 'new' and 'tmp' directories within the directory
which may or may not be a maildir.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Python wrote:
> Chris Green wrote:
> >Subject: [SPAM] =?UTF-8?B?8J+TtyBKb2huIEJheHRlci1C?=
> > =?UTF-8?B?cm93biByZWNlbnRseSBw?=
> > =?UTF-8?B?b3N0ZWQgYSBuZXcgcGhv?=
> > =?UTF-8?B?dG8=?=
> >
> > It looks like some sort of mi
an't see an easy way to actually inspect the message
as it's disappeared off somewhere else. I guess I could add some code
to the script to send it to myself as well but if there's something
obvious in the above it would avoid having to do this.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Inada Naoki wrote:
> On Wed, Dec 8, 2021 at 2:52 AM Chris Green wrote:
> >
> >
> > At 03:40 last night it suddenly started throwing the following error every
> > time it ran:-
> >
> > Fatal Python error: initfsencoding: Unable to get the locale encodin
Julio Di Egidio wrote:
> On 08/12/2021 10:50, Chris Green wrote:
> > Julio Di Egidio wrote:
> >> On 07/12/2021 16:28, Chris Green wrote:
> >>> What could have caused this? I certainly wasn't around at 03:40! :-)
> >>> There aren't a
Julio Di Egidio wrote:
> On 07/12/2021 16:28, Chris Green wrote:
> > I have a very short Python program that runs on one of my Raspberry
> > Pis to collect temperatures from a 1-wire sensor and write them to a
> > database:-
> >
> > #!/usr/bin/python3
>
also
my 'NAS' with a big USB drive connected to it. The backups have been
running without problems for more than a year. Looking at the system
logs shows that a backup was started at 03:35 so I suppose that *could*
have provoked something but I fail to understand how.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Stefan Ram wrote:
> Chris Green writes:
> >I thought MaildirMessage inherited from email.message,
>
> It inherits from mailbox.Message which inherits from
> email.message.Message which has no "get_body" method.
>
So the documentation at:-
ht
Stefan Ram wrote:
> Chris Green writes:
> >I have some text files which are ISO8859-1 encoded and I want to output
> >them to screen using Python.
>
> Well, the first attempt would be:
>
> import pathlib
> name = r"C:\example.txt"
> encoding
This sounds as if it should be trivial but searching only seems to
produce ways ofd doing it in Python 2.
I have some text files which are ISO8859-1 encoded and I want to output
them to screen using Python.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
s inherited the
get() method so why not the get_body() method? I'm running Python 3.9.7
on xubuntu Linux 21.10.
Is there another way of doing this or do I have to sort through the message
parts and stuff? It sounded like get_body() would make things easier.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
as uncluttered as possible
though so maybe I'll keep the lib directory under ~/.config or
~/.local.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Roland Mueller wrote:
> Hello,
>
> pe 23. heinäk. 2021 klo 21.44 Chris Green (c...@isbd.net) kirjoitti:
>
> > This isn't a question about how to set PYTHONPATH so that Python code
> > can find imported modules, it's about what is a sensible layout for
> &
1 - 100 of 299 matches
Mail list logo