Re: The slash "/" as used in the documentation

2019-02-10 Thread Terry Reedy
On 2/10/2019 10:47 AM, Ian Kelly wrote: On Sat, Feb 9, 2019 at 1:19 PM Terry Reedy wrote: This is the result of Python being a project of mostly unpaid volunteers. See my response in this thread explaining how '/' appears in help output and IDLE calltips. '/' only a

Re: My appreciation for python's great work to my country.

2019-02-09 Thread Terry Reedy
On 2/8/2019 4:37 AM, Kiyimba Godfrey wrote: I take this opportunity to thank python for having designed such a wonderful program which has enabled computer scientists and programmers in my country Uganda, understand, design and create other computer application programs . You're welcome, and

Re: The slash "/" as used in the documentation

2019-02-09 Thread Terry Reedy
On 2/9/2019 2:10 PM, Piet van Oostrum wrote: Christian Gollwitzer writes: __import__( 'sys' ).version '3.6.1 |Anaconda 4.4.0 (x86_64)| (default, May 11 2017, 13:04:09) \n[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]' help( __import__( 'math' ).sin ) Help on built-in function sin

Re: The sum of ten numbers inserted from the user

2019-02-09 Thread Terry Reedy
On 2/9/2019 4:23 AM, Christian Gollwitzer wrote: Am 08.02.19 um 09:58 schrieb ^Bart: A colleague did: total=0 for n in range(10): n= int(input("Enter a number: ")) Here, you are reusing "n" for two different things: 1. The loop index, indicating which number you ask for 2. The number en

Re: The slash "/" as used in the documentation

2019-02-09 Thread Terry Reedy
On 2/9/2019 8:29 AM, Piet van Oostrum wrote: r...@zedat.fu-berlin.de (Stefan Ram) writes: The slash »/« as used in the documentation f( x, /, y ) is so ugly, it will disappear. Especially since it consumes a comma as it it was a parameter itself. Possible alternatives include:

Re: cant use def command

2019-02-02 Thread Terry Reedy
On 2/1/2019 10:49 AM, mb1541def 0 wrote: Hello, I need help on the def command. My script: Import os Test def Test(): print(“test”) os.system(“pause”) someone please help,it gives me an error in python 3. The python authors already did by providing you with a traceback that explains what

Re: Trying to figure out the data type from the code snippet

2019-01-31 Thread Terry Reedy
On 1/31/2019 3:31 PM, Chupo via Python-list wrote: In article , Chris Angelico says... There are stupid questions, but I enjoy answering those too. You don't need to apologize for asking these questions. All you need to do is ignore the trolls like Rick. In fact, if you abandon Google Groups an

Re: How to replace space in a string with \n

2019-01-31 Thread Terry Reedy
On 1/31/2019 1:36 PM, Grant Edwards wrote: On 2019-01-31, Grant Edwards wrote: On 2019-01-31, Terry Reedy wrote: On 1/31/2019 11:19 AM, Ian Clark wrote: text = "The best day of my life!" output = '' for i in text: if i == ' ': output +='\n'

Re: How to replace space in a string with \n

2019-01-31 Thread Terry Reedy
On 1/31/2019 11:19 AM, Ian Clark wrote: text = "The best day of my life!" output = '' for i in text: if i == ' ': output +='\n' else: output += i print(output) throwing my hat in the ring, not only is it .replace free it is entirely method free But this is an awful, O(n*n) way to s

Re: List of methods affected by 'Special method lookup'

2019-01-28 Thread Terry Reedy
On 1/28/2019 11:14 AM, Roberto Martínez wrote: Hi, the documentation about Special method lookup claims: "For custom classes, implicit invocations of special methods are only guaranteed to work correctly if defined on an

Re: Problem in Installing version 3.7.2(64 bit)

2019-01-27 Thread Terry Reedy
On 1/26/2019 6:24 AM, Vrinda Bansal wrote: Dear Sir/Madam, After Installation of the version 3.7.2(64 bit) in Windows 8 when I run the program it gives an error. Screenshot of the error is attached below. Nope. This is text only mail list. Images are tossed. You must copy and paste. -- T

Re: Exercize to understand from three numbers which is more high

2019-01-25 Thread Terry Reedy
On 1/25/2019 6:56 AM, ^Bart wrote: number1 = int( input("Insert the first number: ")) number2 = int( input("Insert the second number: ")) number3 = int( input("Insert the third number: ")) if number1 > number2 and number1 > number3:     print("Max number is: ",number1) if number2 > number1 a

Re: How to find files with a string

2019-01-09 Thread Terry Reedy
On 1/9/2019 11:29 AM, anton.gridus...@gmail.com wrote: I need to find a file, that contains a string TeNum IDLE's 'Find in Files' is a mid-level grep with GUI interface. The code is in idlelib/grep.py if you want to copy code. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinf

Re: System printer object

2019-01-07 Thread Terry Reedy
On 1/7/2019 5:17 PM, Dave wrote: I need to print to one or both of my system printers.  I have not found a printer object in Python or in Tkinter.  This needs to work with Linux, Window, and Mac.  Can someone point me in the right direction? Ultimately, I want to have a File/Print in the menu t

Re: Deletion of Environmental Variables

2019-01-06 Thread Terry Reedy
On 1/6/2019 9:56 PM, Logan Vogelsong wrote: I planned on using python to simulate different cipher to challenge myself, but I kinda deleted my environmental variables to python. I run Windows 10 and wanted to get NumPy and MatPlotLib modules imported to python. Basically, I downloaded python 3.7

Re: Compilation

2019-01-06 Thread Terry Reedy
On 1/6/2019 6:20 PM, Avi Gross wrote: I suspect there is some python tool that can go through a directory structure of python code and produce appropriate byte code files in one sweep. import compileall help(compileall) The Windows installer optionally runs it. It is usually needed if one d

Re: Type hinting of Python is just a toy ?

2019-01-04 Thread Terry Reedy
On 1/4/2019 4:04 AM, iamybj--- via Python-list wrote: In fact, there is only 3 types in all prigramming languages. 'Category' would be a better term. Better said might be: "One can usefully group types/classes of values/objects into 3 categories." Primitive type: int, string, bool, char...

Re: Ask for help about class variable scope (Re: Why doesn't a dictionary work in classes?)

2018-12-27 Thread Terry Reedy
On 12/26/2018 9:53 PM, jf...@ms4.hinet.net wrote: I saw the code below at stackoverflow. I have a little idea about the scope of a class, and list comprehension and generator expressions, but still can't figure out why Z4 works and Z5 not. Can someone explain it? (in a not-too-complicated way:

Re: Rate limiting a web crawler

2018-12-26 Thread Terry Reedy
On 12/26/2018 10:35 AM, Simon Connah wrote: Hi, I want to build a simple web crawler. I know how I am going to do it but I have one problem. Obviously I don't want to negatively impact any of the websites that I am crawling so I want to implement some form of rate limiting of HTTP requests

Re: Why doesn't a dictionary work in classes?

2018-12-25 Thread Terry Reedy
On 12/25/2018 7:45 AM, אורי wrote: Why does this not work: class User(ValidateUserPasswordMixin, PermissionsMixin, Entity, AbstractBaseUser): GENDER_UNKNOWN = 0 > ... Indent needed here. I presume you used tabs, which disappeared in transmission, but I cannot cut and paste to run this. -

Re: Decoding a huge JSON file incrementally

2018-12-20 Thread Terry Reedy
On 12/20/2018 10:42 AM, Paul Moore wrote: I'm looking for a way to incrementally decode a JSON file. I know this has come up before, and in general the problem is not soluble (because in theory the JSON file could be a single object). AFAIK, a JSON file always represents a single JSON item and

Re: No connection

2018-12-16 Thread Terry Reedy
On 12/16/2018 9:40 AM, Vasilis Mytilinaios wrote: Hello, I'm trying to open the interactive shell but it doesn't let me. It says that IDLE's subprocess didn't make connection. Read the doc section on possible reasons. https://docs.python.org/3/library/idle.html#startup-failure -- Terry Jan

Re: Creating type evaluation annotation

2018-12-09 Thread Terry Reedy
On 12/9/2018 11:37 AM, Jon Ribbens wrote: On 2018-12-09, Marek Mosiewicz wrote: I'm talking about this https://docs.python.org/3/library/typing.html I'm not talking about new language. I think it could be nice to have standard PEP annotations for classes to make type validation or type hints w

Re: Creating type evaluation annotation

2018-12-06 Thread Terry Reedy
On 12/6/2018 5:48 AM, Marek Mosiewicz wrote: I'm Java developer,but had some experience with Python based ERP software. It is quite serious application and I feel unconfortable with not having type checking. I do not say language should be static, but having checking method signature is big win.

Re: Error Python version 3.6 does not support this syntax.

2018-11-27 Thread Terry Reedy
On 11/27/2018 8:24 AM, Frank Millman wrote: In the line 'return None',  it may be complaining that None is superfluous - a plain 'return' does the same thing. PEP 8 recommends explicit 'return None' if elsewhere in the function there is an explicit 'return something', as in if condition

Re: Error Python version 3.6 does not support this syntax.

2018-11-27 Thread Terry Reedy
On 11/27/2018 7:50 AM, srinivasan wrote: Dear Python Experts, As still I am newbie and learning python, I am trying to reuse the Bluetoothctl wrapper in Python from the link ( https://gist.github.com/egorf/66d88056a9d703928f93 Created in 2015 ) I am using python3.6 version, In pycharm editor

Re: Question about the definition of the value of an object

2018-11-19 Thread Terry Reedy
On 11/19/2018 9:08 AM, Iwo Herka wrote: Hello everyone, I've been looking for something in the documentation (https://docs.python.org/3.8/reference/datamodel.html) recently and I've noticed something weird. Documentation states that every object has a value, but doesn’t provide any definition wh

Re: IDLE Default Working Directory

2018-11-15 Thread Terry Reedy
On 11/13/2018 9:04 PM, Christman, Roger Graydon wrote: On 13 Nov 2018, at 09:51, Bev in TX wrote: On Nov 12, 2018, at 5:50 PM, Terry Reedy wrote: For me, open (command-O) opens 'Documents'. I presume it should be easy enough to move into a 

Re: IDLE Default Working Directory

2018-11-12 Thread Terry Reedy
On 11/12/2018 7:15 PM, Thomas Jollans wrote: On 13/11/2018 00:45, Terry Reedy wrote: On Windows, a simple alternate is a .bat file.  I belive the folloiwing should work. cd c:/desired/startup/directory py -x.y -m idlelib The default for x.y is latest 3.x or latest 2.x if no 3.x. Correct me

Re: IDLE Default Working Directory

2018-11-12 Thread Terry Reedy
On 11/12/2018 10:35 AM, Bev in TX wrote: On Nov 12, 2018, at 9:16 AM, eryk sun wrote: On 11/12/18, Christman, Roger Graydon mailto:d...@psu.edu>> wrote: I looked in IDLE's own configuration menu, and didn't see anything there -- and I fear that I might have to fight some Windows settings so

Re: IDLE Default Working Directory

2018-11-12 Thread Terry Reedy
On 11/12/2018 2:28 PM, eryk sun wrote: On 11/12/18, Christman, Roger Graydon wrote: eryk sun responded: On 11/12/18, Christman, Roger Graydon wrote: I looked in IDLE's own configuration menu, and didn't see anything there -- and I fear that I might have to f

Re: Number 7 syntax ERROR

2018-11-08 Thread Terry Reedy
On 11/7/2018 8:52 PM, NoHaxAllSwagg wrote: I have been experiencing difficulty while trying to run scripts on my IDLE software, considering that when I run my program, I get an error at the top of the page in the “Python 3.7.1” area, highlighting the seven telling me that there is a syntax er

Re: int.to_bytes() for a single byte

2018-11-06 Thread Terry Reedy
On 11/6/2018 9:30 PM, jlada...@itu.edu wrote: b = i.to_bytes(1, "big") Is there another function which provides a more logical interface to this straightforward task? Yes >>> 33 .to_bytes(1, 'big') b'!' >>> bytes((33,)) b'!' See >>> bytes( # in IDLE or >>> help(bytes) -- Terry Jan Reedy

Re: UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 10442: character maps to

2018-10-20 Thread Terry Reedy
On 10/20/2018 8:24 AM, pjmcle...@gmail.com wrote: On Saturday, October 13, 2018 at 7:24:14 PM UTC-4, MRAB wrote: i have a sort of decode error UnicodeDecodeError; 'utf-8' can't decode byte 0xb0 in position 83064: invalid start byte * and it seems to refer to my code line:

Re: PEP 394

2018-10-20 Thread Terry Reedy
On 10/19/2018 3:03 AM, Anders Wegge Keller wrote: Short and simple: Do you expect PEP 394 to change status or recommendation when official support for Python2 ends in 13½ months time, or at least some time thereafter? For those that don't have the habit of memorizing PEPs, 394 is the one stating

Re: Overwhelmed by the Simplicity of Python. Any Recommendation?

2018-10-12 Thread Terry Reedy
On 10/12/2018 1:06 PM, Chris Angelico wrote: There are many many different ways to write code, and you can approach your coding challenges from all sorts of directions. My recommendation is: Pseudo-code first, then implement in actual Python. https://en.wikipedia.org/wiki/Pseudocode Note how,

Re: Python doesn't install

2018-10-10 Thread Terry Reedy
On 10/10/2018 9:53 AM, daankahman...@gmail.com wrote: I have an annoying problem, I can download Python (from python.org) but it won't install on my laptop. If I try to open the installer, it closes again. I also don't get a error message. I'm using windows 10. I already tried most of the obv

From Mathematica to Jypyter

2018-10-09 Thread Terry Reedy
https://paulromer.net/jupyter-mathematica-and-the-future-of-the-research-paper/ Jupyter, Mathematica, and the Future of the Research Paper Paul Romer, new Nobel prize winner in economics, for research on how ideas interact with economic growth, explained last April why he has switched from Mathe

Re: Python indentation (3 spaces)

2018-10-07 Thread Terry Reedy
On 10/7/2018 2:35 PM, Ryan Johnson wrote: The logic is that all the text editors that are designed to work with Python code will KNOW to replace tab input with 3 characters, while still parsing the \t tab character as 4 characters; What do you mean by 'parsing a tab character as 4 characters

Re: Python indentation (3 spaces)

2018-10-07 Thread Terry Reedy
On 10/5/2018 4:48 PM, ts9...@gmail.com wrote: I am new to Python programming but have significant SQL and C experience. My simple question is,"Why not standardize Python indentations to 3 spaces instead of 4 in order to avoid potential programming errors associated with using "TAB" instead

Re: Python indentation (3 spaces)

2018-10-07 Thread Terry Reedy
On 10/5/2018 11:30 PM, Ryan Johnson wrote: The point that OP is trying to make is that a fixed standard that is distinguishable from the even-spacing Tab-length convention in code and text editors will establish a level of trust between the end developer and upstream developers or co-developers w

Re: Python indentation (3 spaces)

2018-10-07 Thread Terry Reedy
On 10/6/2018 3:47 PM, C W Rose via Python-list wrote: Ryan Johnson wrote: The point that OP is trying to make is that a fixed standard that is distinguishable from the even-spacing Tab-length convention in code and text editors will establish a level of trust between the end developer and upstr

Re: Python indentation (3 spaces)

2018-10-05 Thread Terry Reedy
On 10/5/2018 4:48 PM, ts9...@gmail.com wrote: I am new to Python programming but have significant SQL and C experience. My simple question is,"Why not standardize Python indentations to 3 spaces instead of 4 in order to avoid potential programming errors associated with using "TAB" instead

Re: problem

2018-10-04 Thread Terry Reedy
On 10/4/2018 6:05 AM, Rémy Dpx wrote: Hello, I’ve got a problem with my Python. What OS?, What Python version? Indeed my Idle act like if my ctrl button were always pushed ( when i press Q, it selects everything ; On all built-in keysets, Control-Q is bound to 'close-all-windows', which i

Re: Calling an instance method defined without any 'self' parameter

2018-10-04 Thread Terry Reedy
On 10/4/2018 4:25 AM, Ibrahim Dalal wrote: class A: def foo(): print 'Hello, world!' a = A()print A.foo # print a.foo # >print type(A.foo) # a.foo() # TypeError: foo() takes no arguments (1 given) A.foo() # TypeError: unbound method foo() must be ca

Re: Multiple problems with Python 3.7 under Windows 7 Home Premium

2018-09-21 Thread Terry Reedy
On 9/21/2018 8:57 PM, MRAB wrote: On 2018-09-22 01:02, Michael Torrie wrote: On 09/21/2018 07:22 AM, Spencer Graves wrote: PYTHON - M PIP INSTALL PYAUDIO    "python -m pip install pyaudio" stopped with 'error: Microsoft visual C++14.0 is required.  Get it with "Microsoft Visual C++ Build

Re: Pass a list of values as options to 3 dropdown menus

2018-09-04 Thread Terry Reedy
On 9/4/2018 1:03 PM, Peter Pearson wrote: On Sun, 2 Sep 2018 13:40:18 -0700 (PDT), Nick Berg wrote: how can i be able to store a list of values to drop-down menu and then grab the value that the user selects? In a python program, use one of the gui packages. Tkinter usually comes with python

Re: Shall I worry about python2/3 compatibility when using library?

2018-08-30 Thread Terry Reedy
On 8/30/2018 10:27 PM, Stone Zhong wrote: Hi there, I think the fact is: - There are still considerable amount of people still using python2 - Python2 user will eventually upgrade to python3 So any library not written in a compatible way will either break now for python2 user, or will break in

Re: __init__ patterns

2018-08-30 Thread Terry Reedy
On 8/30/2018 9:43 AM, Steven D'Aprano wrote: On Thu, 30 Aug 2018 06:01:26 -0700, Tim wrote: I saw a thread on reddit/python where just about everyone said they never put code in their __init__ files. Pfft. Reddit users. They're just as bad as Stackoverflow users. *wink* Here's a stackoverf

Re: python 2 urlopen vs python 3 urlopen

2018-08-27 Thread Terry Reedy
On 8/27/2018 1:25 PM, Sean Darcy wrote: python 2 : python Python 2.7.15 (default, May 15 2018, 15:37:31) . import urllib2 res = urllib2.urlopen('https://api.ipify.org').read() print res www.xxx.yyy.zzz In Python 2, this is the printed representation of a bytestring. python3 python3 Py

Re: Path-like objects in the standard library

2018-08-24 Thread Terry Reedy
On 8/24/2018 5:28 AM, Paul Moore wrote: On Fri, 24 Aug 2018 at 09:57, Torsten Bronger wrote: Hallöchen! Path-like objects are accepted by all path-processing functions in the standard library since Python 3.6. Unfortunately, this is not made explicit everywhere. In particular, if I pass a P

Re: Is pypi the best place to find external python packages?

2018-08-21 Thread Terry Reedy
On 8/21/2018 11:48 AM, Jeff M wrote: are there other places also? On pypi I did not see anywhere the status of defects or downloads, if it's actively supported. There is another good place for packages that need Windows binaries. For this and previous post, most information from you can allo

Re: Project Structure for Backend ETL Project

2018-08-21 Thread Terry Reedy
On 8/21/2018 11:46 AM, Jeff M wrote: Is this a good example to follow for a project that does mostly python to interact with external data sources including files, transformation, and import into Postgres? https://github.com/bast/somepackage AFAIK, the recommendations in the README are a pla

Re: How to pass Python command line options (vs arguments) when running script directly vs via Python interpreter?

2018-08-14 Thread Terry Reedy
On 8/14/2018 5:45 PM, Malcolm Greene wrote: When you run a script via "python3 script.py" you can include command line options like -b, -B, -O, -OO, etc between the "python3" interpreter reference and the script.py file, eg. "python3 -b -B -O -OO script.py". More generally, python script.py

Re: Pylint false positives

2018-08-14 Thread Terry Reedy
On 8/14/2018 5:05 AM, Thomas Jollans wrote: On 2018-08-14 09:38, Frank Millman wrote: Hi all Pylint is flagging a lot of lines as errors that I would consider to be acceptable. I have an abstract class ClassA with a number of concrete sub-classes. ClassA has a method which invokes 'self.method

Re: Dealing with errors in interactive subprocess running python interpreter that freeze the process

2018-08-02 Thread Terry Reedy
On 8/2/2018 3:52 PM, cseber...@gmail.com wrote: subprocess is not meant for interaction through the pipes. That is why, I have been told, IDLE uses a socket for interaction. Multiprocess is apparently better suited for interaction without resorting to a socket. So use normal socket on local

Re: Dealing with errors in interactive subprocess running python interpreter that freeze the process

2018-08-01 Thread Terry Reedy
On 8/1/2018 4:11 PM, cseber...@gmail.com wrote: I can run python3 interactively in a subprocess w/ Popen but if I sent it text, that throws an exception, the process freezes instead of just printing the exception like the normal interpreter.. why? how fix? Here is my code below. (I suspect when

Re: Using Python on a fork-less POSIX-like OS

2018-07-29 Thread Terry Reedy
On 7/29/2018 10:28 AM, Jan Claeys wrote: On Fri, 2018-07-27 at 19:13 +0200, Barath Aron wrote: I intend to cross-compile Python v3.6.6 to Threos ( https://threos.io ) operating system. Threos is supports a quite large set from POSIX and C89/C99. Unfortunately, Threos lacks fork(2), but provide

Re: Edit with IDLE pull down menu

2018-07-20 Thread Terry Reedy
On 7/19/2018 5:40 PM, no@none.invalid wrote: The option for Edit with IDLE has an expanding menu. The only item in the pull down menu is..Edit with IDLE. What I see is Edit with IDLE 3.7. There should be an entry for each Python installed. Since that is the reason for the 2nd menu,

Re: copy and paste with a program called clipboard

2018-07-20 Thread Terry Reedy
On 7/19/2018 9:29 PM, eryk sun wrote: On Thu, Jul 19, 2018 at 5:42 PM, Terry Reedy wrote: What happens when you right click depends on the program you are interacting with. When you select and right-click in the current Windows 10 console, used for Command Prompt, PowerShell, Python, and

Re: copy and paste with a program called clipboard

2018-07-19 Thread Terry Reedy
On 7/19/2018 11:47 AM, no@none.invalid wrote: I just installed Python 3.7 What machine (OS)? How did you install Python? How are you running it? The instructions say to highlight some text and press enter to copy text. What instructions? This is not standard, at least not on Windows. You

Re: test for absence of infinite loop

2018-07-17 Thread Terry Reedy
On 7/17/2018 7:39 AM, Robin Becker wrote: well I understand the problem about not halting. However as you point out in a fixed case I know that the test should take fractions of a second to complete. If nothing else, you can easily add def test_xyz_completes(self): xyz(args) # Forme

Re: can't install/run pip (Latest version of Python)

2018-07-17 Thread Terry Reedy
On 7/16/2018 11:03 PM, S Lea wrote: Some additional info, which allows me to say the following: 1) Don't know what do you mean by the traceback. >>> 1/o Traceback (most recent call last): File "", line 1, in 1/o NameError: name 'o' is not defined The last four lines 2) In DOS, pip i

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-17 Thread Terry Reedy
On 7/16/2018 10:25 PM, Tim Chase wrote: On 2018-07-17 01:08, Steven D'Aprano wrote: In English, I think most people would prefer to use a different term for whatever "sh" and "ch" represent than "character". The term you may be reaching for is "consonant cluster"? https://en.wikipedia.org/wik

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Terry Reedy
On 7/16/2018 7:02 PM, Richard Damon wrote: On Jul 16, 2018, at 3:28 PM, Terry Reedy wrote: If one is using a broader definition than usual, it is clearer to say so. This is the core of what I wrote. Do you disagree? You are defining a variable/fixed width codepoint set. No, I did

Re: Users banned

2018-07-16 Thread Terry Reedy
On 7/16/2018 3:27 PM, Grant Edwards wrote: On 2018-07-16, Steve Simmons wrote: +1  Seems to me Bart is being banned for "being a dick" and "talking rubbish" (my words/interpretation) with irritating persistence. Wonder how many of the non-banned members have been guilty of the same thing in on

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Terry Reedy
On 7/16/2018 2:01 PM, Chris Angelico wrote: 🌱【 Stardew Valley Fanart 】🌱*:・゚✧【 800 Subpoints = NEW EMOTE 】#devicat #anime #stardewvalley #fantasy Just to be clear, 🌱【 】🌱・゚✧【 】, \U0001f331, \u3010, \u3011, \uff65, \uff9f, \u2727 are the non-ascii chars in the above. for c in """🌱【 Stardew Val

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Terry Reedy
On 7/16/2018 1:27 PM, Jim Lee wrote: 90% of the world *is* "beneath my notice" when it comes to programming for myself.   I really don't care if that's not PC enough for you. Had you actually read my words with *intent* rather than *reaction*, you would notice that I suggested the *option* of

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Terry Reedy
On 7/16/2018 1:13 PM, Jim Lee wrote: I just think that a language should allow one to bypass Unicode handling easily *when it's not needed*. Both for patching IDLE and for my currently private work, I usually only use Ascii, and no unicode escapes. When I do, it does not matter whether edit

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Terry Reedy
On 7/16/2018 1:11 PM, Richard Damon wrote: Many consider that UTF-32 is a variable-width encoding because of the combining characters. It can take multiple ‘codepoints’ to define what should be a single ‘character’ for display. I hope you realize that this is not the standard meaning of 'va

Re: [SUSPICIOUS MESSAGE] Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Terry Reedy
On 7/16/2018 11:50 AM, Dennis Lee Bieber wrote: For Python 4000 maybe Please don't give people the idea that there is any current intention to have a 'Python 4000' similar to 'Python 3000'. Call it 'a mythical Python 4000', if you must use such a term. -- Terry Jan Reedy -- https

Re: [SUSPICIOUS MESSAGE] Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Terry Reedy
On 7/16/2018 10:54 AM, Gene Heskett wrote: On Monday 16 July 2018 10:24:28 Marko Rauhamaa wrote: Plus the bytes syntax is really ugly. I wish Python3 had reserved '...' for byte strings and "..." for UTF-32 strings. Aside from the fact that Python3 strings are not UTF-32 strings, this would

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Terry Reedy
On 7/15/2018 4:09 PM, Jim Lee wrote: On 07/15/18 12:37, MRAB wrote: To me, Unicode and UTF-8 aren't things to be reserved for I18N. I use them as a matter of course because I find it a lot easier to stick with just one encoding, one that will work with _any_ text I have. Which is exactly th

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Terry Reedy
On 7/15/2018 5:28 PM, Marko Rauhamaa wrote: if your new system used Python3's UTF-32 strings as a foundation, Since 3.3, Python's strings are not (always) UFT-32 strings. Nor are they always UCS-2 (or partly UTF-16) strings. Nor are the always Latin-1 or Ascii strings. Python's Flexible S

Re: IDLE Python won't run or open, neither will it state the error for behaving this way

2018-07-16 Thread Terry Reedy
On 7/16/2018 5:22 AM, Clarence Chanda wrote: HI, I downloaded python 3.7.0 from your python website Which installer for what OS? and it was installed successfully and I was able to run/open python How did you run it? but when I try to run/open IDLE python, How? it just wont open or ru

Re: Cult-like behaviour [was Re: Kindness]

2018-07-15 Thread Terry Reedy
On 7/15/2018 7:37 AM, Marko Rauhamaa wrote: One of the classic Unix and Internet tenets is that text is bytes is text. Tenets of a faith may be wrong ;-). An informatic paradigm from more than 45 years ago may be outdated and in need of revision. On byte storage and on the Internet, **ever

Re: Cult-like behaviour [was Re: Kindness]

2018-07-14 Thread Terry Reedy
On 7/14/2018 2:44 PM, Marko Rauhamaa wrote: Having gone through a recent 2to3 effort that left my conscience stained, I can only lament for the lost paradise which was Python 2.7. I am curious, which release of 2.7 do you apply that to? The initial 2.7.0? Should we have stopped there? The

Re: Kindness

2018-07-14 Thread Terry Reedy
On 7/14/2018 3:35 AM, Steven D'Aprano wrote: On Sat, 14 Jul 2018 05:19:36 +0300, Mikhail V wrote: From Marko's check-list: [ ] The group has a polarized us-versus-them mentality Many Python programmers -- perhaps the majority -- know more than one programming language, enjoy some of them, an

Re: Guido van Rossum resigns as Python leader

2018-07-13 Thread Terry Reedy
On 7/13/2018 9:54 AM, Nicholas Cole wrote: Is it irrational to wonder whether projects should be looking to migrate to new languages? At this point, I would say yes. The immediate effect is no more PEP approvals for maybe 3 months. This kind of announcement makes me worry for the future.

Re: Python 3.6 can find cairo libs but not Python 2.7

2018-07-12 Thread Terry Reedy
On 7/12/2018 3:52 PM, D'Arcy Cain wrote: $ python2.7 -c "import ctypes.util; print(ctypes.util.find_library('cairo'))" libcairo.so.2 $ python3.6 -c "import ctypes.util; print(ctypes.util.find_library('cairo'))" None I have the 3.6 version of py-cairo installed. Any thoughts? NetBSD 7.1.2 wha

Re: Feasibility of console based (non-Gui) Tkinter app which can accept keypresses?

2018-07-11 Thread Terry Reedy
On 7/11/2018 10:09 AM, jkn wrote: Hi All This is more of a Tkinter question rather than a python one, I think, but anyway... I have a Python simulator program with a Model-View_Controller architecture. I have written the View part using Tkinter in the first instance; later I plan to use Qt.

Re: about main()

2018-07-06 Thread Terry Reedy
On 7/5/2018 9:40 PM, Jim Lee wrote: On 07/05/18 18:25, Steven D'Aprano wrote: On Thu, 05 Jul 2018 11:27:09 -0700, Jim Lee wrote: Take a village of people.  They live mostly on wild berries. Because of course a community of people living on one food is so realistic. Even the Eskimos and Inuit

Re: Python 3.7 Windows Help Behaviour

2018-07-02 Thread Terry Reedy
On 7/2/2018 8:57 PM, Steven D'Aprano wrote: On Fri, 29 Jun 2018 12:53:15 -0400, Terry Reedy wrote: On 6/29/2018 6:14 AM, BlindAnagram wrote: In Python 3.7.0 on Windows the help file (python370.chm) displays with a fixed line length and does not adjust its line length when the user expand

Re: I lost nearly all my modules installing 3.7

2018-07-02 Thread Terry Reedy
On 7/2/2018 9:50 AM, Michael Torrie wrote: If you're wanting to use SciPy and matplotlib, I suggest you stick with Python 3.6. There's little reason to immediately go to Python 3.7. Anytime you upgrade to the very latest version of Python, it's going to take some time for binary wheels to be bu

Re: error in os.chdir

2018-06-30 Thread Terry Reedy
On 6/30/2018 7:36 PM, eryk sun wrote: On Sat, Jun 30, 2018 at 11:21 AM, Chris Angelico wrote: On Sat, Jun 30, 2018 at 9:05 PM, Sharan Basappa wrote: 0 down vote favorite I need to change directory to my local working directory in windows and then open a file for processing. Its just a 3 li

Re: $s and %d in python

2018-06-30 Thread Terry Reedy
On 6/30/2018 7:04 PM, Cameron Simpson wrote: On 30Jun2018 05:01, Sharan Basappa wrote: Is there any difference in %d and %s below. I get the same result: my_name = 'Zed A. Shaw' my_age = 35 # not a lie my_height = 74 # inches print "Let's talk about %s." % my_name print "He's %d inches tall."

Re: using trace module in enthought

2018-06-30 Thread Terry Reedy
On 6/30/2018 12:46 PM, Sharan Basappa wrote: I am using enthought for python. Trace module seems to be very useful for my work but somehow I am unable to make it work. When I use the following option, I get the following error: %run What is 'run' and what does it do? Does not exist on Window

Re: is my interpreation correct

2018-06-30 Thread Terry Reedy
On 6/30/2018 8:57 AM, Sharan Basappa wrote: A code I am using as reference has the following line: from nltk.stem.lancaster import LancasterStemmer The CapitalName indicates a class. I am inferring the following based on above: 1) nltk is a package 2) nltk itself may have module because I see

Re: naming methods in python (std lib)

2018-06-30 Thread Terry Reedy
On 6/30/2018 7:27 AM, Abdur-Rahmaan Janhangeer wrote: normally, naming methods in python is given by method_name but i see some cases where this is not followed in the std lib ex : dict.fromkeys should it not have been from_keys? No. _ is an option, not a requirement and usually not used

Re: Python 3.7 Windows Help Behaviour

2018-06-29 Thread Terry Reedy
On 6/29/2018 6:14 AM, BlindAnagram wrote: In Python 3.7.0 on Windows the help file (python370.chm) displays with a fixed line length and does not adjust its line length when the user expands the help window horizontally. This behaviour is different to that of the Python 3.6 help file (python360.

Re: Python27.dll module error from Python 2.7.15/PCbuild/get_externals.bat

2018-06-29 Thread Terry Reedy
On 6/29/2018 3:42 AM, amit.singh2...@gmail.com wrote: I am trying to compile the freshly downloaded Python 2.7.15. When the PCBuild/build.bat goes to pull-in the external modules along with their dependencies it encounters this error for each of the external modules. F:\Dev\depot\tools\source\p

Re: [OT] Why are BBSes? [was Where's the junk coming from?]

2018-06-28 Thread Terry Reedy
On 6/28/2018 9:05 PM, Avon wrote: On 06/28/18, Grant Edwards pondered and said... GE> OK, I've got to ask... GE> Why are there still BBSes? GE> GE> Who even has a modem these days? [OK, I'll admit my 11 year old GE> Thinkpad T500 has a built-in POTS modem, but it's never been used.

Re: I lost nearly all my modules installing 3.7

2018-06-28 Thread Terry Reedy
On 6/28/2018 6:45 PM, Elliott Roper wrote: On 28 Jun 2018, Terry Reedy wrote There is a pip command for making an editable file of installed packages. Run that in 3.6, perhaps after updating everything. There is another pip command for using that file to install everything listed. Run that

Re: I lost nearly all my modules installing 3.7

2018-06-28 Thread Terry Reedy
On 6/28/2018 1:08 PM, Elliott Roper wrote: I have done something stupid. Don't know what. It appears that you ran 3.7 expecting that modules installed for 3.6 would magically be available for 3.7. There is a pip command for making an editable file of installed packages. Run that in 3.6, pe

Re: overlooked patch?

2018-06-28 Thread Terry Reedy
Yep. We do not have enough people reviewing patches. Perhaps you could do so with this one. On 6/28/2018 12:02 PM, Marco Prosperi wrote: hello, just to give evidence that there is a bug in python 3.6/3.7 for which there is a patch prepared a long time ago but probably it has never been applie

Re: sigmoid function and derivative

2018-06-26 Thread Terry Reedy
On 6/26/2018 11:26 PM, Sharan Basappa wrote: Folks, I know this is not a machine learning forum but I wanted to see if anyone can explain this to me. In artificial neural network, I can understand why sigmoid is used but I see that derivative of sigmoid output function is used. I am not able

Re: syntax difference

2018-06-26 Thread Terry Reedy
From: Terry Reedy On 6/24/2018 11:39 AM, Bart wrote: Bart, I agree that people should not dogpile onto you. As with Rick, I read your posts or not, depending on whether I feel like being entertained at the moment, and usually move on without comment. > I know I'm going to get

Re: Anyone here on Python-Dev mailing list?

2018-06-26 Thread Terry Reedy
From: Terry Reedy On 6/24/2018 12:07 PM, Steven D'Aprano wrote: > Anyone on the Python-Dev mailing list, are you getting private emails > containing nothing but stream of consciousness word-salad from somebody > (some bot?) calling himself "Chanel Marvin" with a gm

Re: Anyone here on Python-Dev mailing list?

2018-06-24 Thread Terry Reedy
On 6/24/2018 12:07 PM, Steven D'Aprano wrote: Anyone on the Python-Dev mailing list, are you getting private emails containing nothing but stream of consciousness word-salad from somebody (some bot?) calling himself "Chanel Marvin" with a gmail address? Typical example: "I refuse to create

Re: syntax difference

2018-06-24 Thread Terry Reedy
On 6/24/2018 11:39 AM, Bart wrote: Bart, I agree that people should not dogpile onto you. As with Rick, I read your posts or not, depending on whether I feel like being entertained at the moment, and usually move on without comment. I know I'm going to get flak for bringing this up this old

<    1   2   3   4   5   6   7   8   9   10   >