[Python-ideas] Re: Moderator: does this code execute correctly?

2022-11-17 Thread Chris Angelico
On Fri, 18 Nov 2022 at 18:01, James Johnson wrote: > > Dear Sir: > > This script SHOULD build a grid with staggered columns. I am not satisfied > that it should stagger in the direction that I want it to, but standing > alone, it should do SOMETHING. > > I keep getting a grid of identical rows.

[Python-ideas] Moderator: does this code execute correctly?

2022-11-17 Thread James Johnson
Dear Sir: This script SHOULD build a grid with staggered columns. I am not satisfied that it should stagger in the direction that I want it to, but standing alone, it should do SOMETHING. I keep getting a grid of identical rows. Is it my anaconda3; is it a code optimization? I know it sounds lik

[Python-ideas] Re: Add mechanism to check if a path is a junction (for Windows)

2022-11-17 Thread Eryk Sun
On 11/7/22, Eryk Sun wrote: > > def isjunction(path): > """Test whether a path is a junction. > """ > try: > st = os.lstat(path) > except (OSError, ValueError, AttributeError): > return False > return bool(st.st_reparse_tag & stat

[Python-ideas] Custom unpickler and pickler for the shelve module

2022-11-17 Thread furkanonder via Python-ideas
Hi, As you know we can't pickle the lambda functions in the standard pickle module. So, for that reason the shelve library also can't do that. What if we can define the custom pickler and unpickler for the shelve module? We couldn't do this before; import shelve with shelve.open("test_file") a