« first day (3543 days earlier)      last day (1388 days later) » 

12:18 AM
try:
pattern_2 = '\w*?\s?(\@|\s*?(\[\w+\])\s*?)\w+?(\.|\s*?(\[\w+\])\s*?)(\w+)'

matched = re.finditer(r"{}".format(pattern_2), text)
What's the problem? It returns:

cannot use a string pattern on a bytes-like object
 
What do you think that error means?
 
I have no idea. It works perfectly in an online python interpreter!
python3*
 
Also r"{}".format(pattern_2) is very wrong
@X4748-IR print(type(text))
 
Thank you. I got it. It's an object.
It was working a while ago... lol
It was requests object. I had to convert it to string.
 
1:07 AM
@cs95 Programmer's Notepad? Light, nimble, and fast, because it uses the native Win32 API and is written in C++. Uses the Scintilla editor, which is fantastic. Does everything you want in a text editor, without getting in your way. Also used by Geany on *nix and some of my own custom tools (like an assembly listing viewer), so it's comfortable and familiar.
I like the interface slightly better than Notepad++, which is also based on the Scintilla editor.
@Daniil Sounds like an interesting Code Golf question, if it wasn't already posted. Even if you've come up with a solution that satisfies you, I'd like to see you post it there. If it's your first time coming up with a challenge, maybe use their Sandbox first to get some community feedback.
 
user12867493
@CodyGray I’ve posted there before so I’ll make a draft and see how it looks. Do I need attribution from where the challenge can from? It came from a friend but can find out the specific place
 
@Daniil Uhh...yeah, wouldn't hurt to add attribution
 
user12867493
The solution I got worked but did not run in O(n) time complexity like I wanted to and could have been made to be more efficient
 
You can golf based on efficiency or on size.
I'm personally a fan of efficiency, but that isn't what most of the site focuses on.
 
user12867493
I don’t participate there since Python is quite bad for golfing compared to other languages
 
1:14 AM
Is it? I see a lot of Python 3 answers posted on Code Golf questions.
 
user12867493
And other langages that are good for golfing aren’t too useful elsewhere
 
Besides, you aren't golfing against all languages. You're only golfing against the language of your choice. It's silly to try and compete against those made-for-golfing languages, which are otherwise completely useless.
 
user12867493
The Python 3 answers are usually the longer ones (in bytes) as I recall but I haven’t browsed for a while so I’ll take another look
 
user12867493
Ah, never thought of that
 
It's sometimes interesting to compare how two "real" languages fare, like Java and C#, or Python and C, or whatever, but I honestly pretty much ignore the made-for-golfing languages.
Yeah, it's actually something the CG folks are trying to make more obvious, that the competition is not between languages, but between submissions in the same language.
 
user12867493
1:16 AM
Yeah, agreed
 
I only ever golf in assembly, mostly because it's the only motivation I have to write in assembly any more.
It also does surprisingly well, at least in the right challenges, holding its own against the made-for-golfing languages, which I think is kind of fun and subversive.
Golfing in C bothers me because everyone exploits undefined behavior to compete, which just makes me feel dirty, and sometimes even seems like outright cheating.
 
user12867493
lol I like the newly added tag to this room :)
 
user12867493
@CodyGray I’m not a massive fan of SE sites which aren’t meant to help future readers. I do participate on Puzzling ocassionaly. I like the old and boring theory
 
Oh, agreed.
That's part of why I wish Code Golf focused more on efficiency, because there are far more lessons to be learned there that would be beneficial to future readers.
It would be a slightly different kind of thing, of course. You wouldn't go there looking for answers to a specific question. You'd go there to learn tips, tricks, insights, etc. But it would still be highly useful to future viewers.
 
user12867493
Yeah. I’m currently practicing interview questions, I can do most of them I just need to work on speed and mainly efficiency
 
1:29 AM
Interview questions are terrible
 
user12867493
You just have to do them and learn them I guess
 
2:08 AM
@PaulMcG I believe you've a typo in the release notes: 'array items are no long returned' maybe should be 'array items are no longer returned'? Also, is there a reason lowerCamelCase tends to get used?
 
yesBecauseLowerCamelCaseIsGreat
butOnlyForLocalIdentifiers ForGlobalsUseUpperCamelCase
 
2:54 AM
If anyone may recommend, how to resolve this question and restore normal access in order to be able to post questions? All the necessary measures are considered and understood from my end. Thanks in advance!
0
Q: Read and Write Data into Python Files

Eugene_SPlease advise how I'm getting the following error: File "/Users/<username>/PycharmProjects/OOP/csv_write.py", line 8 print(f'Column names are {", ".join(row)}') ^ SyntaxError: invalid syntax Code: import csv with open('employee_birthday.txt') as csv_...

 
3:20 AM
@toonarmycaptain When I wrote pyparsing I had worked in PL/I and C/C++ for about 8 years (where snake case was the preferred style), and then did Smalltalk and Java for about 8 more years (where camel case was the style). I was sure that camel case was the future trend, and the these snake_case Pythoners would eventually come around. So pyparsing uses camelCase pretty much throughout.
I got a very nice submission suggesting a parallel conversion to PEP8 snake_case, and I'm deciding whether to take that on for this release too, or defer until 3.1.
 
4:06 AM
How can I set a default value for getText method in beautifulsoup? Sometimes find method returns None instead of an object. I want to do everything in one single line.

object.find('author').getText()

As expected this line sometiems returns an error due to find's None returned value.
I know I can use try and except, but it makes my code too long.
 
@x-47-48-ir as for example the following and if I understood the question correctly?
```
res = requests.get("http://quotes.toscrape.com/")
soup = bs4.BeautifulSoup(res.text,'lxml')
soup.select(".<class_name>")
```
 
@X4748-IR var = obj.find('author').getText() if obj.find('author') is not None else 'default value' I am sure there are better alternatives
 
@python_learner Doesn't find method double process the same job? I thought maybe it's a bad thing.
 
if you using 3.8 you can use assignment expression
that is why I was hoping there are better ways, what is the need for a single line?
if you can assign the value and then use a normal if else you dont have to calculate it twice
 
I think you can also use the following or use list comprehension:
authors = set()
for name in soup.select(".author"):
authors.add(name.text)
authors
 
4:17 AM
It looks better! lol there are so many variables in my code. I want them to have some default values. If I use something like try and except it becomes so long! In that case, I have to repeat all the variables.
@python_learner Hmmm. I think this one is better.
 
I have not used that library so I cant offer much on this
 
@Eugene_S Hmmm...
 
@X 47 48 - IR, I've used that to get the names of all the authors on the particular page but looks like you only need to set its value to default..
presumably this solution may be helpful - stackoverflow.com/questions/46381619/…
 
4:42 AM
Hello, Is someone here knowledgeable in plotly?
 
 
2 hours later…
6:29 AM
Anyone got any suggestions on this snippet I wrote to represent bytes:
import unicodedata
def get_chr_ord_unicodename(c):
    """Get Unicode codepoint and name for character(s)"""
    if len(c) > 1:
        return tuple(get_chr_ord_unicodename(cc) for cc in c)
    return (c, ord(c), unicodedata.name(c))
>>> get_chr_ord_unicodename('ಠ︵ಠ')
(('ಠ', 3232, 'KANNADA LETTER TTHA'), ('︵', 65077, 'PRESENTATION FORM FOR VERTICAL LEFT PARENTHESIS'), ('ಠ', 3232, 'KANNADA LETTER TTHA'))
 
6:46 AM
(The intent is to be able to see what's going on inside emoticons and short tokens)
(Yes I'm aware of spacymoji)
 
That returning a tuple or a tuple of tuples is awkward...
if you wanted to do something with the results - what criteria could even be used to determine how to interpret it?
 
@JonClements I don't think so, the intent is a short clear internal representation for debugging; now you can see which character is which. This is not a __repr__() method or anything. What would you use?
@JonClements I do "do something with the results": I visually scan them to see what codepoints were inside the expression. It's a short utility representation for debugging. I'm not writing a class.
For example, here's that well-known 'shrug' emoticon deconstructed:
>>> get_chr_ord_unicodename('¯\(ツ)/¯')
(('¯', 175, 'MACRON'), ('\\', 92, 'REVERSE SOLIDUS'), ('(', 40, 'LEFT PARENTHESIS'), ('ツ', 12484, 'KATAKANA LETTER TU'), (')', 41, 'RIGHT PARENTHESIS'), ('/', 47, 'SOLIDUS'), ('¯', 175, 'MACRON'))
But tell me what would you use?
 
7:02 AM
Okay, but what about just: get_chr_ord_unicodename('ಠ︵ಠ') ?
if you're just eyeballing it though - doesn't really matter I guess...
Is recursion needed there?
 
@JonClements Yes because you can only apply ord to a single character; recursion beats looping, I might in future want to add overrideable separator or newline characters, or a more general formatting string for the result (got any suggestions?). For example some of the names returned by unicodedata.name are very verbose, we'd probably want to truncate them at n chars; also for alignment when printing this output.
 
7:24 AM
@smci umm... still early on a Sunday for me and not had my requisite amount of coffee yet, but is there any case that your function being just: return tuple((ch, ord(ch), unicodedata.name(ch)) for ch in c) would not work?
 
@JonClements I originally just wanted it to work on a single character arg, I also wanted to call it from some other formatting code as a helper fn, i.e double-jobbing. Yeah I suppose yours is good when input is 1+ bytes. I might in future want to be able to pass this a list or dict or hierarchical list/dict of bytes (e.g. 'Emojis': {'Happy': [...], 'Angry': [...], 'Ambiguous_': [...]}, so might want to support arbitrarily higher levels of recursion. Any general remarks on how to deal with that?
 
Not at the moment :)
 
@smci I recommend always returning a tuple of tuples. Changing the output kind based on the input type makes working with the result trickier. So just return tuple((cc, ord(cc), unicodedata.name(cc) for cc in c)
 
I mean what's an elegant paradigm to support arbitrarily higher levels of recursion, say the input could be list or dict or hierarchical list-of-list/dict-of-dict. (of bytes).
@MisterMiyagi I'm asking about handling arbitrary higher levels of recursion, e.g. 'Emojis': {'Happy': [...], 'Angry': [...], 'Ambiguous_': ['ಠ︵ಠ', '(._.)']},
 
@smci Then especially I recommend to treat strings just as strings, not as n-strings and 1-strings.
Since strings themselves aren' really recursive, I'd put the recursive part in another function that works on containers and just calls get_chr_ord_unicodename in the end.
 
7:44 AM
@MisterMiyagi Hmm, but then the caller needs to know the interface. I'd keep get_chr_ord_unicodename as the main function name, have it be recursive, and use some peeking so it could see if the current invocation had been called with bytes, or some higher type (we could still have the output be arbitrary nested tuples). Is there any general code that implements that sort of thing?
 
8:06 AM
Hi, I am not sure if asking this question is allowed here, but since the rules do not seem to forbid it.. I was wondering why my question stackoverflow.com/questions/62612619/… was closed? The comments answer the question (and should perhaps be answers instead), but how could I make the question more focused (the reason for closing it)?
 
@PratyushDas question looks fine to me... not quite sure why it was closed...
 
@JonClements Is there anything I could do to have it reopened?
 
it already is...
 
Oh! Thanks so much! :)
 
8:22 AM
@PratyushDas My answer would be same as hpaulj's comment: simply don't use argparse it you don't want to use its syntax, it's very limiting. Write your own parsing logic, it ain't that hard.
 
8:43 AM
@smci Afraid not, recursion into containers is not generally well-defined. You have to decide for yourself which types to recurse into and how.
@PratyushDas I did not close-vote but: The question is very vague. It does not show what has been tried so far, making it difficult to assess what specific problem you need help with and seem like a "code plz" question. Since the desired behaviour conflicts with argparse, it is unclear if, why and how argparse must be used, making it unclear what is a desirable answer.
 
@MisterMiyagi umm... seems fine to me... reads to me as: "I'm using argparse like this to try and do this" - the answer seems to be - you can't do so using argparse...
 
user11702787
about this line of code
 
user11702787
listoflist = [[None, None, None], [None, None, None]]
row_index = 0
n = len(listoflist[row_index])

n
 
user11702787
why is n == 3 ? and not 2 are there not 2 rows in this list of list ?
 
that'd be len(listoflist) you're after... you're taking the length of the first element of that...
 
8:54 AM
@JonClements I have found "you can't do X" answers usually not to be acceptable for OPs. Given enough effort, you can do that with argparse. I prefer the question to clearly outline the requirements, instead of someone gambling away that much effort.
 
user11702787
@JonClements thanks
 
if you want to comment on how to make it clearer - go for it... seems the attempt and the desired output is there... but that might just well be my reading of it... others saying there's other options and argparse isn't the best option seems to me others have understand the requirement as well...
 
 
1 hour later…
9:57 AM
@smci Thanks. I have a working code sample that parses it manually, but I was trying to see if I could use a builtin module like argparse to do it instead.

@MisterMiyagi I should have probably changed the sentence "My goal is to make all of these valid" to "My goal is to make only these valid". As for what has been tried, maybe I should have mentioned I tried setting `prefix_chars` to None and "" which is not allowed (as well as toying with some other parameters). But I felt explaining how I tried options that are not intended to do what I want to do would have just digressed from the ques
 
@JonClements on reviewing my access system, there were only 2 routes where some disgruntled employee with access could have taken me down, so it wasn't as bad as I feared thankfully :)
 
@roganjosh yay! You weren't up all night panicking or anything I hope? :p
 
I've had an awful lot of code to review, let's say :P
 
you had plenty of fun then :)
 
@PratyushDas No worries, thanks for editing the question. I'll try and come up with an answer. Let's proceed the discussion there.
 
10:14 AM
It's given me a lot of questions I need to answer on another project. In the other project, I want to give users fine-tuned control of access on individual routes/actions with no hard-coding. I haven't seen a project that does that to use as a template but I think my current implementation could be exploited. Good job that one isn't in use :)
 
10:30 AM
A key component is a robust backup system, so if an employee runs amok they can be fired and the data restored with little loss
And logs to know who did what
 
I've got both and can nuke from orbit. If I'm honest, I was mostly ashamed that I'm here giving people advice and found a corner case to do myself over that seemed pretty simplistic once I spotted it
Ironically, you need to pass 2 backend checks to exploit it :P In the cases of singular checks, I was safe
 
2 backend checks?
 
Yes, and 1 front-end
Basically, once my server accepts that you are part of a user group that is permitted to take some action (i.e. you have authority to delete a department from my dashboard) and that you actually belong to the department for the page that you issued the request from, I'll take the department ID that you submitted and delete it. I never check that the ID you submit is the same department, only that it came from that department page
That's the simplest exploit. That pattern happened elsewhere
 
I see
 
10:47 AM
That's less damaging than user access. In the case of users, there is a hierarchy of access. Once you had any sort of access to delete users, you could use that exploit to punch upwards and just delete admin users
 
 
1 hour later…
user13505457
12:25 PM
Hi all, ...i want your help regarding a particular component of my project... actually I'm stuck with it's concepts..can any one help me...Let me describe my problem here...


I have to created a website (django based) where users will upload a python file as input, containing a python function.
Then we have some nd arrays with us in backend that we want to pass through that user function which will give us a real number as output and we will be using that real number for some calculation in our backend and based upon that some graph and table will be generated that we will render on the we
 
@Razeun Is security a concern? Do you need sandboxing of the users' code?
 
You reference "a particular component" but the question seems pretty broad. What are you asking about, specifically?
 
user13505457
@MisterMiyagi I don't know much about sandbox...and what are the options with or without security concerns
 
@Razeun Without regards to security, just eval or exec their code.
 
user13505457
@roganjosh my question is more specific towards how can i run user's uploaded python script which takes some arguments and returns some values
 
user13505457
12:38 PM
@MisterMiyagi but i have read that exec Don't return values and i want values in return
 
@Razeun is this any help? Note the opening phrase of the answer - "This is really non-trivial."
 
user13505457
@roganjosh thanks let me go through it.. I'll get u back
 
I'm not sure that post is so useful, actually. Isn't this answer broken?
 
12:55 PM
@roganjosh there's no safe exec, so it probably is
 
user13505457
@roganjosh no didn't got my answer...but as @MisterMiyagi suggest about exec and eval... something like that will work initially.
 
user13505457
but i want return value too from that function
 
@Razeun I've read the question 3 or 4 times now. My best estimate is that you're going to produce a new site for programming challenges, and the issues with eval et al. will be relevant immediately
 
maybe see also lwn.net/Articles/574215
@Razeun you won't be able to secure that with eval/exec, and human nature implies someone will try to break it
You're probably better off with a whitelist (a parser of your own)
 
user13505457
1:01 PM
@roganjosh No project not about programming website... actually the idea is related to some stats formula that will be converted into python code and they will upload it...and from my website some data will be sent to their code and the return value needs to be processed in some way..and then given output to user
 
Ok, then that brings me to my second-best guess :P
"Then we have some nd arrays with us in backend that we want to pass through" is your product?
 
user13505457
nd arrays will be given to user's function and real value will be given back by user's function in result
 
I understand. I'm asking whether the wizardry of your array calculations is the product that you actually sell
 
@roganjosh probably
like a solution to the "python code can't be secured" problem
 
user13505457
further the real value needs to be computed and some graph will be created based upon that...but this will be our work not user's work
 
1:08 PM
but it's "we don't want to expose the data either"
sounds lke a black box that has data which people can can't access
 
It seems to me that there are tonnes of ways in which data could be supplied to your system that don't involve the user writing custom code
 
user13505457
@roganjosh @AndrasDeak @ What I am thinking is...i can create a blank .py file and copy the content of user's uploaded file into it and I'll use that file as module...then using getter I'll be able to run that file and get the value in return what's say ?
 
Ok, I don't think we're getting anywhere here
The bottom line is that you need to be really careful in executing code that some 3rd party can just post on your site. Sandboxing is hard. Given that I can't extract the actual business reason for the user needing to write code in the first place, I'm not comfortable giving further suggestions
 
@PaulMcG Fair enough, just curious :)
 
@Razeun Importing a module practically does the exact same thing and has the exact same limitations as using exec.
Only do it if you are 100% fine with the user executing arbitrary code.
Whether the code executes via exec or import, or whether you get "the value" from the import or exec globals, is not significant for what you're trying to do.
 
user13505457
1:23 PM
then what to do know 😭😭😭😭 stuck with this from long tym
 
From a birds-eye view, I'd run the user code in a disposable environment, e.g. a container, and exchange data only with a trusted format, e.g. JSON via REST/HTTP/TCP.
 
user13505457
something like docker?
 
Though from a general standpoint, I'd revisit the requirements. Most likely you don't need Python, but could do with a safe, side-effect free query-language.
Yes, something like docker. Podman, Singularity, take your pick. Consult their known exploits first, though,
 
user13505457
okay..ill see to it..then... Thanks
 
2:01 PM
How much of a difficult (or trivial?) task is it to compare two dicts recursively? I want to do what this answers suggests stackoverflow.com/a/26171760/12502959, looking to avoid doing pip installs for just this
"Value of an item has changed" in that answer is what I am looking to achieve if I decide to write one
 
So I discovered that some pygments styles (used by sphinx) have a background color set, but no font color. They simply rely on the HTML page having a dark-ish font color, which, of course, my page doesn't have. So I end up with white text on white background.
Does anyone know a good way to make sphinx/pygments output a font color for each style?
 
@python_learner The question already has some code to do what you describe. That should give you an idea how difficult it is.
Note that using the dict views' set-like features allows to do some things even simpler.
e.g. dict_a.keys() - dict_b.keys() directly provides all keys in dict_a missing from dict_b.
 
in my case the keys are the same, I want to compare the value of these keys :/
Is it considered "hacky" if I know my "actual dict" (the dict I will compare with always) structure and do a comparison?
I can avoid recursions and just do a loop if I know some key will be nested
 
@Aran-Fey nice
 
@python_learner I'm not quite following. You can rewrite any recursion as a loop and vice versa. Not sure what you mean by "hacky" either – are you trying to solve an actual problem or some code challenge?
 
2:16 PM
it is an assignment, I have a set of json files given by my college, there is a "base" json file, which will be dict_1 all the other jsons have to compared with this dict_1 and in the end I have to show how the other jsons differ in values with this
I know the structure of these json files, for eg, a key called nested_list will always have a nested list in the base json, nested_dict will be a dict and so on, so I know what keys will be nested in advance
 
What I had in mind was instead of recursing I could just do a normal if...else for keys that are possibly nested as I know my structure wont change, sorry if its not clear
 
So instead of writing code that does the right thing depending on the structure of your dict, you're going to manually hard-code all of that behavior? I would call that "counterproductive" rather than a "hack"
 
what he says is what I have in mind, laurel, so it is bad then
 
Grrr, hate it when some regular close-vote gets munched together with an inappropriate dupe vote. :/
@python_learner The point of exercises/homework is that you learn to code. Your tutor does not want you to solve the problem, they want you to learn to solve the problem. Hacking your way through these exercises with a cheap solution will primarily harm yourself.
 
2:30 PM
the thought of missing deadlines is a compelling reason to hack your way :/ but you are correct, I have to spend some time then, always dreaded recursions, time to face it
 
The good news is that processing nested data structures is definitely the best and most intuitive use for recursion
 
I thought Tower of Hanoi is made for recursion :p
 
@python_learner I can sympathise. When to cut corners is a vital skill to learn as well. Skipping on fundamentals makes the advanced topics even more challenging, though.
 
Maybe, but solving towers of hanoi is not a good use of recursion... or your time :P
 
@Aran-Fey Wait, you mean all those hours spent computing fibonacci numbers are a waste?
 
2:37 PM
Did you guys learn recursion with "Sum of n digits" or some actual use case?
they taught us that and then towers of hanoi, boom recursion done
 
@MisterMiyagi Yes indeed. Didn't you get the... lame pun warning... memo?
Okay, true story: Last year (or so) I took a lecture intended for first-semester students. They gave us tasks to solve with recursion that legitimately stumped me. I honestly thought some of them were impossible. I only solved them with the help of the folks here in this room.
 
Mind linking to that course or the name? I feel like I need to solve more of these to get the hang of it
 
It's not available online. At least not publicly. Feel free to visit Vienna and attend university here though (:
(P.S.: Don't.)
 
laurel, I guess I have to check out leetcode after all, half the students in my class are already solving it, solving leetcode is like an unspoken rule apparently
 
@python_learner ugh
23 hours ago, by Andras Deak
because we already have a user who uses this room as a code challenge site solving resource, and I'm getting tired of doing this again
That's mostly leetcode
I remember some terrible patterns forced on the user. Like returning -1 for an error, putting everything in a useless class, etc.
I've grown to believe that any code challenge site that checks your actual code is crap
 
2:54 PM
I have not tried many but I did read that message yesterday didnt know it was specificaly leetcode
but recruiters tend to ask questions like that, I am not sure devs at google or amazon use trees/graphs everyday
how is -1 for an error bad? useless classes I get it
 
Codewars is alright. It doesn't force any boilerplate on you and it doesn't feed you test cases via stdin.
 
@Aran-Fey I don't remember seeing it here which is promising
 
It's come up a few times. Whenever someone says they're solving a "kata", that's codewars
 
will check out codewars, I have a month to me so hopefully I can buff my skills
 
But most often these sites work with a wide range of languages. It's hard to convert requirements in a way that makes it idiomatic in each language, and frankly most devs involved in these sites don't seem up to it. And community-posted challenges are the worst.
@Aran-Fey that does ring a bell
 
2:58 PM
Yeah, finding a good challenge to solve is the real challenge ;)
 
is doing real world projects the way to go then? doing a gui/web app etc?
 
TL;DR: Coding challenges help you familiarize yourself with a programming language. Real world projects teach you how to solve real-world problems like writing good, maintainable code, handling version control, testing, etc.
 
@python_learner having a task you want to accomplish helps a lot. But there are also coding challenges that give you a task and only ask for an answer. How you obtain it is your own business.
If the site doesn't see your code it can't force bad patterns on you
 
thanks for the suggestions guys :)
@Aran-Fey is the profile avatar from an anime? google image search leads me to your github page :/
 
Close, but not quite. He's from a japanese card game, with some color modifications: sv.bagoum.com/cards/103611030
I used to have a gif of him... I need to re-create that at some point :(
 
3:12 PM
ahh ok, rbrb chat
 
@AndrasDeak heck yeah! Thanks!
 
4:25 PM
Hello, I have an animated Canvas. I want to call it as thread.
If I do this, then RuntimeError: main thread is not in main loop is raised.
How can i use the self.frames inside the thread?
 
We'll need an MCVE for that one
 
Help me to make that.
 
I don't know how I can help with that
 
@ChrisP you've been getting debugging help here for weeks. You really have to improve.
 
4:53 PM
One other question:

I have a search button, when user click's it, then filters some table. After that it changes the container's height to be as beetween(615,as_small_as_possible).

In the end of search function i print this height and it's right i think (for example 177).

But in the screen the table container height stll same as before the search procedure.

What's wrong?
I try with grid_propagate(1) and 0 but no difference.
I use self.player_main_frame.config(height=...) to set the height and self.player_main_frame.winfo_height() to print it.
The frame i changes has orange background, other frames are white.
I also call self.player_main_frame.update()
@AndrasDeak Many thanks for debugging help.
Really appreciate it.
 
5:11 PM
If i print the height with Timer(10,....) it's still correct.
 
5:49 PM
Again, I don't see much hope without an MCVE
 
 
3 hours later…
9:19 PM
I need to decide on a syntax theme to go with my website's light theme. Anyone got any favorites? (Among the themes supported by sphinx)
 
Did you figure out the pygments font colour thing?
 
Well, I realized I was kind of overcomplicating it. I was trying to solve the problem with python code, but then I realized that all I have to do is set a dark font color for code blocks in my CSS
So light themes use the dark color, and dark themes define their own color
 
neat
 
If nobody's got a preference I'll go with the "friendly" theme, if only for the possibility of maybe eventually adding an "unfriendly" theme to go with it
 
Do you have have a palette somewhere? I'm sure some visual examples could facilitate bikeshedding.
 
9:34 PM
There's a gallery of pygments themes here. The handful of themes added by sphinx aren't on there, though
 
From that page, monokai, tango and friendly for me
 
Cool, those were pretty much the same themes I picked. Although I'm fairly sure tango had a dark background, unlike the white one there. So friendly is the only light theme out of those
 
10:08 PM
Hi, Is there any hooks to run cmds after testsuite or at_exit in unittest or in pytest
 
10:25 PM
Is pytest still the best way to write unit tests these days? I recall wim recommending nosetests at some point
 
11:06 PM
I use pytest for my frontend tests
 

« first day (3543 days earlier)      last day (1388 days later) »