Quantcast
Channel: User martineau - Stack Overflow
Browsing all 44 articles
Browse latest View live

Comment by martineau on Tkinter understanding mainloop

Working links:Here you have something about the update function. Here about update_idletasks..

View Article


Comment by martineau on Tkinter - Updating Coordinates or Moving a Shape with...

@HWW: Nope — the OP is trying to move the subjecton the canvas. It is also untrue that calling mainloop() prevents things from updating — quite the contrary.

View Article

Comment by martineau on Strings which contain logical operators

Probable XY Problem.

View Article

Comment by martineau on Can we convert a Python project (and not a string) to...

Several (most if not all) of the existing solutions for converting a Python programs into into .exes do so in such a way that Python doesn't have to be installed on target computers in order to run them.

View Article

Comment by martineau on Convert JSON table horizontally

It looks like what you want to do is transpose the data in the table — so search for that term.

View Article


Comment by martineau on Is there a way to make tkinter's optionmenu to wait...

tkinter programs are user event-driven, so the flow of control is not the same as it is under the procedural programming paradigm you are used to using. Unfortunately is is not something that can be...

View Article

Comment by martineau on read csv without using import csv

You forgot to include your attempt to solve this problem. Stack Overflow is not a code-writing nor a custom tutorial service.

View Article

Comment by martineau on Non-overriden abstract-static method does not throw...

@JanJanáček: Alternative constructors are usually implemented a classmethods.

View Article


Comment by martineau on Iterate through a list of 3 mil. JSON objects |...

Profile your script and see where it's spending most of it's time.

View Article


Comment by martineau on Compare two CSV files and create new CSV file

Get out of what?

View Article

Comment by martineau on Find element in a list of dicts based on value

Wouldn't it also make more sense to write for user in user_list: as opposed to items?

View Article

Comment by martineau on how to import variable from class correctly

@kaan46: It's impossible to debug unseen code. If you have another question, post it separately and include the code.

View Article

Comment by martineau on Shuffle a dictionary and list in unison?

You are mistaken, dictionaries have had their order defined since Python 3.7.

View Article


Comment by martineau on Cannot access variables of an object - 'has no...

It's good to hear my answer helped and was worth the effort it took to make. Besides learning Python, you're also dealing with tkinter which has many of its own idiosyncrasies (and is poorly documented).

View Article

Comment by martineau on Create buttons from instances of a class

list_aux=Food.instances does not make a copy of Food.instances, it just gives it another name — this is why calling get_instance() changes it. Use list_aux=Food.instances.copy() to make a copy of the...

View Article


Image may be NSFW.
Clik here to view.

Answer by martineau for generating equal diagonal lines in PIL

You can do it by first generating an image of vertical lines like I showed you in my answer to your other question, rotating that by 45°, and then cropping it. To avoid having areas of black, you need...

View Article

Answer by martineau for How to stop/pause and restart the code using same...

Here's runnable code that illustrates how to do it. It uses several global variables to keep track of the current state of the slide show that the various functions use to determine what needs to be be...

View Article


Answer by martineau for Python command prompt executed the second command...

By default the Windows start command does not wait for the specified command to finish, so it's possible for the other command you want to execute to (randomly) start before the current working...

View Article

Answer by martineau for Drift management of JSON configurations by comparing...

I think this will do what you say you want. I used the dictionary flattening code in this answer with a small modification — I changed it to not concatenate the keys of parent dictionaries with those...

View Article

Answer by martineau for Pass a list to a function instead of user-input -...

You can do it by temporarily changing stdin which is where the input() function gets its data:from contextlib import contextmanagerfrom io import StringIOimport sys@contextmanagerdef...

View Article
Browsing all 44 articles
Browse latest View live




<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>