Alan Gauld via Python-list writes:
> On 18/05/2024 19:12, Piergiorgio Sartor via Python-list wrote:
>
> >> So venvs make managing all that pretty convenient. Dunno why everybody's
> >> so down on venvs...
>
> Not so much down on them, they are just one extra step that's
> mostly not needed(in my
I wrote:
> > Also be warned that some modules (particularly if they're based on
> > libraries not written in Python) might not garbage collect, so you may need
> > to use other methods of cleaning up after those objects.
Chris Angelico writes:
> Got any examples of that?
The big one for me was
> Frank Millman wrote at 2024-1-15 15:51 +0200:
> >I have read that one should not have to worry about garbage collection
> >in modern versions of Python - it 'just works'.
Dieter Maurer via Python-list writes:
> There are still some isolated cases when not all objects
> in an unreachable cycle a
computermaster360 writes:
> I want to make a little survey here.
>
> Do you find the for-else construct useful?
No.
> Have you used it in practice?
Once or twice, but ended up removing it, see below.
> Do you even know how it works, or that there is such a thing in Python?
I always have to l
2qdxy4rzwzuui...@potatochowder.com writes:
> I think someone said it way upthread: don't check, just do whatever you
> came to do, and it will work or it will fail (presumably, your program
> can tell the difference, regardless of a past snapshot of being able to
> retrieve data from an arbitrary
Abdur-Rahmaan Janhangeer writes:
> results = []
> with console.status("Checking internet ...", spinner="dots"):
> for domain in domains:
> try:
> requests.get(domain)
> results.append(1)
> except Exception as e:
> results.append(0)
> if not any(results):
> print('No internet connection')
> sys.exit
jkk writes:
> Selenium 3.141+
> python 3.8+
> ubuntu 20.04 or windows 10
>
> I'm trying to upgrade code from py3.6+ to py3.8+ and I'm getting several
> DepreciationWarnings.
>
> Can someone point me to where I can find the documentation that explains how
> to to remedy these warnings. What are
Mike Easter writes:
> the CP readme says:
>
> To run the XAMPP Control Panel, you will need:
>
> Linux (may work on other OSs)
> GTK 2.x
> PyGTK (also known as python-gtk) 2.x
> XAMPP
>
> I installed py2 to my Linux Mint Cinnamon 20.2 (off Ub LTS 20.04) but that
> didn't solv
Grant Edwards writes:
> Is pygobject the replacement for pygtk?
The easiest way to use it, if you want a quick port with the
fewest code changes, is:
from gi import pygtkcompat
pygtkcompat.enable()
pygtkcompat.enable_gtk(version='3.0')
I don't know if pygtkcompat is going to be supported forever
Steve writes:
> Glutton for punishment, I am looking into designing another .py program. I
> would like to pull two columns of information from Excel but the more I look
I've found the xlrd module easy to use for extracting data from
Excel files. But I've only used it on .xsl and .xsls. I've neve
> > On 2020-08-11 02:20, Ganesh Pal wrote:
> > > How do I check if it the value was (a) i.e string started and ended
> > > with a quote
Of course the original question was simple and there have been lots
of solutions given.
But I find this comes up periodically, and I'm always leery of using
som
I wrote:
> > > Trying to maintain that recursive list of unclosed lists in your
> > > brain is fun. It stretches the brain in interesting ways.
> > > [ ... ] But I never found Lisp code very maintainable, [ ... ]
2qdxy4rzwzuui...@potatochowder.com writes:
> "[R]ecursive list of unclosed lists"? C
Christian Seberino writes:
> Python is my favorite language and the easiest to use in my opinion.
>
> Lisp has a far simpler grammar and syntax. A beginner I think could
> learn Lisp much faster than Python.
>
> Therefore, it seems like Lisp *should* be easier to work with and more
> readable.
Chris Green writes:
> I have recently upgraded my desktop system from ubuntu 19.10 to ubuntu
> 20.04. [ ... ]
> The error I am getting is:-
[ ... ]
> ImportError: No module named gtk
>
> So what do I need to install on my Ubuntu 20.04 system to provide the
> gtk module?
Ubuntu doesn't prov
Michael Torrie writes:
> On 12/12/19 6:33 PM, Python wrote:
> > What happened exactly? Did you download the official installer from
> > python.org, then click on next, next, next, checking the box (if it's
> > still there about updating PATH)? There is nothing more to do.
>
> I've seen github bug
I'm a novice packager, trying to test a package I built and
uploaded to TestPyPI. It has dependencies and I want to make
sure my setup.py works before uploading to the real PyPI.
https://packaging.python.org/guides/using-testpypi/
says that if a package has dependencies, to use this command to get
Chris Angelico writes:
> On Thu, Nov 21, 2019 at 4:42 AM Nick Sarbicki
> wrote:
> > RE Conda and distros - I'd forget about them, in my experience you may as
> > well learn to use pip and install what you need that way, in the long term
>
> Agreed.
More agreement. Someone at the local makerspa
> pyotr filipivich
> >"A simple program" to divide the amount of "today's" daylight into 12
> >even '"hours", so that Dawn begins the First hour, the third hour is
> >mid-morning, noon is the middle of the day, the ninth hour mid after
> >noon, and the twelfth hour ends at sunset. Is simple, no?
On Sat, Jun 29, 2019 at 6:31 AM Tobiah wrote:
> Also, what do people do when searching for a record.
> Is there some way to get 'Ronngren' to match the other
> possible foreign spellings?
SequenceMatcher in difflib can do fuzzy string comparisons and
should work for cases like that. There are oth
Chris Angelico writes:
> Actually, only the Python interpreter has to be able to do those
> steps. That's why I put the comment *on the same line* as the import
> statement (not immediately above it, for instance). It comes out like
> this:
>
> (env) rosuav@sikorsky:~/shed$ python3 BL2_find_items.
Chris Angelico writes:
> I write this as:
>
> import whois # ImportError? pip install python-whois
[ ... ]
> it means that normal exception handling is still
> happening (which might be important if I import this into something
> else), plus it's printing the message to stderr rather than stdout
[
DL Neil writes:
> On 18/04/19 8:44 AM, Grant Edwards wrote:
> > 2. When the program can still do something useful (if perhaps
> > feature-limited) without the imported module by substituting
> > something else in its place.
>
> Any (publishable) examples?
One of the targets my RSS fet
DL Neil writes:
> How do you keep, use, and maintain those handy snippets, functions,
> classes... - units of code, which you employ over-and-over again?
Fun topic!
I have two methods:
First, in my scripts directory I have a file called
"python-cheatsheet.py" where I save small tips that I
think
> On 20/03/19 7:18 AM, Leonardo Giordani wrote:
> > Ha ha ha, yes I get it! =) I'm sorry, that depends entirely on the LeanPub
> > processing chain (I believe, I'll have a look just to be sure). I hope the
> > book will be useful even with this little issue. Thanks for reading it!
DL Neil writes
Grant Edwards writes:
> On 2019-01-22, Schachner, Joseph wrote:
>
> > For anyone who has moved a substantial bunch of Python 2 to Python
> > 3, can you please reply with your experience?
>
> If you used bytes (or raw binary strings) at all (e.g. for doing
> things like network or serial protocol
> On Mon, 14 Jan 2019 11:57:33 +, Alex Ternaute wrote:
>
> > Hi there,
> >
> > I want to know the number of columns of the terminal where python2 writes
> > it's outputs.
A couple days late to the party, a discussion of several ways I tried:
http://shallowsky.com/blog/hardware/serial-24-lin
Grant Edwards writes:
> This is what "archive" file formats are for. Just use tar, zip, ar,
> cpio, or some other file format designed to store multiple "files" of
> arbitrary data -- there are plenty of "standard" formats to choose
> from and plenty of libraries to deal with them.
Then the data
Tim Daneliuk writes:
> However, the highlighted text must be copied explicitly:
>
> Highlight
> Ctl-C
[ ... ]
> X actually has several clipboard buffers and it can be tricky to get this
> going. I don't recall,
> but either clipboard or pyperclip have a way to get to them all IIRC ...
To get th
Skip Montanaro writes:
> > I want to know if AAPL is more than value 300 and if it does I want it to
> > send to me mail with gmail :) . thanks for the help..
>
> Try searching pypi.org for "finance", then scroll through the many
> returned packages. A few show how to get stock data from Yahoo! o
> Thomas Jollans :
> > Wonderful. Now why don't we all forget about hexdump and use xxd? ;-)
Marko Rauhamaa writes:
> Fedora:
>
>$ xxd
>bash: xxd: command not found
>$ hd
>bash: hd: command not found
>$ od -Ax -tx1z -v <<00 68 65 6c 6c 6f 0a
Chris Green writes:
> I wrote a Python GUI program a little while ago that uses Python GTK
> with:-
>
> import gtk
>
> I *think* this is probably GTK 2, or something. I can't find the
> proper documentation for this. Is it old/obsolescent?
Yes, it's obsolete, and AFAIK it only works with P
> > On 23/07/18 03:43, Akkana Peck wrote:
> >> You'd think there would be something newer (ideally
> >> based on Blink) that worked with GTK3/GIO, but I never found anything.
Thomas Jollans writes:
> > This gi-based example looks like Gtk3, right?
>
>
> On 22/07/18 21:43, Abdur-Rahmaan Janhangeer wrote:
> > i need an html renderer (one of the most badly missed features of py, PEP
> > anyone?)
I think both GTK and Qt have basic HTML rendering widgets, for
simple tasks, but if you want something that behaves more like
a browser (javascript, link
David D wrote:
> Is there a SIMPLE method that I can have a TIMER count down at a user input
> prompt - if the user doesn't enter information within a 15 second period, it
> times out.
Does this do what you want?
from threading import Timer
import sys
import os
def run_later():
print("Timed
34 matches
Mail list logo