Re: Button press event - event handling and picking: IndexError: list index out of range

2020-06-07 Thread DL Neil via Python-list
On 8/06/20 10:38 AM, MRAB wrote: On 2020-06-07 23:24, DL Neil via Python-list wrote: On 8/06/20 7:06 AM, Caledonian26 wrote: ... However, I keep getting the error: IndexError: list index out of range. Could anyone give me a helping hand as to where I am going wrong? When things go wrong

Re: Python-list Digest, Vol 201, Issue 9

2020-06-09 Thread Joseph Jenne via Python-list
ustom serializer would probably be preferable from a design standpoint. -- https://mail.python.org/mailman/listinfo/python-list

Re: repair modify uninstall

2020-06-10 Thread DL Neil via Python-list
://mail.python.org/mailman/listinfo/python-list

Re: Turning pygame apps into add-ons

2020-06-10 Thread DL Neil via Python-list
fer to be the result? (remember that this list will only accept text-format attachments (no graphic screen-dumps!), so best to copy-paste code/results directly into the email message) -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Syntax Help

2020-06-10 Thread DL Neil via Python-list
n/listinfo/python-list

Re: Syntax Help

2020-06-11 Thread DL Neil via Python-list
thing thinks something is missing, say so here. It is a solid contribution to the community. Thanks! -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Typing, how come that :int is not ensuring int parameter?

2020-06-11 Thread DL Neil via Python-list
w Python implements Typing? (that done, you will likely answer your own question, and accumulate some useful learning about Python - at both the practical and philosophical/idiomatic levels) -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Typing, how come that :int is not ensuring int parameter?

2020-06-11 Thread DL Neil via Python-list
ence with any of these plugins? Please share your opinion. I don't have a competent opinion for the current Pycharm, but hope that others will answer. TBH I'd be surprised if it doesn't come 'baked in'. -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Friday Finking: Beyond implementing Unicode

2020-06-11 Thread DL Neil via Python-list
n, to accept the wider range of symbols instead/in-addition to those currently in-use? Would such even constitute 'a good idea'? Web.Refs on hardware: https://imgur.com/a/AalpV1r https://github.com/mattdibi/redox-keyboard https://github.com/BenRoe/awesome-mechanical-keyboard https://github.com/help-14/mechanical-keyboard https://github.com/makerdiary/python-keyboard?mc_cid=fc3464732f&mc_eid=cd74eeaf09 Web.Refs on the rest: https://www.ascii-code.com/ https://en.wikipedia.org/wiki/APL_syntax_and_symbols https://en.wikipedia.org/wiki/Digital_encoding_of_APL_symbols https://en.wikipedia.org/wiki/IBM_PC_keyboard -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: pyinstaller

2020-06-12 Thread DL Neil via Python-list
across this article: https://www.activestate.com/blog/how-to-convert-py-to-exe/ NB have no assessment/advice to report -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Python database compatibility

2020-06-12 Thread DL Neil via Python-list
com/forum/#!topic/comp.sys.tandem/dG2t9faPzWg The lingua-franca of DB inter-connection is probably ODBC, and thus the Python ODBC connector. Trusting these give some food-for-thought... -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: change surface

2020-06-13 Thread DL Neil via Python-list
new position (and adding it to the background), execute appropriate code to wipe it (and restore whatever was 'underneath'). 2 clear the entire display, and build it again from 'background' to 'foreground'. (takes longer but is 'guaranteed') -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Python Curses Programming HowTo -reviewers?

2020-06-16 Thread Alan Gauld via Python-list
flickr.com/photos/alangauldphotos -- https://mail.python.org/mailman/listinfo/python-list

Re: Friday Finking: Beyond implementing Unicode

2020-06-16 Thread DL Neil via Python-list
On 13/06/20 4:47 AM, Terry Reedy wrote: On 6/12/2020 2:03 AM, DL Neil via Python-list wrote: Unicode has given us access to a wealth of mathematical and other symbols. Hardware and soft-/firm-ware flexibility enable us to move beyond and develop new 'standards'. Do we have opport

Re: Friday Finking: Beyond implementing Unicode

2020-06-16 Thread DL Neil via Python-list
On 13/06/20 5:11 AM, Dennis Lee Bieber wrote: On Fri, 12 Jun 2020 18:03:55 +1200, DL Neil via Python-list declaimed the following: There is/was a language called "APL" (and yes the acronym means "A Programming Language", and yes it started the craze, through "B&q

Re: Friday Finking: Beyond implementing Unicode

2020-06-16 Thread DL Neil via Python-list
n -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Curses Programming HowTo -reviewers?

2020-06-17 Thread Alan Gauld via Python-list
On 16/06/2020 16:38, Alan Gauld via Python-list wrote: > This is now available as a PDF and I'd be interested in review comments. Just to add that I can send a zip of the code files too. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.co

Re: Aw: Python Curses Programming HowTo -reviewers?

2020-06-17 Thread Alan Gauld via Python-list
hor of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos -- https://mail.python.org/mailman/listinfo/python-list

Re: problem at the time of using editor

2020-06-18 Thread DL Neil via Python-list
add docstrings to individual fields or the named tuple as a whole. As mentioned, at this stage in your learning process, you may find it helpful to use a basic Python editor which has a built-in terminal console. -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: How to test?

2020-06-19 Thread Tony Flury via Python-list
nd whether you have a callable API that you can invoke. -- https://mail.python.org/mailman/listinfo/python-list

Re: Floating point problem

2020-06-23 Thread Tony Flury via Python-list
oatingpoint.html In the official Python documentation, well worth reading. -- Grant -- https://mail.python.org/mailman/listinfo/python-list

ANN: distlib 0.3.1 released on PyPI

2020-06-27 Thread Vinay Sajip via Python-list
dress bar - that should work. Regards, Vinay Sajip [1] https://pypi.org/project/distlib/0.3.1/ [2] https://distlib.readthedocs.io/en/0.3.1/ [3] https://bitbucket.org/pypa/distlib/issues/new -- https://mail.python.org/mailman/listinfo/python-list

Re: Assign Excel cell value from Datepicker widget Selection using Python

2020-06-28 Thread DL Neil via Python-list
... Let us know how you get on... -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Assign Excel cell value from Datepicker widget Selection using Python

2020-06-28 Thread DL Neil via Python-list
python.org/mailman/listinfo/python-list

Re: Solved: Re: Missing python curses functions?

2020-06-29 Thread Tony Flury via Python-list
Maybe you should raise a bug (bugs.python.org) and flag that this function is missing. It could be that it can be introduced by whoever is maintaining the existing code. On 20/05/2020 08:31, Alan Gauld via Python-list wrote: On 19/05/2020 20:53, Alan Gauld via Python-list wrote: One of

Re: i don't understand this python class

2020-06-29 Thread DL Neil via Python-list
stion hasn't been adequately-covered (albeit en-passant) please explain further... Finally, please be aware that there is a Python-Tutor Discussion List for the pleasure of both learners and tutors. -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Data structures and Algorithms

2020-06-30 Thread DL Neil via Python-list
bmit exams/assignments for consideration) (Disclosure: I train using edX - but not in Python) -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-02 Thread Jon Ribbens via Python-list
didn't - you did. -- https://mail.python.org/mailman/listinfo/python-list

Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread Jon Ribbens via Python-list
is tied to white supremacy, not >> any particular standard whether via its authors or otherwise. > > As I said in my preamble, it doesn't matter whether you believe that is > true or think it's utter bollocks. I asked the question to get the > Steering Council's opinion, not anyone else's. You don't get to decide whose opinions are offered. -- https://mail.python.org/mailman/listinfo/python-list

New to python - Just a question

2020-07-03 Thread Daley Okuwa via Python-list
cost in terms of space and time. Write a bash/python script that takes a directory as an argument and output the total lines of code in *.cpp files recursively. Thanks Daley -- https://mail.python.org/mailman/listinfo/python-list

Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread Jon Ribbens via Python-list
On 2020-07-02, Michael Torrie wrote: > On 7/2/20 1:26 PM, Jon Ribbens via Python-list wrote: >> On 2020-07-02, Michael Torrie wrote: >>> Agreed. She just needs to fix her commit message to remove the sentence >>> about the relics of white supremacy. The fact she wou

Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread Jon Ribbens via Python-list
On 2020-07-03, Ethan Furman wrote: > On 07/02/2020 07:42 PM, Jon Ribbens via Python-list wrote: >> She didn't - you did. > > Please keep the discourse civil. Petty taunts are not helpful. Sorry, I don't understand what you are getting at. My comment was not a "pet

Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread Jon Ribbens via Python-list
On 2020-07-03, Michael Torrie wrote: > On 7/3/20 10:57 AM, Jon Ribbens via Python-list wrote: >> On 2020-07-03, Ethan Furman wrote: >>> On 07/02/2020 07:42 PM, Jon Ribbens via Python-list wrote: >>>> She didn't - you did. >>> >>> Please ke

Re: Assign Excel cell value from Datepicker widget Selection using Python

2020-07-04 Thread DL Neil via Python-list
nt code and errors into your email message, if relevant)... -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Assign Excel cell value from Datepicker widget Selection using Python

2020-07-06 Thread DL Neil via Python-list
haven't watched it myself, Mike's stuff is usually a solid investment! https://www.blog.pythonlibrary.org/2020/07/05/using-widgets-in-jupyter-notebook-video/ -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Bulletproof json.dump?

2020-07-06 Thread Jon Ribbens via Python-list
eason I can think of that it refuses to serialize sets, for example. Going a bit further and, for example, automatically calling isoformat() on date/time/datetime objects would perhaps be a bit more controversial, but would frequently be useful, and there's no obvious downside that occurs to me. -- https://mail.python.org/mailman/listinfo/python-list

Re: Bulletproof json.dump?

2020-07-06 Thread Jon Ribbens via Python-list
On 2020-07-06, Chris Angelico wrote: > On Mon, Jul 6, 2020 at 10:11 PM Jon Ribbens via Python-list > wrote: >> While I agree entirely with your point, there is however perhaps room >> for a bit more helpfulness from the json module. There is no sensible >> reason I can thi

Re: Bulletproof json.dump?

2020-07-06 Thread Jon Ribbens via Python-list
On 2020-07-06, Frank Millman wrote: > On 2020-07-06 2:06 PM, Jon Ribbens via Python-list wrote: >> While I agree entirely with your point, there is however perhaps room >> for a bit more helpfulness from the json module. There is no sensible >> reason I can think of that it

Re: Bulletproof json.dump?

2020-07-06 Thread Jon Ribbens via Python-list
experimentation, that is not suitable for any purpose. You would probably do better by starting off subclassing json.JSONEncoder. -- https://mail.python.org/mailman/listinfo/python-list

Re: Bulletproof json.dump?

2020-07-06 Thread Jon Ribbens via Python-list
On 2020-07-06, Chris Angelico wrote: > On Mon, Jul 6, 2020 at 11:06 PM Jon Ribbens via Python-list > wrote: >> The 'json' module already fails to provide round-trip functionality: >> >> >>> for data in ({True: 1}, {1: 2}, (1, 2)): >>

Re: Bulletproof json.dump?

2020-07-06 Thread Jon Ribbens via Python-list
On 2020-07-06, Frank Millman wrote: > On 2020-07-06 3:08 PM, Jon Ribbens via Python-list wrote: >> On 2020-07-06, Frank Millman wrote: >>> On 2020-07-06 2:06 PM, Jon Ribbens via Python-list wrote: >>>> While I agree entirely with your point, there is however pe

Re: Bulletproof json.dump?

2020-07-06 Thread Jon Ribbens via Python-list
e that should probably be true regardless of any 'strict mode' flag - I can't immediately think of any reason it wouldn't be. -- https://mail.python.org/mailman/listinfo/python-list

Re: Bulletproof json.dump?

2020-07-06 Thread Jon Ribbens via Python-list
On 2020-07-06, Chris Angelico wrote: > On Tue, Jul 7, 2020 at 12:01 AM Jon Ribbens via Python-list > wrote: >> I think what you're saying is, if we do: >> >> json1 = json.dumps(foo) >> json2 = json.dumps(json.loads(json1)) >> assert json1 == js

Re: Access last element after iteration

2020-07-07 Thread Jon Ribbens via Python-list
e sequence is empty and therefore the loop never executes at all, the variable will not have been assigned to and therefore may not exist. -- https://mail.python.org/mailman/listinfo/python-list

Re: Questioning the effects of multiple assignment

2020-07-08 Thread DL Neil via Python-list
On 8/07/20 10:19 PM, Peter J. Holzer wrote: On 2020-07-08 12:26:06 +1200, dn via Python-list wrote: OTOH, using a tuple doesn't prevent the function from mutating mutable arguments: #!/usr/bin/python3 def f(*a): a[0]["new"] = 2 v = { "old": 1} f(v) print(v) pr

Re: Need a Dynamic vlookup using python

2020-07-11 Thread DL Neil via Python-list
blem and your intentions... -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Friday Finking: Limiting parameters

2020-07-11 Thread DL Neil via Python-list
On 12/07/20 8:13 AM, Peter J. Holzer wrote: On 2020-07-11 09:54:33 +1200, dn via Python-list wrote: Questions: Is the idea of limiting the number of parameters passed across an interface a real concern or somewhat an affectation? Is three, five, seven, ... a valid limit (or warning-signal

Re: Friday Finking: Limiting parameters

2020-07-11 Thread DL Neil via Python-list
intent. Well said! Zen of Python (includes): If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Issues in downloading python

2020-07-17 Thread Daley Okuwa via Python-list
t; for Windows 10 -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list

Very Simple (Rather Dumb) Question

2020-07-27 Thread Romulus Schilling via Python-list
question). Anyway, I was wondering if someone could help me in fixing this. (and yes, I've already tried unistalling and reinstalling python, and uTorrent, to no avail) thx for the attention[https://api.criptext.com/email/open/%3C1595885704865.954141%40criptext.com%3E] -- https://mail.python.org/mailman/listinfo/python-list

Re: Local access to a file, How To ?

2020-07-28 Thread DL Neil via Python-list
rom there, should enable migration. -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Issue with Python installation for a beginner Python coder.

2020-07-30 Thread Sarvesh Poddar via Python-list
help. I look forward to it.  PS : Falling in love with Python, slow and steady!  -- https://mail.python.org/mailman/listinfo/python-list

Re: "1,+2,", but not "(1,)+2,"

2020-07-31 Thread Jon Ribbens via Python-list
e error message? What are you expecting these expressions to mean? -- https://mail.python.org/mailman/listinfo/python-list

Re: "1,+2,", but not "(1,)+2,"

2020-07-31 Thread Jon Ribbens via Python-list
'turtle': 'reptile', } If you want to add a new item to or remove an existing item from the dictionary, you only need to edit one line, and it doesn't matter if that line is in the middle or at the end of the existing entries. -- https://mail.python.org/mailman/listinfo/python-list

XanaNews Statistic for comp.lang.python. 8/1/2020 7:48:48 AM [2/2]

2020-08-01 Thread The Doctor via Python-list
geary 1 24 1 Coremail Webmail Server Version XT1 25 1 Postbox 1 -- This email has been checked for viruses by AVG. https://www.avg.com -- https://mail.python.org/mailman/listinfo/python-list

XanaNews Statistic for comp.lang.python. 8/1/2020 7:48:48 AM [1/2]

2020-08-01 Thread The Doctor via Python-list
84 1 Christian SCHEIBER / KLS G Microsoft Outlook 85 1 aysegulsay...@gmail.com G2 86 1 Joe PfeifferGnus -- This email has been checked for viruses by AVG. https://www.avg.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Issue with Python module downloads from Library for a beginner Python coder.

2020-08-01 Thread Sarvesh Poddar via Python-list
l\Programs\Python\Python38-32\graphics.py", line 1    Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:43:08) [MSC v.1926 32 bit (Intel)] on win32           ^SyntaxError: invalid syntax Please do let me know if I am missing out something very basic. Thanks and I look forward.On Saturday, 1

Re: Issue with Python module downloads from Library for a beginner Python coder.

2020-08-02 Thread Sarvesh Poddar via Python-list
t;, line >>> 1, in     import graphicsModuleNotFoundError: No module named >>> 'graphics' Location of the file - C:\Program Files (x86)\Lib\tkinter Didn't work out. On Monday, 3 August, 2020, 12:47:26 am IST, Dennis Lee Bieber wrote: On Sun, 2 Aug 2020

Re: (Issue resolved!) Issue with Python module downloads from Library for a beginner Python coder.

2020-08-02 Thread Sarvesh Poddar via Python-list
gaining enough experience on the Python subject. Looking forward! On Monday, 3 August, 2020, 12:51:28 am IST, Terry Reedy wrote: On 8/2/2020 2:36 AM, Sarvesh Poddar via Python-list wrote: [I downloaded] https://mcsp.wartburg.edu/zelle/python/graphics.py) I have unmangled the traceback and

Re: Final statement from Steering Council on politically-charged commit messages

2020-08-18 Thread Karen Shaeffer via Python-list
s the rights we enjoy in the United States. Democracy is an act. — The late John Lewis humbly, kls -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Pandas split Date in day month year and hour

2020-08-19 Thread Brian Oney via Python-list
ecific strings is in the strptime function's doc. This is just a starting point. Good luck! HTH -- https://mail.python.org/mailman/listinfo/python-list

Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread Karen Shaeffer via Python-list
ven further, you have, IMHO, been condescending and even arrogant in presuming you alone have perfect knowledge on these matters: https://mail.python.org/pipermail/python-list/2020-August/898274.html <https://mail.python.org/pipermail/python-list/2020-August/898274.html> Where you conclude with

Program chaining on Windows

2020-08-23 Thread Rob Cliffe via Python-list
ther DOS command, it is executed.  Finally we appear to be done (the DOS prompt is displayed and we are back to normal DOS operation). Am I missing something?  Is there a way in Windows for one Python program to "chain" to another (or indeed to any executable) without waiting for the latter to finish? Thanks in advance Rob Cliffe -- https://mail.python.org/mailman/listinfo/python-list

Re: Program chaining on Windows

2020-08-23 Thread Rob Cliffe via Python-list
so; shutting it down becomes constant time. But I would still like to be able to do it as I originally planned, if possible.  Not least because I may have other uses for program "chaining" in future. Best wishes Rob Cliffe On 23/08/2020 21:37, dn via Python-list wrote: On 23/0

Re: Program chaining on Windows

2020-08-24 Thread Rob Cliffe via Python-list
chance you could give me some toy code? As you can see, I'm pretty well lost. Thanks again Rob Cliffe -- https://mail.python.org/mailman/listinfo/python-list

Re: Program chaining on Windows

2020-08-24 Thread Rob Cliffe via Python-list
On 24/08/2020 00:57, Chris Angelico wrote: On Mon, Aug 24, 2020 at 9:51 AM Rob Cliffe via Python-list wrote: Let me describe my actual use case. I am developing a large Python program (in Windows, working in DOS boxes) and I constantly want to modify it and re-run it. What I have been

ANN: Version 0.1.6 of sarge (a subprocess wrapper library) has been released.

2020-08-24 Thread Vinay Sajip via Python-list
ot more information, with examples, than I can put into this post. You can install Sarge using "pip install sarge" to try it out. The project is hosted on BitBucket at https://bitbucket.org/vinay.sajip/sarge/ And you can leave feedback on the issue tracker there. I hope you find Sarge useful! Regards, Vinay Sajip -- https://mail.python.org/mailman/listinfo/python-list

Re: Program chaining on Windows

2020-08-24 Thread Rob Cliffe via Python-list
. I'm running CMD.exe.  Sorry, I didn't realise I was using sloppy language. Thanks for your very detailed repy, Eryk. Best wishes Rob Cliffe -- https://mail.python.org/mailman/listinfo/python-list

Re: Program chaining on Windows

2020-08-24 Thread Rob Cliffe via Python-list
On 24/08/2020 19:54, Terry Reedy wrote: On 8/23/2020 3:31 AM, Rob Cliffe via Python-list wrote: On WIndows 10, running Python programs in a DOS box, Please don't use 'DOS box' for Windows Command Prompt or other Windows consoles for running Windows programs from a command l

Re: About float/double type number in range.

2020-08-26 Thread Rob Cliffe via Python-list
On 26/08/2020 12:02, Peter J. Holzer wrote: On 2020-08-26 22:40:36 +1200, dn via Python-list wrote: On 26/08/2020 19:58, Joel Goldstick wrote: [...] <<< Code NB Python v3.8 >>> def fp_range( start:float, stop:float, step:float=1.0 )->float: ""&quo

Re: How do I place a preset into the text box?

2020-08-28 Thread Colin McPhail via Python-list
t", command = ClickExit) button.grid(column= 2, row = 7) window.mainloop() x = (NewCode.get()) print("The new code entered is: " + x) #= Regards, Colin -- https://mail.python.org/mailman/listinfo/python-list

Re: Error in lambda function..!

2020-08-29 Thread Rob Cliffe via Python-list
uce) for an explanation of how reduce works.  Note that the first sentence starts "Apply a function of two arguments" Best wishes Rob Cliffe -- https://mail.python.org/mailman/listinfo/python-list

Re: Threading plus multiprocessing plus cv2 error

2020-08-29 Thread Stephane Tougard via Python-list
executable, they are sharing the thread until the thread exits). > same error condition even with the sleep(1) in place. I'm not even that makes sense, how 2 processes can share a thread ? -- https://mail.python.org/mailman/listinfo/python-list

Re: Threading plus multiprocessing plus cv2 error

2020-08-30 Thread Karen Shaeffer via Python-list
> On Aug 29, 2020, at 10:12 PM, Stephane Tougard via Python-list > wrote: > > On 2020-08-29, Dennis Lee Bieber wrote: >> Under Linux, multiprocessing creates processes using fork(). That means >> that, for some fraction of time, you have TWO processes sharing th

Re: Threading plus multiprocessing plus cv2 error

2020-08-30 Thread Stephane Tougard via Python-list
its own copy of the thread. -- https://mail.python.org/mailman/listinfo/python-list

Re: Threading plus multiprocessing plus cv2 error

2020-08-30 Thread Stephane Tougard via Python-list
ting. -- https://mail.python.org/mailman/listinfo/python-list

Re: Any ideas for a new language inspired to Python?

2020-09-05 Thread Tony Flury via Python-list
C/machine code. -- Tony Flury -- https://mail.python.org/mailman/listinfo/python-list

Module exists and cannot be found

2020-09-08 Thread James Moe via Python-list
27;, ''): os.putenv('DISPLAY', ':0.0') import datetime import gettext import re import subprocess import shutil import signal from contextlib import contextmanager from tempfile import TemporaryDirectory import qttools <<<--- line 35 qttools.registerBackintimePath('common') ... [ end ] -- James Moe jmm-list at sohnen-moe dot com Think. -- https://mail.python.org/mailman/listinfo/python-list

Re: [SOLVED] Module exists and cannot be found

2020-09-10 Thread James Moe via Python-list
ng python correctly, the errors disappeared and the app is performing as expected. Thank you all for your replies. -- James Moe jmm-list at sohnen-moe dot com Think. -- https://mail.python.org/mailman/listinfo/python-list

python oop learning communication between function inside a class

2020-09-17 Thread pascal z via Python-list
on', "Selection inserted into db") except: msg.showinfo("Form submission failed", "Plz check ur input") ## all script available on github https://github.com/barpasc/python_tuto_400_oop In function save2db, I would like to know if there is any alternative to using try/except. The alternative I'm thinking is something like def save2db(self,boo): if boo == 1: do something else: do something like return to previous step... Is this possible? -- https://mail.python.org/mailman/listinfo/python-list

RE: Puzzling difference between lists and tuples

2020-09-20 Thread Avi Gross via Python-list
t seems more explicit than adding a trailing comma. It also is a simple way to make an empty tuple but is there any penalty for using the function tuple()? -Original Message- From: Python-list On Behalf Of "???" Sent: Saturday, September 19, 2020 11:39 PM To: python-list

RE: Puzzling difference between lists and tuples

2020-09-20 Thread Avi Gross via Python-list
iterator is iterating at a different level. >>> d = ["first"] >>> tuple(d) ('first',) >>> tuple(["first"]) ('first',) I understand the design choice and can imagine there may be another function that initializes a tuple more directly in

python show .

2020-09-23 Thread pascal z via Python-list
, f_size/1048576, f_size/1073741824) fp = open(output_file, "w") fp.write(csv_contents) fp.close() ### END OF SCRIPT### When I run this script, I get files in subfolders. For now, I need to keep using "os.walk" because the script includes functions that I didn't include to make thing simple. Pascal -- https://mail.python.org/mailman/listinfo/python-list

Re: python show folder files and not subfolder files

2020-09-23 Thread pascal z via Python-list
%.2f \n" % (path, f_size, f_size/1024, f_size/1048576, f_size/1073741824) fp = open(output_file, "w") fp.write(csv_contents) fp.close() -- https://mail.python.org/mailman/listinfo/python-list

Re: python show folder files and not subfolder files

2020-09-23 Thread pascal z via Python-list
ok, i came up with if os.path.isfile(path) following path = os.path.join(Lpath, f) and it seems to be ok, no dupplicates or wrong sizes... thanks -- https://mail.python.org/mailman/listinfo/python-list

Use of a variable in parent loop

2020-09-25 Thread Stephane Tougard via Python-list
{}".format(name)) The exact same code in Python works fine, the variable name is used outside of the if block even it has been declared inside. This does not look right to me. Can we change this behavior or is there any point to keep it this way ? -- https://mail.python.org/mailman/listinfo/python-list

Re: Use of a variable in parent loop

2020-09-26 Thread Stephane Tougard via Python-list
and not strict. Anyway, there's no perfect language, the point is to know it. It's just confusing I still have to declare or not declare an object depending on the action I have with it. -- https://mail.python.org/mailman/listinfo/python-list

Re: Use of a variable in parent loop

2020-09-27 Thread Stephane Tougard via Python-list
it does not answer the question. In many non declarative language, if I do print($var), it just prints and undefined value with returning an error. -- https://mail.python.org/mailman/listinfo/python-list

Re: Use of a variable in parent loop

2020-09-27 Thread Stephane Tougard via Python-list
m asking if there is way to do things. -- https://mail.python.org/mailman/listinfo/python-list

RE: Use of a variable in parent loop

2020-09-27 Thread Avi Gross via Python-list
es are often made for other reasons such as how easy the creators can implement things even if the result is harder to program some things in. Avi -Original Message- From: Python-list On Behalf Of 2qdxy4rzwzuui...@potatochowder.com Sent: Sunday, September 27, 2020 8:17 AM To: python-li

Re: Use of a variable in parent loop

2020-09-27 Thread Stephane Tougard via Python-list
On 2020-09-27, Chris Angelico wrote: > If you MUST use a block-end marker, try "# end" instead - at least > then everyone *knows* it's nothing more than a comment. Damn, you could not say that earlier !!! -- https://mail.python.org/mailman/listinfo/python-list

Re: Use of a variable in parent loop

2020-09-27 Thread Stephane Tougard via Python-list
ady thinking about it. -- https://mail.python.org/mailman/listinfo/python-list

Re: Use of a variable in parent loop

2020-09-27 Thread Stephane Tougard via Python-list
't do it" or "it's not expected to be done this way". Anyway, thanks for your help. -- https://mail.python.org/mailman/listinfo/python-list

Re: Use of a variable in parent loop

2020-09-27 Thread Stephane Tougard via Python-list
is arguing as if I said any blasphem because I asked how can we change the behavior of the language. -- https://mail.python.org/mailman/listinfo/python-list

Re: Use of a variable in parent loop

2020-09-27 Thread Stephane Tougard via Python-list
ever happens. In some languages Totally agree, it's not an acceptable behavior. I would not do some Perl without 'use strict' -- https://mail.python.org/mailman/listinfo/python-list

Re: Use of a variable in parent loop

2020-09-27 Thread Stephane Tougard via Python-list
So it's logic for it to indent one level up after a 'pass' because the people who made it did not see any other usage to 'pass' than that. if True: pass print("It's true") The 'pass' is totally useless by itself, it can be replaced by a comment. -- https://mail.python.org/mailman/listinfo/python-list

Re: Use of a variable in parent loop

2020-09-27 Thread Stephane Tougard via Python-list
. #include int main(int argc, char * argv[]) { if(1 == 1) ; printf("Hello\n"); return 0; } > while process_next_item(): > # Do nothing. > pass while p(): # do nothing continue -- https://mail.python.org/mailman/listinfo/python-list

Re: Use of a variable in parent loop

2020-09-27 Thread Stephane Tougard via Python-list
ChrisA and StefanR and others here I am >> > also a Python beginner) >> >> To give me a pointer on your localhost, I could guess. > > Don't understand this sentence. The URL you gave is pointing to your localhost, your own computer if you prefer. -- https://mail.python.org/mailman/listinfo/python-list

Re: Use of a variable in parent loop

2020-09-27 Thread Stephane Tougard via Python-list
stated otherwise. Using goto() may make the code much simpler to understand when you encounter a lot of error cases in a code. The try: except: of Python, as I understand it, is never more than a goto() in disguise (at least, that's the way I use goto() in Perl). -- https://mail.python.org/mailman/listinfo/python-list

Re: Use of a variable in parent loop

2020-09-27 Thread Stephane Tougard via Python-list
I live with it since 20 years. But I've seen some Perl code that is total gebbiresh to me, still doing the job correctly. -- https://mail.python.org/mailman/listinfo/python-list

<    34   35   36   37   38   39   40   41   42   43   >