Re: Strings: double versus single quotes

2020-05-24 Thread DL Neil via Python-list
On 24/05/20 8:41 PM, Frank Millman wrote: On 2020-05-24 9:58 AM, DL Neil via Python-list wrote: On 24/05/20 5:43 PM, Frank Millman wrote: On 2020-05-23 9:45 PM, DL Neil via Python-list wrote: My habit with SQL queries is to separate them from other code, cf the usual illustration of having

Re: Custom logging function

2020-05-25 Thread DL Neil via Python-list
On 26/05/20 8:26 AM, [email protected] wrote: Hi, I have a case in which I have to use custom function for logging. For example, all messages should go to stderr and end with '\r\n'. Can I somehow use standard python logging module but send all message to stderr with '\r\n' line endings?

Re: Managing plug-ins

2020-05-25 Thread DL Neil via Python-list
On 26/05/20 11:35 AM, Benjamin Schollnick wrote: Did you ever find anything that met your requirements? If not, I have a prototype that I need to build out some more… https://github.com/bschollnick/PyPlugInMgr I use it for some home grown utilities, but it needs to be fleshed out some more…

Re: Behaviour of os.path.join

2020-05-26 Thread DL Neil via Python-list
On 27/05/20 5:23 AM, BlindAnagram wrote: On 26/05/2020 16:59, Mats Wichmann wrote: On 5/26/20 8:56 AM, BlindAnagram wrote: I came across an issue that I am wondering whether I should report as an issue. If I have a directory, say: base='C:\\Documents' and I use os.path.join() as follows:

Re: Behaviour of os.path.join

2020-05-27 Thread DL Neil via Python-list
... Again, a pathname is never inherently a directory or a file. See previous contribution: until YOU define YOUR arena of operations, it will be difficult to select the correct tool or library - or for others to assist you. If dealing with strings (which happen to look as if they are fil

Re: Access an object to which being bound

2020-05-27 Thread DL Neil via Python-list
@AR, On 28/05/20 8:41 AM, Chris Angelico wrote: On Thu, May 28, 2020 at 6:27 AM Abdur-Rahmaan Janhangeer wrote: Thanks, Actually i want to keep a reference from B to all A instantiated like in the case of z I have class A and i want to call class B via A You can have def x(self, *args, *

Re: Constructing mime image attachment

2020-05-28 Thread DL Neil via Python-list
On 28/05/20 11:48 PM, Joseph L. Casale wrote: I have some json encoded input for nodemailer (https://nodemailer.com/message/embedded-images) where the path key is a string value which contains the base64 encoded data such as: { html: 'Embedded image: ', attachments: [{ filen

Re: Python with text editor

2020-05-30 Thread DL Neil via Python-list
On 30/05/20 7:42 PM, Preetha M wrote: Hello. Thank you for responding to my previous mail. Can someone tell me how to connect python to sublime text 3. Whenever I select python and type the code, it does not work when I press ctrl+B. Please tell. ST is an editor/IDE which is not Python-specifi

Re: Format Logfile Name with logging.ini

2020-05-30 Thread DL Neil via Python-list
On 30/05/20 4:52 AM, [email protected] wrote: In an effort to clean up my python logging practices when creating libraries, I have begun reading into "Advanced Logging" and converting my logging practices into logging configuration `.ini` files: [link](https://docs.python.org/3.4/howto/

Re: [RELEASE] Python 3.9.0b1 is now available for testing

2020-06-01 Thread Joseph Jenne via Python-list
I used https://github.com/python/pyperformance pyperformance to compare Arch linux latest Python 3.8.3 (default, May 17 2020, 18:15:42) [GCC 10.1.0] on linux Type "help", "copyright", "credits" or "license" for more information. against a vanilla build (configure make makeinstall) of pyth

Re: Trouble with version 3.8

2020-06-01 Thread Jim Parinisi via Python-list
I had been using python 3.6 on two computers with windows 7 and windows 10.  We bought a windows 10 machine and I installed python 3.8 on it.  Many of my python apps failed with an error similar to this:  File "C:\Python38\lib\os.py", line 818, in fsdecode    filename = fspath(filename)  # Do

Re: Unsubscribe to python list

2020-06-03 Thread DL Neil via Python-list
On 4/06/20 4:59 PM, Meet Agrawal wrote: I want to unsubscribe from python list and would like to stop recieving mails from the same. At the bottom of your request (as reflected), this, and all over messages to the list is an administration link. At the foot of that web-page you will find a s

Re: Issues with Python

2020-06-03 Thread DL Neil via Python-list
On 4/06/20 2:22 PM, Kelley Hudson wrote: Keep getting an error when trying to us Python with Pycharm. I uninstalled it but this was the error I received. Sent from [1]Mail for Windows 10 References Visible links 1. https://go.microsoft.com/fwlink/?LinkId=550

Friday Finking: Imports, Namespaces, Poisoning, Readability

2020-06-04 Thread DL Neil via Python-list
How do you prefer to balance all of the above when import-ing? Python offers a number of options for importing modules, eg import module, ... from importable import object, ... most of which can be augmented with the "as preferred_name" syntax. (ignoring the much-reviled "*" (import ev

Re: Can't download Pygame and Pgzero

2020-06-05 Thread Lily Sararat via Python-list
To whom it may concern, I have trouble installing the Pygame and Pgzero on Window.  I based on the instruction on the "Computer Coding Python Games for Kids" by Carol Vorderman.  Nothing works.   I tried Python 3.6.2 as describe in the book and the latest version 3.8.3 still encounter on the

Re: Can I have a class with property named "from"

2020-06-05 Thread DL Neil via Python-list
On 6/06/20 9:36 AM, [email protected] wrote: Hi, if I define class like this one: class abc: def __init__(self): self._from = None @property def from(self): return self._from @from.setter def from(self, value): self._from = value I get

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 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, Python tries to be helpful by providing a "traceback". Please copy-paste the entire tra

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
On 2020-06-09 09:00, [email protected] wrote: Well the problem that I am facing with is, that I have to establish interface between python and outer system. Original question was about creation of input object (data that I have received from outer system). If I accept recommendation to use

Re: repair modify uninstall

2020-06-10 Thread DL Neil via Python-list
On 10/06/20 11:26 PM, Silvia Aminul wrote: I tried installing Python for windows 10 (the latest version of python for windows ) And after downloading and trying to launch it keeps saying repair modify uninstall I tried looking for solution and it was suggested I might have do

Re: Turning pygame apps into add-ons

2020-06-10 Thread DL Neil via Python-list
On 11/06/20 1:32 AM, elisha hollander wrote: I have a folder with my pygame apps, I want to build a program to have a nice interface to access those apps from, I want it to be like an actual computer, so, I need it to open the apps as rect of something not as external apps. Is there a way to do i

Re: Syntax Help

2020-06-10 Thread DL Neil via Python-list
On 11/06/20 4:56 AM, John Weller wrote: I am trying to learn python. Looking at an example on the web I found this line: def plot(*args, **kwargs): What do the stars mean? The Python "docs" are (surprisingly, for this day-and-age) comprehensive. Try https://docs.python.org/3/tutorial/control

Re: Syntax Help

2020-06-11 Thread DL Neil via Python-list
On 12/06/20 12:13 AM, Terry Reedy wrote: On 6/11/2020 6:03 AM, John Weller wrote: I have been able to find answers to most problems by Googling but couldn't work out a suitable query for this one. That is why I and others have made the Symbols index as complete as possible.  If anything think

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

2020-06-11 Thread DL Neil via Python-list
On 12/06/20 8:51 AM, [email protected] wrote: Hi, If I run this code: class Property: def __init__(self, var: int): self.a: int = var @property def a(self): return self.__a @a.setter def a(self, var: int): if var > 0 and var % 2 == 0:

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

2020-06-11 Thread DL Neil via Python-list
On 12/06/20 9:32 AM, [email protected] wrote: OK, as I can see nothing is enforced but I can use mypy and tests for the purpose. Exactly! Well done - Python uses 'duck typing' and thus when the Typing module was added, it became an option. As mentioned elsewhere, it provides "hints" at 'co

Friday Finking: Beyond implementing Unicode

2020-06-11 Thread DL Neil via Python-list
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 opportunities to make computer programming more math-familiar and/or more logically-expressive, and thus easier to

Re: pyinstaller

2020-06-12 Thread DL Neil via Python-list
On 13/06/20 3:09 AM, Robin Becker wrote: On 11/06/2020 16:39, Grant Edwards wrote: the hands of the developer.  I suppose the OP could quit and stand on the street corner with a cardboard sign: I would love to do that :) Of possible interest to folk interested in this thread: Recently came a

Re: Python database compatibility

2020-06-12 Thread DL Neil via Python-list
On 13/06/20 8:49 AM, Siddharth Joshi wrote: I am new in Python world and would like to use it for one of the our purpose . Before that, I would like to ask if Python has compatibility with ENSCRIBE database . Enscribe database (file structured) is the native database of HP NonStop (Tandem) serve

Re: change surface

2020-06-13 Thread DL Neil via Python-list
On 13/06/20 10:40 PM, Bischoop wrote: I'm playing with pygame, https://bpa.st/6GOQ Not sure what is wrong here that object moves but draws another surface. (not sure how many will click on a link like that - best to copy-paste code into (text) email message) The most usual reason for 'l

Python Curses Programming HowTo -reviewers?

2020-06-16 Thread Alan Gauld via Python-list
While studying the curses module I was struck by the paucity of tutorial documentation for the Python version. Fortunately I know C and used to write curses applications back in the 80s/90s so I turned to the C tutorials. However, there are quite a lot of differences between the Python wrapper imp

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
There was a recent thread on python-ideas discussing this.  It started with arrow characters.  There have been others. Am pleased to hear that it's neither 'new' nor 'way out there'... Am not subscribed to that list. Went looking for its archives, but failed - there's no "ideas" on (https://

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
On 16/06/2020 19:34, Karsten Hilbert wrote: >> I therefore took it on myself to do a translation of the Linux >> Documentation Project's "Curses HowTo" by Pradeep Padala into Python. >> >> This is now available as a PDF and I'd be interested in review comments. > > I'd be interested in having a lo

Re: problem at the time of using editor

2020-06-18 Thread DL Neil via Python-list
On 18/06/20 10:20 PM, Sourav Kundu wrote: when I am using the editor to write a long program and trying to run it the python command line showing it syntax error Of possible interest:- Why SuperHELP for Python? | pssst Search domain p-s.co.nz/wordpress/why-superhelp-for-python/p-s.co.nz/wordpr

Re: How to test?

2020-06-19 Thread Tony Flury via Python-list
On 24/04/2020 19:40, Manfred Lotz wrote: I have a command like application which checks a directory tree for certain things. If there are errors then messages will be written to stdout. How to test this in the best way? One idea was for the error situations to write messages to files and then

Re: Floating point problem

2020-06-23 Thread Tony Flury via Python-list
On 18/04/2020 15:29, Grant Edwards wrote: On 2020-04-18, Souvik Dutta wrote: I literally tried it!!! And it did not stop because I did not get any 1.0 rather I got 0.999 But why does this happen. This is a simple math which according to normal human logic should give perfect numbers w

ANN: distlib 0.3.1 released on PyPI

2020-06-27 Thread Vinay Sajip via Python-list
I've recently released version 0.3.1 of distlib on PyPI [1]. For newcomers, distlib is a library of packaging functionality which is intended to be usable as the basis for third-party packaging tools. The main changes in this release are as follows: * Fixed #132: Added documentation to help with

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
On 29/06/20 6:01 AM, [email protected] wrote: Datepicker is returning two different types. before date change its and after change its Well done! When it is printed, the date probably makes sense (to us), and the debug-print has given you the opportunity to make sure the data is exa

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
On 30/06/20 5:14 AM, joseph pareti wrote: I have piece of code with constructs as follows: *class* *SentimentNetwork**:* *def* __init__*(*self*,* reviews*,* labels*,* hidden_nodes *=* 10*,* learning_rate *=* 0.1*):* np*.*random*.*seed*(*1*)* self*.*init_network*(**len**(*s

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 sur

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

2020-07-02 Thread Jon Ribbens via Python-list
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 would conflate an > author's name with some kind of race-related thing is a bit > embarrassing, frankly. She didn't - you did. -- ht

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

2020-07-03 Thread Jon Ribbens via Python-list
On 2020-07-03, Rhodri James wrote: > On 02/07/2020 23:46, Random832 wrote: >> On Thu, Jul 2, 2020, at 18:29, Michael Torrie wrote: >>> Come again? I can see no other link in the verbage with the >>> "relics of white supremacy" that she referred to. If there are >>> other links, they should be in

New to python - Just a question

2020-07-03 Thread Daley Okuwa via Python-list
Please can someone help Write an algorithm (choose the language you prefer) that given a character string, for instance {‘c’,’a’,’i’,’o’,’p’,’a’}, will print out the list of characters appearing at least 2 times. In this specific example, it would return {‘a’}. Afterwards, comment out the cost

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 computer programmi

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 have

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 8:36 PM Adam Funk wrote: >> Is there a "bulletproof" version of json.dump somewhere that will >> convert bytes to str, any other iterables to list, etc., so you can >> just get your data into a file & keep working? > > That's the PHP d

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 experimentation, that is not suit

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
On 2020-07-06, Chris Angelico wrote: > I think that even in non-strict mode, round-tripping should be > achieved after one iteration. That is to say, anything you can > JSON-encode will JSON-decode to something that would create the same > encoded form. Not sure if there's anything that would viol

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 the sequence is empty an

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
On 11/07/20 8:34 PM, [email protected] wrote: Any suggestions please Clarify the requirements, rather than starting with a 'solution'. Communicate the constraints, eg what is already in-place. "vlookup" has particular meaning in worksheet/spreadsheet packages. Is that what you are usin

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
On 12/07/20 9:46 AM, Christman, Roger Graydon wrote: I'll preface this by saying I am a programming instructor who still teaches from the ivory tower, so may not necessarily reflect actual practice in industry. ...in which case I will preface my response by saying that one of the virtues of th

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 for Window

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 tutorial I found

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 help.

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 the error message? What are you expecting these expressions to

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, dictionaries, etc. I

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

2020-08-01 Thread The Doctor via Python-list
87 1 Mathiyazhagan S 88 1 Elias Fotinis Mozilla 89 1 ??? Gnus 90 1 Oscar Benjamin 91

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

2020-08-01 Thread The Doctor via Python-list
XanaNews Statistic for comp.lang.python. 8/1/2020 7:48:48 AM >From article 581998 (7/1/2020 6:44:35 AM) to article 582636 (7/31/2020 8:24:06 PM) Number of threads ... 318 Number of articles .. 674 Average articles per thread . 2.12 Number of unanswered

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
> On Aug 18, 2020, at 6:13 PM, Richard Damon wrote: > > On 8/18/20 7:34 PM, [email protected] wrote: >> I would also caution against relying on the idea of human rights when >> defending against accusations of being political, since they too are >> political. Life is political. We continue to

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

2020-08-19 Thread Brian Oney via Python-list
On August 19, 2020 7:32:45 PM GMT+02:00, J Conrado wrote: > > >Hi, > > >I'm satarting using Pandas to read excel. I have a meteorological >synoptic data and I have for date: > > >0   2017-11-01 00:00:00 >1   2017-11-01 03:00:00 >2   2017-11-01 06:00:00 >3   2017-11-01 09:00:00 >4   2017-11-01

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

2020-08-19 Thread Karen Shaeffer via Python-list
> On Aug 19, 2020, at 8:47 AM, Tim Daneliuk wrote: > > On 8/19/20 8:35 AM, Alexandre Brault wrote: >> I've not seen anyone objecting to the idea of removing the reference to >> Strunk and White in favour of the underlying message of "be understandable >> by others who may read your comments"

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 to so t

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
On 24/08/2020 00:08, Eryk Sun wrote: For Windows, we need to spawn, wait, and proxy the exit status. Sorry, I understand very little of this.  Here's where I get stuck:     (1) "*spawn*": I see that there are some os.spawn* functions.  I tried this:     # File X1.py     import os, sys    

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 #47: Added

Re: Program chaining on Windows

2020-08-24 Thread Rob Cliffe via Python-list
On 24/08/2020 13:20, Eryk Sun wrote: You can work with job objects via ctypes or PyWin32's win32job module. I can provide example code for either approach. No need, I'm already convinced that this is not the way for me to go. from the DOS prompt, it works as expected. You're not running D

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
Hi Steve, > On 28 Aug 2020, at 11:03, Steve wrote: > > > The following program compiles but does not quite do what I would like it to > do. Line 19 is the preset information but I do not seem to be able to get it > into the form by code. My purpose is to let the user make changes without > hav

Re: Error in lambda function..!

2020-08-29 Thread Rob Cliffe via Python-list
On 29/08/2020 08:58, Shivlal Sharma wrote: from functools import* nums = [1, 2, 3, 4, 5, 6, 7, 8, 9] add = reduce(lambda a : a + 1, nums) print(add) error: - TypeError Traceback (most recent call last) in () 1 from functools import* 2 nums = [1, 2

Re: Threading plus multiprocessing plus cv2 error

2020-08-29 Thread Stephane Tougard via Python-list
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 the same > thread and all that entails (if it doesn't overlay the forked process with > a new executable, they a

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's error (I don't know for sure,

Re: Threading plus multiprocessing plus cv2 error

2020-08-30 Thread Stephane Tougard via Python-list
On 2020-08-30, Barry wrote: >* The child process is created with a single thread—the one that > called fork(). The entire virtual address space of the parent is > replicated in the child, including the states of mutexes, > condition variables, and other pthr

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 generation for now, o

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 wi

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 installing python correc

python oop learning communication between function inside a class

2020-09-17 Thread pascal z via Python-list
Hello, I would like to know how possible it is to call a member function from a class and pass it a variable Example: class Application(tk.Frame): """docstring for .""" def __init__(self, parent): super(Application, self).__init__(parent) self.parent = parent par

RE: Puzzling difference between lists and tuples

2020-09-20 Thread Avi Gross via Python-list
There is a simple and obvious way to make sure you have a tuple by invoking the keyword/function in making it: >>> a=('first') >>> type(a) >>> a=("first",) >>> type(a) >>> a=tuple("first") >>> type(a) That seems more explicit than adding a trailing comma. It also is a simple way to make an

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
Hello, I'm working on a script where I want to loop into folders somehow recursively to get information but I want to limit the infos for the files on a certain level of folders for example: /home/user/Documents/folder1 /home/user/Documents/folder2 /home/user/Documents/folder3/folder1/file1 /hom

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