Re: How to diagnose this, fails on 3.6.3, works on 3.5.2?
Peter Otten <[email protected]> wrote: > Chris Green wrote: > > > I have a fairly simple little python program to automate starting an > > editor on a wiki page. It works fine on the system where I wrote it > > (xubuntu 16.04, python 3 version 3.5.2) but it comes up with the > > following error on a newer system (xubuntu 17.10, python 3 version > > 3.6.3). > > > > Here is the error:- > > > > chris$ no > > Traceback (most recent call last): > > File "/home/chris/bin/no", line 59, in > > os.execvp("vi", ("", monthFile,)) > > File "/usr/lib/python3.6/os.py", line 559, in execvp > > _execvpe(file, args) > > File "/usr/lib/python3.6/os.py", line 594, in _execvpe > > exec_func(fullname, *argrest) > > ValueError: execv() arg 2 first element cannot be empty > > > > Has execvp() become stricter in 3.6.3 or what? > > Yes; the relevant issue on the bug tracker seems to be > > https://bugs.python.org/issue28732 > OK, thanks all, I just need to put 'vi' in that empty parameter. -- Chris Green · -- https://mail.python.org/mailman/listinfo/python-list
MailingLogger 4.0.0 Released!
Only 4 years later than planned, I'm pleased to announce a new release of MailingLogger... Mailinglogger provides two handlers for the standard python logging framework that enable log entries to be emailed either as the entries are logged or as a summary at the end of the running process. The handlers have the following features: - customisable and dynamic subject lines for emails sent - emails sent with a configurable headers for easy filtering - flood protection to ensure the number of emails sent is not excessive - support for SMTP servers that require authentication - fully documented and tested This release has a bunch of changes: - Drop Zope and Plone support - Drop ZConfig support - Removed the deprecated "ignore" parameter to MailingLogger and SummarisingLogger. - Move from zope.testrunner to pytest for running tests. - Switch from manuel to sybil for checking examples in documentation. - Moved from buildout to virtualenv for development. - Gracefully handle bugs elsewhere that call SummarisingLogger.close() more than once in a multi-threaded or multi-process environment. Full docs can be found here: http://mailinglogger.readthedocs.io/en/latest/ For more information, please see: https://github.com/Simplistix/mailinglogger/ cheers, Chris -- https://mail.python.org/mailman/listinfo/python-list
Doubt in line_profiler documentation
I'm having trouble understanding something in the documentation of https://github.com/rkern/line_profiler The definition for the time column says - "Time: The total amount of time spent executing the line in the timer's units. In the header information before the tables, you will see a line 'Timer unit:' giving the conversion factor to seconds. It may be different on different systems." I don't really understand the conversion factor. For example, if the timer unit is :* 3.20802e-07 s* and a particular instruction's time column says its value is 83.0, is the time taken 83.0*3.20802e-07 s? Or is there more to it? If my understanding is correct however, why would there be a need for this? What could be the cause of this - " It may be different on different systems "? Can someone help me out? Thanks Abhiram R ᐧ -- https://mail.python.org/mailman/listinfo/python-list
Please Help
import numpy as np x=np.unit8([250) print(x) y=np.unit8([10]) print(y) z=x+y print(z) output [250] [10] [4] My question how is z [4] -- https://mail.python.org/mailman/listinfo/python-list
Re: Please Help
Please copy and paste the exact code you are running. The code you show has several syntax errors, and would not execute at all. Now, I think that I can read through your errors anyway, so let me ask you a question: what is the largest possible value that can be represented with an unsigned 8-bit integer? -- https://mail.python.org/mailman/listinfo/python-list
Re: Please Help
On 01/26/2018 08:33 PM, [email protected] wrote: import numpy as np x=np.unit8([250) print(x) y=np.unit8([10]) print(y) z=x+y print(z) output [250] [10] [4] My question how is z [4] Despite all the typos in your post, you appear to be doing 8 bit unsigned arithmetic. Do you know what that means? The answer you might have expected (i.e. 260) does not fit in the 0 ... 255 range of 8 bits, and so the result has overflowed and "wrapped around" to produce 4. Try this for a simpler example of the same: >>> np.uint8(260) 4 Gary Herron -- Dr. Gary Herron Professor of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list
