Re: [Python-ideas] Inconsistencies

2016-09-12 Thread Rustom Mody
On Monday, September 12, 2016 at 4:42:39 PM UTC+5:30, Eric S. Johansson wrote: > On 9/11/2016 10:26 PM, Chris Angelico wrote: > > No, God isn't part of the universe, any more than an author is part of > > his novel. > > > as any fiction writer will tell you, the author is found in one or more > of

Re: How to extend a tuple of tuples?

2016-09-12 Thread Ned Batchelder
On Monday, September 12, 2016 at 4:31:37 PM UTC-4, Thomas 'PointedEars' Lahn wrote: > Ben Finney wrote: > > So instead, you want a different tuple. You do that by creating it, > > explicitly constructing a new sequence with the items you want:: > > > > b = tuple([ > > item for ite

Re: Expression can be simplified on list

2016-09-12 Thread Ned Batchelder
On Monday, September 12, 2016 at 5:21:51 PM UTC-4, Thomas 'PointedEars' Lahn wrote: > Chris Angelico wrote: > > > On Mon, Sep 12, 2016 at 9:14 PM, Daiyue Weng wrote: > > If you know that 'errors' is always going to be a list, you can check > > for emptiness thus: > > > > if not errors: > > If

Re: mssql date format

2016-09-12 Thread Nathan Ernst
Note that this issue is mentioned in the pymssql FAQ: http://pymssql.org/en/stable/faq.html#pymssql-does-not-unserialize-date-and-time-columns-to-datetime-date-and-datetime-time-instances Regards, Nathan On Mon, Sep 12, 2016 at 8:29 PM, Dennis Lee Bieber wrote: > On Tue, 13 Sep 2016 00:52:59 +0

Re: Julian date to calendar date conversion

2016-09-12 Thread sum abiut
Thanks On Tue, Sep 13, 2016 at 12:37 PM, MRAB wrote: > On 2016-09-13 02:12, sum abiut wrote: > >> Hi, >> how to convert julian date to a calander date >> >> Have a look at the jdcal module on PyPI: > > https://pypi.python.org/pypi/jdcal > > -- > https://mail.python.org/mailman/listinfo/python-li

Re: Julian date to calendar date conversion

2016-09-12 Thread MRAB
On 2016-09-13 02:12, sum abiut wrote: Hi, how to convert julian date to a calander date Have a look at the jdcal module on PyPI: https://pypi.python.org/pypi/jdcal -- https://mail.python.org/mailman/listinfo/python-list

Julian date to calendar date conversion

2016-09-12 Thread sum abiut
Hi, how to convert julian date to a calander date cheers -- https://mail.python.org/mailman/listinfo/python-list

How to fix PyV8 linux setup error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

2016-09-12 Thread p . infante413
Hello, I am currently installing Pyv8 and other requirements for me to run a honeypot. I downloaded pyv8 from source and using v8 (version 5.5) - built it with depot_tools. I already exported the V8_HOME path. But I still have this error whenever I run 'python setup.py build' of pyv8. Also, I am

Re: mssql date format

2016-09-12 Thread MRAB
On 2016-09-13 00:06, sum abiut wrote: Thanks for the response, i pulling data from an mssql database and i need to convert the date column. how to i covert and pass it to my template. i am using Django this is what i did conn=pymssql.connect(server,username,password,database) #cus=conn.cu

[RELEASE] Python 3.6.0b1 is now available

2016-09-12 Thread Ned Deily
On behalf of the Python development community and the Python 3.6 release team, I'm happy to announce the availability of Python 3.6.0b1. 3.6.0b1 is the first of four planned beta releases of Python 3.6, the next major release of Python, and marks the end of the feature development phase for 3.6. A

Re: mssql date format

2016-09-12 Thread sum abiut
Thanks for the response, i pulling data from an mssql database and i need to convert the date column. how to i covert and pass it to my template. i am using Django this is what i did conn=pymssql.connect(server,username,password,database) #cus=conn.cursor() cus=conn.cursor(as_dict=True)

Re: Expression can be simplified on list

2016-09-12 Thread Chris Angelico
On Tue, Sep 13, 2016 at 7:21 AM, Thomas 'PointedEars' Lahn wrote: > If I knew that it is always going to be a list or a tuple, I would check its > length instead: > > if len(errors) == 0: I wouldn't. I'd use boolification here too. Only if I had to distinguish between None, [], and [1,2,3], wou

Re: Expression can be simplified on list

2016-09-12 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > On Mon, Sep 12, 2016 at 9:14 PM, Daiyue Weng wrote: >> Hi, I found that when I tried to make an equality test on empty like, >> >> if errors == []: >> >> PyCharm always warns me, >> >> Expression can be simplified. >> >> I am wondering what's wrong and how to fix this? >>

Re: How to extend a tuple of tuples?

2016-09-12 Thread Chris Angelico
On Tue, Sep 13, 2016 at 7:19 AM, BartC wrote: > By the same argument, then strings and ints are also mutable. > > Here, the original tuple that a refers to has been /replaced/ by a new one. > The original is unchanged. (Unless, by some optimisation that recognises > that there are no other referen

Re: How to extend a tuple of tuples?

2016-09-12 Thread BartC
On 12/09/2016 21:31, Thomas 'PointedEars' Lahn wrote: Ben Finney wrote: "Frank Millman" writes: Assume you have a tuple of tuples - a = ((1, 2), (3, 4)) You want to add a new tuple to it, so that it becomes As you acknowledge, the tuple ‘a’ can't become anything else. Instead, you need to

Re: How to extend a tuple of tuples?

2016-09-12 Thread John Gordon
In <2349538.mvxudi8...@pointedears.de> Thomas 'PointedEars' Lahn writes: > >> The obvious way does not work - > >> > >> a += (5, 6) > ^^ > > Right, because a tuple is immutable. > How did you get that idea? It has been mutated in the very statement that > you are quot

Re: Software Needs Philosophers

2016-09-12 Thread Andrea D'Amore
On 2016-09-12 17:09:03 +, danut...@gmail.com said: Yes, it does: Operating systems do as well . -- Andrea -- https://mail.python.org/mailman/listinfo/python-list

Re: collect2: ld returned 1 exit status when building from source

2016-09-12 Thread BartC
On 12/09/2016 07:59, dieter wrote: Steve D'Aprano writes: ... but the build still fails, with the same errors: Python/dtrace_stubs.o: In function `PyDTrace_LINE': /home/steve/python/python-dev/cpython/Include/pydtrace.h:25: multiple definition of `PyDTrace_LINE' Python/ceval.o:/home/steve/pyt

Re: Software Needs Philosophers

2016-09-12 Thread danutzp0
Yes, it does: https://philosoftware.wordpress.com/ -- https://mail.python.org/mailman/listinfo/python-list

Re: KeyError: 'handlers.RotatingFileHandler'

2016-09-12 Thread Peter Otten
Daiyue Weng wrote: > Hi, I am trying to use 'RotatingFileHandler' in a logging config file, > > import logging > import logging.config > import logging.handlers > > logging.config.fileConfig('logging.conf') > > > [loggers] > keys=root,ingestion_log > > [handlers] > keys=consoleHandler,fileHan

Re: Mysterious Logging Handlers

2016-09-12 Thread Chris Angelico
On Tue, Sep 13, 2016 at 2:12 AM, Josh English wrote: >> > Even more mysterious, after I run the file (in an IDE so I have a REPL >> > afterwards), I have: >> >> Don't run your code in an IDE. The interaction between your and their code >> can make debugging harder than necessary. > > I suspect the

KeyError: 'handlers.RotatingFileHandler'

2016-09-12 Thread Daiyue Weng
Hi, I am trying to use 'RotatingFileHandler' in a logging config file, import logging import logging.config import logging.handlers logging.config.fileConfig('logging.conf') [loggers] keys=root,ingestion_log [handlers] keys=consoleHandler,fileHandler [formatters] keys=ingestFormatter [logger

Re: Mysterious Logging Handlers

2016-09-12 Thread Josh English
On Friday, September 9, 2016 at 11:31:13 AM UTC-7, Peter Otten wrote: > Josh English wrote: > > > > > LOG = logging.getLogger('SHIPPING') > > FORMAT = '%(asctime)-15s %(name)s %(level)-8s %(message)s' > > That should be either levelname or levelno in the format string. Yeah, I caught that after

Re: Mysterious Logging Handlers

2016-09-12 Thread Josh English
On Friday, September 9, 2016 at 11:29:32 AM UTC-7, John Gordon wrote: > In <247db0ab-efe7-484b-a418-dd219f68a...@googlegroups.com> Josh English > writes: > > > When I run the scriptI get logging information from only xlreader, not > > from the main script: > > > DEBUG:XLREADER:Creating Excel Re

Re: memberof example using ldap

2016-09-12 Thread John Gordon
In Robert Clove writes: > Hi, > I have to find if user is the member of a group, for this i am using the > following query > (&(objectClass=user)(sAMAccountName=yourUserName) > (memberof=CN=YourGroup,OU=Users,DC=YourDomain,DC=com)) > The above query doesn't work fine even if group doesn't e

Re: How to split value where is comma ?

2016-09-12 Thread alister
On Mon, 12 Sep 2016 14:30:32 +, Grant Edwards wrote: > On 2016-09-12, jmp wrote: >> On 09/11/2016 02:12 PM, Chris Angelico wrote: >>> On Thu, Sep 8, 2016 at 7:27 PM, Joaquin Alzola >>> wrote: > I have worked places where they put stuff like this at the bottom of > emails sent to the

Re: [Python-ideas] Inconsistencies

2016-09-12 Thread alister
On Mon, 12 Sep 2016 16:12:02 +0300, Marko Rauhamaa wrote: > "Eric S. Johansson" : > >> On 9/11/2016 10:26 PM, Chris Angelico wrote: >>> No, God isn't part of the universe, any more than an author is part of >>> his novel. >>> >> as any fiction writer will tell you, the author is found in one or m

Re: How to split value where is comma ?

2016-09-12 Thread Grant Edwards
On 2016-09-12, jmp wrote: > On 09/11/2016 02:12 PM, Chris Angelico wrote: >> On Thu, Sep 8, 2016 at 7:27 PM, Joaquin Alzola >> wrote: I have worked places where they put stuff like this at the bottom of emails sent to the person sitting next to them :) -raising entropy-ly yrs- Ro

Re: How to split value where is comma ?

2016-09-12 Thread Chris Angelico
On Tue, Sep 13, 2016 at 12:00 AM, jmp wrote: > On 09/11/2016 02:12 PM, Chris Angelico wrote: >> >> On Thu, Sep 8, 2016 at 7:27 PM, Joaquin Alzola >> wrote: I have worked places where they put stuff like this at the bottom of emails sent to the person sitting next to them :) -raisin

Re: How to split value where is comma ?

2016-09-12 Thread jmp
On 09/11/2016 02:12 PM, Chris Angelico wrote: On Thu, Sep 8, 2016 at 7:27 PM, Joaquin Alzola wrote: I have worked places where they put stuff like this at the bottom of emails sent to the person sitting next to them :) -raising entropy-ly yrs- Robin Becker Cannot do anything about it. It is

Re: [Python-ideas] Inconsistencies

2016-09-12 Thread Marko Rauhamaa
"Eric S. Johansson" : > On 9/11/2016 10:26 PM, Chris Angelico wrote: >> No, God isn't part of the universe, any more than an author is part >> of his novel. >> > as any fiction writer will tell you, the author is found in one or > more of their characters. God created us in his image. IOW, God is

memberof example using ldap

2016-09-12 Thread Robert Clove
Hi, I have to find if user is the member of a group, for this i am using the following query (&(objectClass=user)(sAMAccountName=yourUserName) (memberof=CN=YourGroup,OU=Users,DC=YourDomain,DC=com)) (memberof=CN=YourGroup,OU=Users,DC=YourDomain,DC=com)== values from distinguished name of your

Re: [Python-ideas] Inconsistencies

2016-09-12 Thread jmp
On 09/12/2016 03:11 AM, Chris Angelico wrote: On Mon, Sep 12, 2016 at 6:30 AM, Sven R. Kunze wrote: I could not agree more with what you said above, so I hope this will put the discussion in better perspective, especially when people here trying to be overly absolute in their views (which was

Re: Problem with difflib SequenceMatcher

2016-09-12 Thread Alain Ketterlin
Jay writes: > I am having an odd problem with difflib.SequenceMatcher. Sample code below: > > The strings "src" and "trg" differ only a little. How exactly? (Please be precise, it helps testing.) > The SequenceMatcher.ratio() for these strings 0.0. Many other similar > strings are working fine

Problem with difflib SequenceMatcher

2016-09-12 Thread Jay
Hello I am having an odd problem with difflib.SequenceMatcher. Sample code below: The strings "src" and "trg" differ only a little. The SequenceMatcher.ratio() for these strings 0.0. Many other similar strings are working fine without problems (see below) with non-zero ratios depending on how muc

Re: Expression can be simplified on list

2016-09-12 Thread Chris Angelico
On Mon, Sep 12, 2016 at 9:14 PM, Daiyue Weng wrote: > Hi, I found that when I tried to make an equality test on empty like, > > if errors == []: > > PyCharm always warns me, > > Expression can be simplified. > > I am wondering what's wrong and how to fix this? > If you know that 'errors' is alway

Expression can be simplified on list

2016-09-12 Thread Daiyue Weng
Hi, I found that when I tried to make an equality test on empty like, if errors == []: PyCharm always warns me, Expression can be simplified. I am wondering what's wrong and how to fix this? cheers -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-ideas] Inconsistencies

2016-09-12 Thread Eric S. Johansson
On 9/11/2016 10:26 PM, Chris Angelico wrote: > No, God isn't part of the universe, any more than an author is part of > his novel. > as any fiction writer will tell you, the author is found in one or more of their characters. -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-ideas] Inconsistencies

2016-09-12 Thread Robin Becker
On 11/09/2016 21:30, Sven R. Kunze wrote: On 10.09.2016 15:00, Chris Angelico wrote: Some things are absolute hard facts. There is no way in which 1 will ever be greater than 2, ergo "1 is less than 2" is strictly true, and not a matter of opinion. If you hear someone trying to claim otherwise,

Re: [Python-ideas] Inconsistencies

2016-09-12 Thread not1xor1
Il 12/09/2016 04:26, Chris Angelico ha scritto: So whoever created the Universe also created the Creator... No, God isn't part of the universe, any more than an author is part of his novel. your logic is based on the assumption that the _existance_ itself, i.e. the mere presence of something,

Re: collect2: ld returned 1 exit status when building from source

2016-09-12 Thread dieter
Steve D'Aprano writes: > ... > but the build still fails, with the same errors: > > > Python/dtrace_stubs.o: In function `PyDTrace_LINE': > /home/steve/python/python-dev/cpython/Include/pydtrace.h:25: multiple > definition of `PyDTrace_LINE' > Python/ceval.o:/home/steve/python/python-dev/cpython/I