Re: Python String Handling

2016-11-11 Thread Steve D'Aprano
On Sat, 12 Nov 2016 09:29 am, subhabangal...@gmail.com wrote: > I have a string > "Hello my name is Richard" > > I have a list of words as, > ['Hello/Hi','my','name','is','Richard/P'] > > I want to identify the match of 'Hello' and 'Richard' > in list, and replace them with 'Hello/Hi" and 'Richa

Re: Promoting your own library

2016-11-11 Thread Ben Finney
mirko bonasorte writes: > what is the most appropriate way for a developer to promote his own > Python library? The general answer is: Publish it with full metadata on PyPI. That's where the Python community looks to find third-party modules, so that's the place to put it. Beyond that? You'll n

Re: Python does not start

2016-11-11 Thread eryk sun
On Fri, Nov 11, 2016 at 9:38 PM, wrote: > It says that ’py-3.5-32-m’ is not recognized as an internal or external > command, operable program or batch file. There's supposed to be a space after "py". Let's add the .exe extension to make this clearer: py.exe -3.5-32 -m idlelib And please do

Re: Python String Handling

2016-11-11 Thread Thomas Nyberg
On 11/11/2016 05:29 PM, subhabangal...@gmail.com wrote: I have a string "Hello my name is Richard" I want to identify the match of 'Hello' and 'Richard' in list, and replace them with 'Hello/Hi" and 'Richard/P' respectively. The result should look like, "Hello/Hi my name is Richard/P". Simple

Python String Handling

2016-11-11 Thread subhabangalore
I have a string "Hello my name is Richard" I have a list of words as, ['Hello/Hi','my','name','is','Richard/P'] I want to identify the match of 'Hello' and 'Richard' in list, and replace them with 'Hello/Hi" and 'Richard/P' respectively. The result should look like, "Hello/Hi my name is Richard

Re: Python does not start

2016-11-11 Thread Terry Reedy
On 11/11/2016 3:59 PM, eryk sun wrote: On Fri, Nov 11, 2016 at 8:36 PM, Jelena Tavcar wrote: when I click on the icon "IDLE (Python 3.5 32-bit)" nothing happens. It Does python itself work? If so, which micro version. It is in the startup line that begins 'Python 3.5.2+ ...'. There was b

RE: Python does not start

2016-11-11 Thread Daniele Bucciero
Did you check your Windows Event Viewer? Did you notice something wrong in Application Events? Regards Daniele Bucciero -Original Message- From: Python-list [mailto:python-list-bounces+daniele.bucciero=outlook@python.org] On Behalf Of Jelena Tavcar Sent: venerdì 11 novembre 2016 21:3

Re: Python does not start

2016-11-11 Thread eryk sun
On Fri, Nov 11, 2016 at 8:36 PM, Jelena Tavcar wrote: > > when I click on the icon "IDLE (Python 3.5 32-bit)" nothing happens. It > used to work and at some point it just didn't react. Try running IDLE from a command prompt by entering the following command: py -3.5-32 -m idlelib If this pr

Fwd: Python does not start

2016-11-11 Thread Jelena Tavcar
Dear Sirs, when I click on the icon "IDLE (Python 3.5 32-bit)" nothing happens. It used to work and at some point it just didn't react. I have reinstalled the program several times and no improvement. I have also tried to run it as administrator, and installed other version too, but neither of them

Promoting your own library

2016-11-11 Thread mirko bonasorte
Hi all, what is the most appropriate way for a developer to promote his own Python library? I mean, apart from deploying it in Pypi and making the source code available in a SCV repository... Thanks. Mirko -- https://mail.python.org/mailman/listinfo/python-list

Re: update certain key-value pairs of a dict from another dict

2016-11-11 Thread Tim Chase
On 2016-11-11 13:29, Peter Otten wrote: > The same using update(), with a generator expression that avoids > the intermediate dict: > > >>> dict1 = {'A': 'a', 'B': 'b', 'C': 'c'} > >>> dict1.update((k, dict2[k]) for k in desired & dict1.keys() & > dict2.keys()) Huh. Handy to file that new knowl

Re: Why keys method does not work with MutableMapping?

2016-11-11 Thread Rob Gaddi
triccare triccare wrote: > Greetings, > > Apologies if this has shown up twice; I jumped the gun sending before > confirming registration. > > I have a class that completely implements MutableMapping, meaning that all > the abstract methods are implemented. However, the keys method no longer > ret

Why keys method does not work with MutableMapping?

2016-11-11 Thread triccare triccare
Greetings, Apologies if this has shown up twice; I jumped the gun sending before confirming registration. I have a class that completely implements MutableMapping, meaning that all the abstract methods are implemented. However, the keys method no longer returns the keys, but simply a repr of the

Why keys method does not work with MutableMapping?

2016-11-11 Thread triccare triccare
I have a class that completely implements MutableMapping, meaning that all the abstract methods are implemented. However, the keys method no longer returns the keys, but simply a repr of the instance. Example is below. Same is true for the items method. It would seem that, if all the abstract met

Re: Windows: subprocess won't run different Python interpreter

2016-11-11 Thread Ethan Furman
On 11/11/2016 03:24 AM, eryk sun wrote: On Fri, Nov 11, 2016 at 10:46 AM, Thorsten Kampe wrote: My goal is to verify that other shells/interpreters on Windows work the same way as Python when running an application or creating a sub- process. Cmd does not. What's else there? I have Bash here b

Re: update certain key-value pairs of a dict from another dict

2016-11-11 Thread Peter Otten
Tim Chase wrote: > On 2016-11-11 11:17, Daiyue Weng wrote: >> dict1 = {'A': 'a', 'B': 'b', 'C': 'c'} >> dict2 = {'A': 'aa', 'B': 'bb', 'C': 'cc'} >> >> I am wondering how to update dict1 using dict2 that >> >> only keys 'A' and 'B' of dict1 are udpated. It will result in >> >> dict1 = {'A': 'aa

Reporting a Bug

2016-11-11 Thread Vidyalakshmi Rao
Hi, System Specification: 2.7.7 |Anaconda custom (64-bit)| (default, Jun 11 2014, 10:40:02) [MSC v.1500 64 bit (AMD64)] *Issue: Spyder hangs in instances while iterating over a list containing rows with nothing in it.* for eachinfo in range(len(textlist)): #remove non-ASCII characters fro

Re: update certain key-value pairs of a dict from another dict

2016-11-11 Thread Tim Chase
On 2016-11-11 11:17, Daiyue Weng wrote: > dict1 = {'A': 'a', 'B': 'b', 'C': 'c'} > dict2 = {'A': 'aa', 'B': 'bb', 'C': 'cc'} > > I am wondering how to update dict1 using dict2 that > > only keys 'A' and 'B' of dict1 are udpated. It will result in > > dict1 = {'A': 'aa', 'B': 'bb', 'C': 'c'} Use

Re: Windows: subprocess won't run different Python interpreter

2016-11-11 Thread eryk sun
On Fri, Nov 11, 2016 at 11:30 AM, Gisle Vanem via Python-list wrote: > Thorsten Kampe wrote: > >> My goal is to verify that other shells/interpreters on Windows work >> the same way as Python when running an application or creating a sub- >> process. Cmd does not. What's else there? I have Bash he

Re: Windows: subprocess won't run different Python interpreter

2016-11-11 Thread Gisle Vanem via Python-list
Thorsten Kampe wrote: > My goal is to verify that other shells/interpreters on Windows work > the same way as Python when running an application or creating a sub- > process. Cmd does not. What's else there? I have Bash here but that's > a Cygwin executable. And Cygwin Python does not work like

Re: Windows: subprocess won't run different Python interpreter

2016-11-11 Thread eryk sun
On Fri, Nov 11, 2016 at 10:46 AM, Thorsten Kampe wrote: > * eryk sun (Fri, 11 Nov 2016 09:55:23 +) >> >> If it works like cmd.exe, then it does its own search using %Path% >> and %PathExt%. For example: >> >> C:\>cmd /c "set "PATH=" & cmd" >> 'cmd' is not recognized as an internal or e

update certain key-value pairs of a dict from another dict

2016-11-11 Thread Daiyue Weng
Hi, I have two dicts, e.g. dict1 = {'A': 'a', 'B': 'b', 'C': 'c'} dict2 = {'A': 'aa', 'B': 'bb', 'C': 'cc'} I am wondering how to update dict1 using dict2 that only keys 'A' and 'B' of dict1 are udpated. It will result in dict1 = {'A': 'aa', 'B': 'bb', 'C': 'c'} cheers -- https://mail.python.

Re: Windows: subprocess won't run different Python interpreter

2016-11-11 Thread Thorsten Kampe
* eryk sun (Fri, 11 Nov 2016 09:55:23 +) > > If it works like cmd.exe, then it does its own search using %Path% > and %PathExt%. For example: > > C:\>cmd /c "set "PATH=" & cmd" > 'cmd' is not recognized as an internal or external command, > operable program or batch file. > > Bu

ANN: eGenix pyOpenSSL Distribution 0.13.16

2016-11-11 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com pyOpenSSL Distribution Version 0.13.16 An easy-to-install and easy-to-use distribution of the pyOpenSSL Python interface for OpenS

Re: Windows: subprocess won't run different Python interpreter

2016-11-11 Thread eryk sun
On Fri, Nov 11, 2016 at 8:56 AM, Thorsten Kampe wrote: > * eryk sun (Fri, 11 Nov 2016 06:23:50 +) >> >> That's the application directory, which is the first place >> CreateProcess looks (via the SearchPath call), as both of my examples >> shows. In my case python.exe is located in the standard

Re: Windows: subprocess won't run different Python interpreter

2016-11-11 Thread Thorsten Kampe
* eryk sun (Fri, 11 Nov 2016 06:23:50 +) > > That's the application directory, which is the first place > CreateProcess looks (via the SearchPath call), as both of my examples > shows. In my case python.exe is located in the standard 3.5 system > installation path, "C:\Program Files\Python35".