Re: Top Python Interview Questions

2017-05-25 Thread Terry Reedy
On 5/26/2017 1:03 AM, Aarusha wrote: PYTHON INTERVIEW QUESTIONS Mindmajix has compiled Python Interview questions which would benefit the learners to attend the Python interviews. Q. How is Python executed? It depends on the implementation (interpreter or compiler). Python files are compil

Re: Scala considering significant indentation like Python

2017-05-25 Thread Rustom Mody
On Wednesday, May 24, 2017 at 8:01:53 PM UTC+5:30, Rustom Mody wrote: > On Wednesday, May 24, 2017 at 2:14:15 AM UTC+5:30, Ben Finney wrote: > > Grant Edwards grant.b.edwards writes: > > > > > On 2017-05-23, Michael Torrie wrote: > > > > Sometimes things get longer than a page (like a class defin

Top Python Interview Questions

2017-05-25 Thread Aarusha
PYTHON INTERVIEW QUESTIONS Mindmajix has compiled Python Interview questions which would benefit the learners to attend the Python interviews. Q. How is Python executed? Python files are compiled to bytecode. which is then executed by the host. Alternate Answer: Type python .pv at the command l

Re: Nested Loop Triangle

2017-05-25 Thread Jason Friedman
> > I need the triangle to be in reverse. The assignment requires a nested > loop to generate a triangle with the user input of how many lines. > > Currently, I get answers such as: (A) > > OOO > OO > O > > When I actually need it to be like this: (B) > > OOO >OO > O > Try the

Re: How to install Python package from source on Windows

2017-05-25 Thread Michael Torrie
On 05/25/2017 07:58 PM, Chris Angelico wrote: > On Fri, May 26, 2017 at 11:28 AM, Deborah Swanson > wrote: >> Since none of you have XP SP2 with Anaconda3 Python 3.4.3, to either >> confirm or deny my results, and I no longer have the message with the >> traceback showing what happened, nothing an

Re: How to install Python package from source on Windows

2017-05-25 Thread MRAB
On 2017-05-26 02:59, Michael Torrie wrote: On 05/25/2017 04:37 PM, Deborah Swanson wrote: Here's a question: does Anaconda have a special build of Python, or is it a standard Python bundled with extra stuff? I'm not sure, and it's an excellent question. Anaconda stopped installing Python on

Re: How to install Python package from source on Windows

2017-05-25 Thread Michael Torrie
On 05/25/2017 04:37 PM, Deborah Swanson wrote: >> Here's a question: does Anaconda have a special build of Python, or is > >> it a standard Python bundled with extra stuff? > > I'm not sure, and it's an excellent question. Anaconda stopped > installing Python on XP at 3.4.3. python.org doesn't i

Re: How to install Python package from source on Windows

2017-05-25 Thread Chris Angelico
On Fri, May 26, 2017 at 11:28 AM, Deborah Swanson wrote: > Since none of you have XP SP2 with Anaconda3 Python 3.4.3, to either > confirm or deny my results, and I no longer have the message with the > traceback showing what happened, nothing anybody says at this point > matters wrt to what happen

Re: using configobj string interpolation and logging.config.dictConfig

2017-05-25 Thread Tim Williams
On Thursday, May 25, 2017 at 5:16:13 PM UTC-4, Peter Otten wrote: > Tim Williams wrote: > > > On Wednesday, May 24, 2017 at 5:47:37 PM UTC-4, Peter Otten wrote: > >> Tim Williams wrote: > >> > >> > Just as a followup, if I use 'unrepr=True' in my ConfigObj, I don't > >> > have to convert the stri

RE: How to install Python package from source on Windows

2017-05-25 Thread Deborah Swanson
Since none of you have XP SP2 with Anaconda3 Python 3.4.3, to either confirm or deny my results, and I no longer have the message with the traceback showing what happened, nothing anybody says at this point matters wrt to what happens in XP SP2. -- https://mail.python.org/mailman/listinfo/python-

Re: How to install Python package from source on Windows

2017-05-25 Thread breamoreboy
On Friday, May 26, 2017 at 12:11:41 AM UTC+1, Deborah Swanson wrote: > breamoreboy wrote, on Thursday, May 25, 2017 3:23 PM > > > > On Thursday, May 25, 2017 at 10:32:56 PM UTC+1, Deborah Swanson wrote: > > > > Michael Torrie wrote, on Thursday, May 25, 2017 1:57 PM > > > > > I didn't see a traceb

Re: How to install Python package from source on Windows

2017-05-25 Thread eryk sun
On Thu, May 25, 2017 at 11:11 PM, Deborah Swanson wrote: > Unfortunately I deleted that message and now I no longer have a pip You still have ensurepip to be able to install and upgrade pip: python -m ensurepip --verbose --default-pip python -m pip install --upgrade pip Or use get-pip.p

Re: How to install Python package from source on Windows

2017-05-25 Thread MRAB
On 2017-05-26 00:11, Deborah Swanson wrote: breamore...@gmail.com wrote, on Thursday, May 25, 2017 3:23 PM On Thursday, May 25, 2017 at 10:32:56 PM UTC+1, Deborah Swanson wrote: > > Michael Torrie wrote, on Thursday, May 25, 2017 1:57 PM > > > I didn't see a traceback where you tried to upgrade

Re: Concatenating files in order

2017-05-25 Thread Cameron Simpson
On 25May2017 20:37, Mahmood Naderan wrote: Cameron, thanks for the points. In fact the file name contains multiple '_' characters. So, I appreciate what you recommended. filenames = {} for name in glob.glob('*chunk_*'): left, right = name.rsplit('_', 1) if left.endswith('chunk') and ri

RE: How to install Python package from source on Windows

2017-05-25 Thread Deborah Swanson
breamore...@gmail.com wrote, on Thursday, May 25, 2017 3:23 PM > > On Thursday, May 25, 2017 at 10:32:56 PM UTC+1, Deborah Swanson wrote: > > > Michael Torrie wrote, on Thursday, May 25, 2017 1:57 PM > > > > I didn't see a traceback where you tried to upgrade pip > to 9.0.1. > > > > It's a long

RE: How to install Python package from source on Windows

2017-05-25 Thread Deborah Swanson
MRAB wrote, on Thursday, May 25, 2017 2:46 PM > > On 2017-05-25 21:24, Chris Angelico wrote: > > On Fri, May 26, 2017 at 6:16 AM, Deborah Swanson > > wrote: > >>> Anyway I can confirm that VS is not required for installing and > >>> using pip on XP, nor is it required for recordclass, since it'

Re: How to install Python package from source on Windows

2017-05-25 Thread breamoreboy
On Thursday, May 25, 2017 at 10:32:56 PM UTC+1, Deborah Swanson wrote: > > Michael Torrie wrote, on Thursday, May 25, 2017 1:57 PM > > > I didn't see a traceback where you tried to upgrade pip to > > > 9.0.1. > > It's a long thread. You just didn't find it. > You've never attempted to upgrade

Re: Concatenating files in order

2017-05-25 Thread Mahmood Naderan via Python-list
Hi guys, Cameron, thanks for the points. In fact the file name contains multiple '_' characters. So, I appreciate what you recommended. filenames = {} for name in glob.glob('*chunk_*'): left, right = name.rsplit('_', 1) if left.endswith('chunk') and right.isdigit(): fi

Re: How to install Python package from source on Windows

2017-05-25 Thread MRAB
On 2017-05-25 21:24, Chris Angelico wrote: On Fri, May 26, 2017 at 6:16 AM, Deborah Swanson wrote: Anyway I can confirm that VS is not required for installing and using pip on XP, nor is it required for recordclass, since it's available in wheel form. See my tracebacks earlier in this thread.

RE: How to install Python package from source on Windows

2017-05-25 Thread Deborah Swanson
> Michael Torrie wrote, on Thursday, May 25, 2017 1:57 PM > > I didn't see a traceback where you tried to upgrade pip to > > 9.0.1. It's a long thread. You just didn't find it. This is my last reply on this thread to anything to do with XP SP2 (observations in XP SP3 do not apply) or Visual Stu

Re: using configobj string interpolation and logging.config.dictConfig

2017-05-25 Thread Peter Otten
Tim Williams wrote: > On Wednesday, May 24, 2017 at 5:47:37 PM UTC-4, Peter Otten wrote: >> Tim Williams wrote: >> >> > Just as a followup, if I use 'unrepr=True' in my ConfigObj, I don't >> > have to convert the strings. >> >> I'd keep it simple and would use JSON... > > I looked at JSON at fi

RE: How to install Python package from source on Windows

2017-05-25 Thread Deborah Swanson
Michael Torrie wrote, on Thursday, May 25, 2017 1:57 PM > > On 05/25/2017 02:16 PM, Deborah Swanson wrote: > >> I just fired up my Windows XP SP3 virtual machine, which has > >> no development tools whatsoever on it (no VS, nothing). I > >> installed 32-bit Python 3.4 from the official python.org

Re: How to install Python package from source on Windows

2017-05-25 Thread MRAB
On 2017-05-25 21:24, Chris Angelico wrote: On Fri, May 26, 2017 at 6:16 AM, Deborah Swanson wrote: Anyway I can confirm that VS is not required for installing and using pip on XP, nor is it required for recordclass, since it's available in wheel form. See my tracebacks earlier in this thread.

Re: How to install Python package from source on Windows

2017-05-25 Thread Michael Torrie
On 05/25/2017 02:16 PM, Deborah Swanson wrote: >> I just fired up my Windows XP SP3 virtual machine, which has >> no development tools whatsoever on it (no VS, nothing). I >> installed 32-bit Python 3.4 from the official python.org >> download. Then I did the pip >> upgrade: > > Yes XP SP3 can

Re: How to install Python package from source on Windows

2017-05-25 Thread Chris Angelico
On Fri, May 26, 2017 at 6:16 AM, Deborah Swanson wrote: >> Anyway I can confirm that VS is not required for installing >> and using pip on XP, nor is it required for recordclass, >> since it's available in wheel form. > > See my tracebacks earlier in this thread. You confirmed that it works in > X

RE: How to install Python package from source on Windows

2017-05-25 Thread Deborah Swanson
Michael Torrie wrote, on Thursday, May 25, 2017 12:12 PM > > On 05/25/2017 10:09 AM, Deborah Swanson wrote: > > Could be, maybe it's something they do for every > installation, whether > > it will use it or not. But it always breaks when it can't install > > Visual Studio. Upgrade pip does run

using configobj string interpolation and logging.config.dictConfig (was Re: dictConfig: logging.StreamHandler object is not iterable.)

2017-05-25 Thread Tim Williams
On Wednesday, May 24, 2017 at 5:47:37 PM UTC-4, Peter Otten wrote: > Tim Williams wrote: > > > Just as a followup, if I use 'unrepr=True' in my ConfigObj, I don't have > > to convert the strings. > > I'd keep it simple and would use JSON... I looked at JSON at first, but went with configobj beca

Re: How to install Python package from source on Windows

2017-05-25 Thread Michael Torrie
On 05/25/2017 10:09 AM, Deborah Swanson wrote: > Could be, maybe it's something they do for every installation, whether > it will use it or not. But it always breaks when it can't install Visual > Studio. Upgrade pip does run and it works up to that point. It gets as > far as uninstalling the old p

Re: Nested Loop to Generate Triangle

2017-05-25 Thread MRAB
On 2017-05-25 17:28, Victor Demelo wrote: I need the triangle to be in reverse. The assignment requires a nested loop to generate a triangle with the user input of how many lines. Currently, I get answers such as: OOO OO O When I actually need it to be like this: OOO OO O I j

Re: Emacs command to select only lines indented below a specified level

2017-05-25 Thread Fred Stluka
Ben, Excellent answer! Thanks! --Fred Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! Open Source: Without walls and fences, we need

Re: How to install Python package from source on Windows

2017-05-25 Thread eryk sun
On Thu, May 25, 2017 at 4:09 PM, Deborah Swanson wrote: > Could be, maybe it's something they do for every installation, whether > it will use it or not. But it always breaks when it can't install Visual > Studio. Upgrade pip does run and it works up to that point. It gets as > far as uninstalling

Re: Nested Loop to Generate Triangle

2017-05-25 Thread Peter Pearson
On Thu, 25 May 2017 09:28:31 -0700 (PDT), Victor Demelo wrote: > I need the triangle to be in reverse. The assignment requires a nested > loop to generate a triangle with the user input of how many lines. > > Currently, I get answers such as: > > OOO > OO > O > > When I actually need it to be

Nested Loop Triangle

2017-05-25 Thread Victor Demelo
I need the triangle to be in reverse. The assignment requires a nested loop to generate a triangle with the user input of how many lines. Currently, I get answers such as: (A) OOO OO O When I actually need it to be like this: (B) OOO OO O I need the display (A) to

Re: Nested Loop to Generate Triangle

2017-05-25 Thread Victor Demelo
On Thursday, May 25, 2017 at 12:28:45 PM UTC-4, Victor Demelo wrote: > I need the triangle to be in reverse. The assignment requires a nested loop > to generate a triangle with the user input of how many lines. > > Currently, I get answers such as: > > OOO > OO > O > > When I actually need

Re: Nested Loop to Generate Triangle

2017-05-25 Thread Victor Demelo
On Thursday, May 25, 2017 at 12:28:45 PM UTC-4, Victor Demelo wrote: > I need the triangle to be in reverse. The assignment requires a nested loop > to generate a triangle with the user input of how many lines. > > Currently, I get answers such as: > > OOO > OO > O > > When I actually need

Nested

2017-05-25 Thread Victor Demelo
d -- https://mail.python.org/mailman/listinfo/python-list

Nested Loop to Generate Triangle

2017-05-25 Thread Victor Demelo
I need the triangle to be in reverse. The assignment requires a nested loop to generate a triangle with the user input of how many lines. Currently, I get answers such as: OOO OO O When I actually need it to be like this: OOO OO O I just need to get it flipped-over on the other

Re: Yet another Python SNMP lib

2017-05-25 Thread Kouli
> > Unsure why you mention C. Python has a solid and efficient > implementation of SNMP with PySNMP, and except a misunderstanding about > how SNMPv3 should work, it seems better to use it than relying on > Net-SNMP which has many bugs and nobody really willing to correct them. > Wow. I'd like to

RE: How to install Python package from source on Windows

2017-05-25 Thread Deborah Swanson
Chris Angelico wrote, on Thursday, May 25, 2017 12:47 AM > > On Thu, May 25, 2017 at 4:57 PM, Deborah Swanson > wrote: > > Oh, what bliss it must be to run on a system that hasn't > been declared > > a pariah by everyone and his dog. (But yet it covers all > the essential > > bases quite nic

How to install py.xml plugin

2017-05-25 Thread Satya Rao
I wanted to install py.xml plugin. How to do that? Because this is using in pytest-html. pip install py.xml says no packages found. but in pytest-html they are importing this like below. from py.xml import html Thanks, Satya -- https://mail.python.org/mailman/listinfo/python-list

generate log files with the name of the test scripts

2017-05-25 Thread satya28
Hi I am working on an automation framework in Python and my tests are using pytest framework. Following is my folder structure. +test_fwk +helper_methods +resources +bins +src +targets +extensions custom.logger.py +xyz +tests

Re: Verifiably better, validated Enum for Python

2017-05-25 Thread Grant Edwards
On 2017-05-25, Dennis Lee Bieber wrote: > On Thu, 25 May 2017 00:34:52 +0100, bartc declaimed the > following: > > >>That was quite likely with older Fortrans, where subroutines only >>used pass-by-reference, but which didn't stop you passing references >>to constants that the subroutine could th

Yet another Python SNMP lib

2017-05-25 Thread Kouli
Python list users, this is a rather long message primarily addressed to Vincent, but I am sending a copy to this list for those interested in SNMP and/or "object mapping frameworks"... Hello Vincent, I have been using your snimpy in few small scripts. I like it for replacing long dot/number OID s

Re: How to install Python package from source on Windows

2017-05-25 Thread Chris Angelico
On Thu, May 25, 2017 at 4:57 PM, Deborah Swanson wrote: > Oh, what bliss it must be to run on a system that hasn't been declared a > pariah by everyone and his dog. (But yet it covers all the essential > bases quite nicely.) > > I tried ensurepip, but it also wants to install a recent version of >

Re: threading.Semaphore or gevent.lock.Semaphore

2017-05-25 Thread dieter
Sergey writes: > I'm developing Flask app, processed by gevent.wsgi.WSGIServer. > If I need to isolate some pieces of code inside request handlers, can I use > threading.Lock? This is more a "Flask" than a general Python question. Accordingly, you likely get a better response in a "Flask" maili

RE: How to install Python package from source on Windows

2017-05-25 Thread Deborah Swanson
Gregory Ewing wrote, on Wednesday, May 24, 2017 10:58 PM > > Deborah Swanson wrote: > > > So now I'm pipless. > > You should be able to get it back using > > python -m ensurepip > > BTW, I don't know why upgrading pip would fail due to lack of > Visual Studio. That shouldn't be able to ha