Re: Python 3.6 installation doesn't add launcher to PATH

2017-02-24 Thread eryk sun
On Fri, Feb 24, 2017 at 12:38 PM, ChrisW wrote: > However, I've installed Python 3.6 with the 'include PATH' checkbox ticked > for my user only, and although C:\Windows\py.exe exists, it has not been > added to my PATH. > > I also tried installing for all users, and this also doesn't add it to the

RE: Python application launcher (for Python code)

2017-02-24 Thread Deborah Swanson
Chris Angelico wrote, February 24, 2017 10:04 PM > > On Sat, Feb 25, 2017 at 4:08 PM, Gregory Ewing > wrote: > > Deborah Swanson wrote: > >> > >> Well, they won't kill mine, not if I have my VPN on while > I'm using > >> it. > > > > > > How will a VPN help? If it needs to phone home and perfor

RE: Python application launcher (for Python code)

2017-02-24 Thread Deborah Swanson
Gregory Ewing wrote, on February 24, 2017 9:09 PM > > Deborah Swanson wrote: > > Well, they won't kill mine, not if I have my VPN on while I'm using > > it. > > How will a VPN help? If it needs to phone home and perform a > secret handshake before it will run, and they turn off the > secret ha

Re: Python application launcher (for Python code)

2017-02-24 Thread Chris Angelico
On Sat, Feb 25, 2017 at 4:08 PM, Gregory Ewing wrote: > Deborah Swanson wrote: >> >> Well, they won't kill mine, not if I have my VPN on while I'm using it. > > > How will a VPN help? If it needs to phone home and perform a > secret handshake before it will run, and they turn off the secret > hand

Re: Python application launcher (for Python code)

2017-02-24 Thread Gregory Ewing
Deborah Swanson wrote: Well, they won't kill mine, not if I have my VPN on while I'm using it. How will a VPN help? If it needs to phone home and perform a secret handshake before it will run, and they turn off the secret handshake server, you're hosed. -- Greg -- https://mail.python.org/mailm

Re: Disallowing instantiation of super class

2017-02-24 Thread Irv Kalb
> On Feb 24, 2017, at 1:24 AM, Steve D'Aprano > wrote: > > On Fri, 24 Feb 2017 11:19 am, Irv Kalb wrote: > >> Hi, >> >> I have built a set of three classes: >> >> - A super class, let's call it: Base > [...] >> I would like to add is some "insurance" that I (or someone else who uses >> my c

Re: Python replace multiple strings (m*n) combination

2017-02-24 Thread kar6308
On Friday, February 24, 2017 at 2:41:58 PM UTC-8, Erik wrote: > On 24/02/17 22:18, kar wrote: > > Thanks, what is the idea behind storing the keys and values in a list, I > > assume looking up for a value in a map is faster getting the value from the > > list. > > What do you not understand? MRA

Re: Python replace multiple strings (m*n) combination

2017-02-24 Thread Erik
On 24/02/17 22:18, kar wrote: Thanks, what is the idea behind storing the keys and values in a list, I assume looking up for a value in a map is faster getting the value from the list. What do you not understand? MRAB's extensive comments explain what is being done and why. In summary, the

Re: Disallowing instantiation of super class

2017-02-24 Thread Steve D'Aprano
On Sat, 25 Feb 2017 05:40 am, MRAB wrote: >> class Base: >> def __init__(self): >> if type(self) is Base: >> raise TypeError("cannot instantiate Base class") >> >> >> Does that help? >> > D'oh! Never thought of that! :-) > > The OP is using Python 2.7, so you'll need to us

Re: Python replace multiple strings (m*n) combination

2017-02-24 Thread MRAB
On 2017-02-24 22:18, kar wrote: On Friday, February 24, 2017 at 11:48:22 AM UTC-8, MRAB wrote: On 2017-02-24 18:54, kar6...@gmail.com wrote: > I have a task to search for multiple patterns in incoming string and replace with matched patterns, I'm storing all pattern as keys in dict and replacem

Re: Python replace multiple strings (m*n) combination

2017-02-24 Thread kar
On Friday, February 24, 2017 at 11:48:22 AM UTC-8, MRAB wrote: > On 2017-02-24 18:54, kar6...@gmail.com wrote: > > I have a task to search for multiple patterns in incoming string and > > replace with matched patterns, I'm storing all pattern as keys in dict and > > replacements as values, I'm us

Re: Python replace multiple strings (m*n) combination

2017-02-24 Thread Erik
On 24/02/17 18:54, kar6...@gmail.com wrote: for example is the search string is not a variable we can say re.search(r"\$%^search_text", "replace_text", "some_text") but when I read from the dict where shd I place the "r" keyword, unfortunately putting inside key doesnt work "r key" like this

Re: Python replace multiple strings (m*n) combination

2017-02-24 Thread MRAB
On 2017-02-24 18:54, kar6...@gmail.com wrote: I have a task to search for multiple patterns in incoming string and replace with matched patterns, I'm storing all pattern as keys in dict and replacements as values, I'm using regex for compiling all the pattern and using the sub method on patter

Python replace multiple strings (m*n) combination

2017-02-24 Thread kar6308
I have a task to search for multiple patterns in incoming string and replace with matched patterns, I'm storing all pattern as keys in dict and replacements as values, I'm using regex for compiling all the pattern and using the sub method on pattern object for replacement. But the problem I have

Re: Disallowing instantiation of super class

2017-02-24 Thread MRAB
On 2017-02-24 09:24, Steve D'Aprano wrote: On Fri, 24 Feb 2017 11:19 am, Irv Kalb wrote: Hi, I have built a set of three classes: - A super class, let's call it: Base [...] I would like to add is some "insurance" that I (or someone else who uses my code) never instantiates my Base class,

Re: Error installing python on Windows

2017-02-24 Thread mm0fmf
On 24/02/2017 18:12, Irmen de Jong wrote: On 24-2-2017 12:18, Michelle Tan wrote: Hello all I am new to python. Trying to install Python and encountered this error message : "The program can't start because api-ms-win-crt-runtime-I1-1-0.dll is missing from your computer." Tried to repair and

Re: Error installing python on Windows

2017-02-24 Thread Irmen de Jong
On 24-2-2017 12:18, Michelle Tan wrote: > Hello all > > I am new to python. > > Trying to install Python and encountered this error message : "The program > can't start because api-ms-win-crt-runtime-I1-1-0.dll is missing from your > computer." > > Tried to repair and reinstall Python however i

Re: Python 3.6 installation doesn't add launcher to PATH

2017-02-24 Thread Irmen de Jong
On 24-2-2017 13:38, ChrisW wrote: > The installation guidelines for Python 3.6 say: > > "Per-user installations of Python do not add the launcher to PATH unless the > option was selected on installation." > (https://docs.python.org/3/using/windows.html#from-the-command-line). > > However, I've

python3.5m vs libpython3.5m on CentOS6

2017-02-24 Thread Ray Cote
Hello: Attempting to install latest psycopg2 (2.6.2) on current CentOS6 with a custom install Python3.5. Getting the error: /usr/bin/ld: cannot find -lpython3.5m Don’t have a python3.5m library on the system. Do have libpython3.5m.so.1.0 with a soft link to libpython3.5m.so. Thought adding

Re: Error installing python on Windows

2017-02-24 Thread Florian Schweikert
Hi Michelle, On 24/02/17 12:18, Michelle Tan wrote: > I am new to python. Welcome to Python. > Trying to install Python What Python version are you trying to install and what's your Windows version? -- Florian signature.asc Description: OpenPGP digital signature -- https://mail.python.org/

Error installing python on Windows

2017-02-24 Thread Michelle Tan
Hello all I am new to python. Trying to install Python and encountered this error message : "The program can't start because api-ms-win-crt-runtime-I1-1-0.dll is missing from your computer." Tried to repair and reinstall Python however i may have missed out some installation. What should I do to

Python 3.6 installation doesn't add launcher to PATH

2017-02-24 Thread ChrisW
The installation guidelines for Python 3.6 say: "Per-user installations of Python do not add the launcher to PATH unless the option was selected on installation." (https://docs.python.org/3/using/windows.html#from-the-command-line). However, I've installed Python 3.6 with the 'include PATH' che

Re: Python application launcher (for Python code)

2017-02-24 Thread Cholo Lennon
On 02/23/2017 11:15 PM, Dennis Lee Bieber wrote: On Thu, 23 Feb 2017 12:58:24 -0300, Cholo Lennon declaimed the following: If the script has no screen input/output I'd edit the shortcut and prefix the script pathname with pythonw.exe (to avoid the empty console). Also I'd add the python path

Re: Disallowing instantiation of super class

2017-02-24 Thread Wolfgang Maier
On 24.02.2017 01:19, Irv Kalb wrote: Hi, I have built a set of three classes: - A super class, let's call it: Base - A class that inherits from Base, let's call that: ClassA - Another class that inherits from Base, let's call that: ClassB ClassA and ClassB have some code in their __init__ m

Re: Disallowing instantiation of super class

2017-02-24 Thread Steve D'Aprano
On Fri, 24 Feb 2017 11:19 am, Irv Kalb wrote: > Hi, > > I have built a set of three classes: > > - A super class, let's call it: Base [...] > I would like to add is some "insurance" that I (or someone else who uses > my code) never instantiates my Base class, It is not intended to be > instant

Re: Spyder 3.1.3 update

2017-02-24 Thread Pavol Lisy
On 2/24/17, Pablo Lozano wrote: > Good day, > > I installed the Spyder 3.6 IDE from the Anaconda package and at the start k > to the IDE I get the Spyder Update saying Spyder 3.1.3 is available. Did it > incorrectly install Anaconda? As far as I know Spyder 3.1.3 is rather old > and the latest i