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

2020-06-28 Thread DL Neil via Python-list
On 29/06/20 3:04 AM, [email protected] wrote: When I run the python code I should be able to open my Excel and when I click on one Excel cell I should have my datepicker widget popped up and I should be able to select any date from my datepicker widget as my Excel cell value Tried below

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
is more helpful to a reader, than is the explanatory comment! Your thoughts? (which #comment 'should' be a docstring, BTW) The word "property" may have a slightly different definition in Python than in other programming languages you have used. If that part of the que

Re: Data structures and Algorithms

2020-06-30 Thread DL Neil via Python-list
On 1/07/20 1:18 AM, Richard Damon wrote: On 6/30/20 8:26 AM, Cameron Simpson wrote: On 30Jun2020 10:52, satyaprasad wrote: Hi, I am currently in learning process of python have been worked on some desktop application using pyqt . I want improve my DSA area but i searched so many videos mot

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
On 5/07/20 5:20 AM, [email protected] wrote: I am trying to assign a widget to an excel cell. Convertion wont help me.Thanks That's true - and false! Unfortunately, these posts have revealed little about you and your level of understanding of Python specifically, and com

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

2020-07-06 Thread DL Neil via Python-list
On 5/07/20 5:20 AM, [email protected] wrote: I am trying to assign a widget to an excel cell. Convertion wont help me.Thanks If you are following this post, you may be interested to view:- Using Widgets in Jupyter Notebook (Video) July 5, 2020 in the Mouse vs Python series. Whilst I

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
On 2020-07-06, J. Pic wrote: > Well I made a suggestion on python-ideas and a PyPi lib came out of it, but > since you can't patch a lot of internal types it's not so useful. > > Feel free to try it out: > > https://yourlabs.io/oss/jsonlight/ While I applaud your

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
ything that would violate that > (weak) guarantee. I think what you're saying is, if we do: json1 = json.dumps(foo) json2 = json.dumps(json.loads(json1)) assert json1 == json2 the assertion should never fail (given that Python dictionaries are ordered these days). I seems to m

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
On 2020-07-07, Frank Millman wrote: > After iterating over a sequence, the final element is still accessible. > In this case, the variable 'i' still references the integer 4. ... > Is this guaranteed in Python, or should it not be relied on? It is guaranteed, *except* if th

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
s that what you are using? If so, with which Python interfacing package? Are you using one of Python's math/stats packages to hold and analyse the data? Remember please that all-here are volunteers, and will find it easier to help you if you (first) help us to understand the pro

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
es of this Discussion List is that we enjoy a wide range of membership. It is not limited or even focussed on 'professionals, so 'ivory tower' members have no less to offer. Similarly, insight from ardent hobbyists who (effectively) pay to use Python! PS there is a Python-Tutor l

Re: Issues in downloading python

2020-07-17 Thread Daley Okuwa via Python-list
on linux or windows On Friday, 17 July 2020, 17:57:01 BST, Shanmika Sugavaneswaran wrote: Though I install the setup , I couldn’t find Python in my system . I don’t know what cause the problem. Please help me! Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986&g

Very Simple (Rather Dumb) Question

2020-07-27 Thread Romulus Schilling via Python-list
Hello, I have a quick, and most likely rather dumb begginer question on Python. It may be simple, but I'm completely new to Python, and to programming in general, so I'll go right to the point. My question is: I just downloaded the latest version of python, and started following a tutori

Re: Local access to a file, How To ?

2020-07-28 Thread DL Neil via Python-list
On 29/07/2020 08:56, Steve wrote: I have a python program that reads and writes to files that are all within the folder that contains the python program. There is now a second python program that is to be run to compile information in said files. I am having difficulty trying to call the local

Issue with Python installation for a beginner Python coder.

2020-07-30 Thread Sarvesh Poddar via Python-list
Hi, I re-installed Python in my Windows system as the earlier one was not able to import modules. But now I am not able to open IDLE after multiple tries.  Can you guys help me? I am a beginner and tried out a lot of solutions provided on the internet and it's just not getting fixed. Please

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

2020-07-31 Thread Jon Ribbens via Python-list
On 2020-07-31, Stefan Ram wrote: > You can write > >|>>> 1,+2, >|(1, 2) > > , but not > >|>>> (1,)+2, >|TypeError: can only concatenate tuple (not "int") to tuple > > . Why? (Python 3.9) For the obvious reason, as indicated by th

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

2020-07-31 Thread Jon Ribbens via Python-list
On 2020-07-31, Bart wrote: > Not sure about the trailing commas on each. It seems Python ignores > trailing commas on tuple constructors, so that the A,B, would be a > 2-tuple, and A+B, would have been a 1-tuple if A+B had been legal. It's not just tuples, it's lists, sets

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
9 "1,+2,", but not "(1,)+2," 9 9 EuroPython 2020: Data Science Track 10 8 Installing Python 3.8.3 with tkinter 11 8 The speed of glob() 12 8 Python Program Help 13 8 Re: Friday Finking: Limiting parameters

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

2020-08-01 Thread Sarvesh Poddar via Python-list
Hi, I am currently using Python 3.8.5 with IDLE environment that comes pre-installed with the Python application. I am using the book "An Introduction to computer science" by John Zelle as my reference. The problem I am facing is "There is a python program named "graphics.

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

2020-08-02 Thread Sarvesh Poddar via Python-list
. Unfortunately, I am not able to move ahead with my Python classes because of this, as it specifically asks to import the module before proceeding. I saved the file in tkinter folder now and receive the same problem, >>> import graphicsTraceback (most recent call last):  File "&quo

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
On WIndows 10, running Python programs in a DOS box, I would like one Python program to chain to another.  I.e. the first program to be replaced by the second (*not* waiting for the second to finish, as with e.g. os.system).  This doesn't seem a lot to ask, but so far I have been unable

Re: Program chaining on Windows

2020-08-23 Thread Rob Cliffe via Python-list
sys.exit()  and friends), without waiting for the second program to finish. So if I were "chaining" say to a .exe file, the Python interpreter would shut down immediately. In Chris' words, I want the second program to *replace* the first one. Barry, thanks for your suggestion:

Re: Program chaining on Windows

2020-08-24 Thread Rob Cliffe via Python-list
import os, sys     print("This is X1")     pid = os.spawnl(os.P_NOWAIT, "C:\\Python38\\python.exe", "C:\\Python38\\X2.py")     print(f"X1 got {pid=}")     sys.exit() but when I ran it, it displayed     This is X1     X1 got pid=... and then apparently s

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
Version 0.1.6 of Sarge, a cross-platform library which wraps the subprocess module in the standard library, has been released. What changed? - - Fixed #44: Added an optional timeout to Command.wait() and Pipeline.wait(), which   only takes effect on Python >= 3.3. - Fixed

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
k from tkinter import ttk import sys window = tk.Tk() window.title("Python Tkinter Text Box") window.minsize(600,400) def Submit(): label.configure(text= 'The new code is: ' + NewCode.get()) def ClickExit(): #This exit closes the program but the form remains and is st

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
On 2020-08-30, Chris Angelico wrote: >> I'm not even that makes sense, how 2 processes can share a thread ? >> > They can't. However, they can share a Thread object, which is the > Python representation of a thread. That can lead to confusion, and > possibly the OP

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
On 08/08/2020 18:18, Marco Sulla wrote: Thank you, some features are interesting, even if I prefer the Python syntax. What about the compiler? Is it better to "compile" to C or to bytecode? How can I generate a bytecode that can be compiled by gcc? Can I skip the AST generati

Module exists and cannot be found

2020-09-08 Thread James Moe via Python-list
python 3.6.10 opensuse tumbleweed linux 5.8.4 An old program based on Python (BackInTime) has recently been having difficulties functioning. See below. Module PyQt5 is most definitely installed. Apparently there is more to getting modules loaded than there used to be. (Also, I am not familiar

Re: [SOLVED] Module exists and cannot be found

2020-09-10 Thread James Moe via Python-list
On 9/8/20 10:35 PM, James Moe wrote: > Module PyQt5 is most definitely installed. Apparently there is more to getting > modules loaded than there used to be. > Cause: Operator Error The python installation had become rather messy resulting in the errors I showed. After installi

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
Hello All, I've been working with Perl a long time and recently started to use Python. I've been surprised by one behavior of Python. In Perl: ===PERL=== #!/usr/pkg/bin/perl use strict; if(4 == 4) { my $name = "Stephane"; print("$name\n" } print(&

Re: Use of a variable in parent loop

2020-09-26 Thread Stephane Tougard via Python-list
macs does not break the indentation during a copy paste or an indent-region ? > Aside from not breaking most every existing Python program? If block > scoped, one would have to add an otherwise useless fake declaration > before the block to use the name outside the block. Python tries t

Re: Use of a variable in parent loop

2020-09-27 Thread Stephane Tougard via Python-list
On 2020-09-27, [email protected] <[email protected]> wrote: > As ChrisA noted, Python almost always Just Works without declarations. > If you find yourself with a lot of global and/or nonlocal statements, > perhaps you're [still] thinking in a

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
language is a side issue. Whether you can use cut and paste properly is a similar side issue. Python chose indentation so you can remove lots of curly braces and often semi-colons that clutter other languages. There is a trade-off. In general, you can use superfluous symbols harmlessly such as curly

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
On 2020-09-27, Avi Gross wrote: > But when someone insists Python needs to > change to meet their preconception, I get less sympathetic. To clarify my question, I never asked that Python changes for me, I asked if there was any way to change Python's behavior by using a module or a co

Re: Use of a variable in parent loop

2020-09-27 Thread Stephane Tougard via Python-list
On 2020-09-27, Terry Reedy wrote: > emacs with python-mode has been and likely still is used by some > experienced python programmers. I have never seen anyone but a rank Yes, since I discovered that an empty has almost the same effect than a pass to end a block. > The 'pass&

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

Re: Use of a variable in parent loop

2020-09-28 Thread Stephane Tougard via Python-list
On 2020-09-27, Manfred Lotz wrote: > - http://localhost:2015/tutorial/controlflow.html#pass-statements ... > (In comparison to guys like ChrisA and StefanR and others here I am also > a Python beginner) To give me a pointer on your localhost, I could guess. -- https://mail.python.or

Re: Use of a variable in parent loop

2020-09-28 Thread Stephane Tougard via Python-list
r. And FYI, I've done this way since 25 years and I count a few good success in my career. Practically, my way of doing things works is at least as well as any. -- https://mail.python.org/mailman/listinfo/python-list

Re: Use of a variable in parent loop

2020-09-28 Thread Stephane Tougard via Python-list
ython.org/mailman/listinfo/python-list

Re: Use of a variable in parent loop

2020-09-28 Thread Stephane Tougard via Python-list
ets as well an empty line or a comment as a breaking point of a block, it's not as good as the use of pass because I still have to indent up manually, but at least the indent-region does not break it. -- https://mail.python.org/mailman/listinfo/python-list

python if and same instruction line not working

2020-09-29 Thread pascal z via Python-list
tmpstr == "file\n": csv_contentsC += x -- https://mail.python.org/mailman/listinfo/python-list

Problem

2020-09-29 Thread Ron Villarreal via Python-list
Tried to open Python 3.8. I have Windows 10. Icon won’t open. -- https://mail.python.org/mailman/listinfo/python-list

Re: Hot reload Flask app?

2020-10-01 Thread Roland Müller via Python-list
Nginx and Gevent on a recent Ubuntu system with Python 3.6. My strategy would be to gracefully stop Gevent [1], then do os.kill(os.getpid(), signal.SIGHUP). I have not yet tried this (not working today!). Just wondering if there are best practices. Thanks! Albert-Jan [1]

Re: python if and same instruction line not working

2020-10-04 Thread pascal z via Python-list
On Tuesday, September 29, 2020 at 5:28:22 PM UTC+2, MRAB wrote: > On 2020-09-29 15:42, pascal z via Python-list wrote: > > I need to change the script commented out to the one not commented out. Why? > > > > # for x in sorted (fr, key=str.lower): > > # t

Re: python show folder files and not subfolder files

2020-10-04 Thread pascal z via Python-list
On Thursday, September 24, 2020 at 4:37:07 PM UTC+2, Terry Reedy wrote: > On 9/23/2020 7:24 PM, pascal z via Python-list wrote: > > Please advise if the following is ok (i don't think it is) > > > > #!/usr/bin/env python3 > > # -*- coding: utf-8 -*- > >

Trying to Download PygameZero

2020-10-10 Thread Tom Hedge via Python-list
10, in main        deps = CFG.main(**kwds)      File "C:\Users\thedg\AppData\Local\Temp\pip-install-g9sb_mr0\pygame\buildconfig\config_win.py", line 576, in main        and download_win_prebuilt.ask(**download_kwargs):      File "C:\Users\thedg\AppData\Local\Temp\pip-install-g9sb_mr0\p

RE: Python's carbon guilt

2020-10-10 Thread Avi Gross via Python-list
, not very portably. The reality is that speed and other resource use do matter for anything run often or that would take a very long time. Languages like python and R acknowledge that and quite a few parts are now replaced by calls to libraries in other language or C/C++ code. But often that is done

Simple question - end a raw string with a single backslash ?

2020-10-13 Thread Tony Flury via Python-list
teral backslash characters The only solution I have found is to do this : >>> a = r'end' + chr(92) >>> a 'end\\' >>> list(a) ['e', 'n', 'd', '\\'] or >>> a = r'end\\'[:-1] >>> list(a) ['e', 'n', 'd', '\\'] Neither of which are nice. -- https://mail.python.org/mailman/listinfo/python-list

Re: Simple question - end a raw string with a single backslash ?

2020-10-15 Thread Roland Müller via Python-list
On 10/13/20 4:14 PM, Serhiy Storchaka wrote: 13.10.20 11:52, Tony Flury via Python-list пише: I am trying to write a simple expression to build a raw string that ends in a single backslash. My understanding is that a raw string should ignore attempts at escaping characters but I get this

Re: CLI parsing—with `--help` text—`--foo bar`, how to give additional parameters to `bar`?

2020-10-15 Thread Karen Shaeffer via Python-list
Hi Sam, I’ve been using abseil python API. https://abseil.io/docs/python/guides/flags <https://abseil.io/docs/python/guides/flags> https://abseil.io/docs/python/quickstart <https://abseil.io/docs/python/quickstart> It’s a distributed command line system with features that appea

Subprocess Connection Error

2020-10-17 Thread Dave Dungan via Python-list
Hello, I bought a book called Coding for Beginners to learn how to code using Python. The first few exercises went fine. When I got to the page called Recognizing types and did the exercise and saved it and tried to run the module it comes up with a Subprocess Connection Error. It says

Re: Simple question - end a raw string with a single backslash ?

2020-10-17 Thread Mladen Gogala via Python-list
middle, > the intended string is clearly visible. You can use perl module for python. It is installable by pip. Perl has no problems with handling backslashes. https://pypi.org/project/perl/ What you need is something like this: mgogala@umajor:~$ perl -e '$a="abcd";$a=~

Re: File Name issue

2020-10-17 Thread Mladen Gogala via Python-list
tor Try this: with open("HOURLY\-LOG.txt", 'r') as infile: -- Mladen Gogala Database Consultant http://mgogala.byethost5.com -- https://mail.python.org/mailman/listinfo/python-list

Re: File Name issue

2020-10-17 Thread Mladen Gogala via Python-list
._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd8 in position 897: invalid continuation byte However, that doesn't have anything to do with your problem. -- Mladen Gogala Database Consultant http://mgogala.byethost5.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Embedding version in command-line program

2020-10-17 Thread Tony Flury via Python-list
m not sure if that helps in your .toml file though - is it executed or does it have the ability to read files when it creates the distributable ? -- https://mail.python.org/mailman/listinfo/python-list

Re: MERGE SQL in cx_Oracle executemany

2020-10-17 Thread Mladen Gogala via Python-list
executemany with "cur3". > > And is "rows = [tuple(x) for x in df.values]" what you want? Print it. Obviously, the "PROJECT" column is causing the issue. NULL in Oracle database is never equal to anything. If :7 is NULL, your "not matched" condi

Re: File Name issue

2020-10-18 Thread Mladen Gogala via Python-list
On Sun, 18 Oct 2020 21:00:18 +1300, dn wrote: > On 18/10/2020 12:58, Mladen Gogala via Python-list wrote: >> On Sat, 17 Oct 2020 22:51:11 +, Mladen Gogala wrote: >>> On Sat, 17 Oct 2020 18:12:16 -0400, Steve wrote: >>> >>>> with open("HOURLYLOG.

Re: Simple question - end a raw string with a single backslash ?

2020-10-18 Thread Mladen Gogala via Python-list
On Sun, 18 Oct 2020 16:13:16 +0200, Peter J. Holzer wrote: > > Ah, I see, that the sillyness of Perl's grammar-altering modules (which > let you write Perl in Latin (with proper declensions and conjugations, > of course) or Chinese) has found its way to Python > To te

<    43   44   45   46   47   48   49   50   51   52   >