« first day (4308 days earlier)      last day (655 days later) » 

1:22 AM
also missing canonical-wise: clear canonicals for the questions that can be asked regarding making a) a timer; b) a one-shot time delay in tkinter. It's not clear to me what the set of distinct, non-duplicate questions in this space is
(very interesting in that vein: stackoverflow.com/questions/20891710)
 
 
10 hours later…
11:39 AM
Tkinter's native methods for handling time delays are root.after and root.after_idle. They're pretty simple wrappers on top of Tcl's after command. One might hope that the set of distinct questions in the space would be small, given the small size of the interface. On the other hand, that might be like saying that there are a small number of distinct algebra problems in existence, since they only use four operators.
 
 
6 hours later…
5:37 PM
My code works, but I don't like the table names. Seeking style advice: pastebin.com/6w0GFWDF
 
Proper names will depend on the context, I imagine. Would it be correct to think of the first table as a sort of product catalog ("these kinds of grommets exist") and the 2nd table as orders?
 
6:26 PM
Yeah.
I've toyed with the idea of putting everything in one table, and setting an is_exemplar flag to True for only the economy, standard and deluxe grommets from which all other grommets are copied
You can imagine them as real actual grommets contained securely in a temperature and humidity controlled chamber, a la the IPK
And just as the IPK was made obsolete by precise measurements of physical constants, so too will the prototype grommets. Just as soon as the theoretical grommetics department discovers the grommion particle.
 
How about grommet_models and grommet_orders then?
 
6:44 PM
I like models. I'm on the fence about orders because not all grommets are sold for money. Sometimes we give out complementary grommets at GrommetCon. Sometimes we make a grommet just to drop it off the roof and see how it splats.
I suppose I'm still ordering the grommet making machine to make me a grommet, so in that sense it is still an order...
 
7:04 PM
I have a newbie question: What is the python-3 equivalent of:
python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(0,1,"")'
?
 
Just add parentheses to the print statement.
 
@0x263A: So, that sorta-works, but it gets me a deprecation warning.
Even two.
<string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
<string>:1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
 
@Kevin Perhaps just grommets or maybe concrete_grommets then
 
@einpoklum I will ask the obvious question. Have you considered using setuptools and/or sysconfig and/or whatever is listed in PEP 632?
If you're thinking "I don't know what any of those are", me too
 
@Kevin ... you took the words out of my mouth.
If it were just one, option, I would just go read up on it I guess, but
it's three...
 
7:10 PM
Python's distribution technology has always felt a bit unfocused to me
 
What are you using (or trying to use) distutils for?
 
Python, you're a peach, a gem, the cat's pajamas, but dang what a time I have trying to get code A running on computer B
 
Counter point: Is there a language where packaging isn't a pain?
 
KevinScript has no dependency headaches because it's impossible to import anything
 
Modern problems require modern solutions I guess
 
7:13 PM
@Aran-Fey I like Java packaging
 
Not too encouraging that get_python_lib is listed under the heading "The following functions are deprecated together with this module and they have no direct replacement."
 
... Java packaging? Oh my
 
That warning must be relatively new I tested it with python 3.8 before sending that message just to be sure lol. Intuitively (and by looking at sysconfig) I'd expect this python -c 'import sysconfig; print(sysconfig.get_python_version())' to be what you want but that of course, does something different.
 
distutils.sysconfig.get_python_lib([plat_specific[, standard_lib[, prefix]]])
    Return the directory for either the general or platform-dependent library installation. If plat_specific is true, the platform-dependent include directory is returned; if false or omitted, the platform-independent directory is returned. If prefix is given, it is used as either the prefix instead of PREFIX, or as the exec-prefix instead of EXEC_PREFIX if plat_specific is true. If standard_lib is true, the directory for the standard library is returned rather than the directory for the installation of third-part
 
@roganjosh Do you have bad Java experiences?
 
7:15 PM
What clown called this function with two ints instead of two bools?
Is that code from the python 1 era?
 
A bool is just an int that doesn't know its own strength
 
Anyway, to rephrase my question from earlier: Why are you even calling this function?
 
Everything would be so simple if each programming language packed everything right and everything ran beautifully, after all, everything turns to 0s and 1s at the end
 
@Marco It's fine if I stick to Maven but I've got things so tangled in the past
 
Ok :P
I never worked with Maven, but I think I've heard of it.
 
7:21 PM
Java packaging is fascinating because on one hand you have Maven, which is configured through XML, and on the other hand you have Gradle, which should easily be more user-friendly than Maven just because it doesn't use XML, but somehow isn't
 
I can't say anything about Maven nor Gradle, I've never used them. But there is Java packaging outside of the Maven and Gradle worlds, right? I for example have never used them.
 
@einpoklum I wonder if python -c "import sysconfig; print(sysconfig.get_config_var('platlibdir'))" would be useful... To be honest, I don't know what your code does, or what my code does. I just know they produce similar output.
 
@Aran-Fey Rust goes further and provides workspaces which are pretty neat
 
@Marco No idea, I'm not a Java expert either. I just know that I (and my friends) wasted hours trying to figure out Maven and Gradle back in university
 
Ok, I got it
I'm not a Java (or Python) expert either.
 
7:34 PM
@roganjosh Sounds like an advanced feature. I got a bit confused reading about packages vs crates, but it certainly looks less messy than python's packaging
 
Yeah, I still find those definite distinctions confusing (though I'm far from an expert and I had to park it for the last nearly 2 months). Still, with cargo things were pretty smooth for me when I was completely out of my depth
 
@Kevin: Well, the original line, with python2.7, prints lib/python2.7.
But your suggestion only prints lib. Not sure if that's what's supposed to happen though.
 
Ah. On my machine, the original line prints "Lib".
 
On my machine (ubuntu/Python 3.8.10) it printed "lib/python3.8"
 
yeah, guess it print different result based on your OS and env.
 
7:46 PM
Well, I guess the line I got originally is flakey anyway. NM, thanks everyone.
 
that's like what 60% of the sys module does (not too sure on that percentage, but let's just say a lot of it does). It's all dependent on OS and local variable/env, which aren't always the same
 
 
2 hours later…
10:03 PM
stackoverflow.com/questions/39968669 Thjis seems like a good version of the question, but is there anything better, or much more popular that has a stronger claim to canonical status?
 
 
1 hour later…
11:27 PM
stackoverflow.com/questions/685758/… is much older but less popular for some reason
 

« first day (4308 days earlier)      last day (655 days later) »