Re: XML Considered Harmful

2021-09-22 Thread Pete Forman
Jon Ribbens writes: > On 2021-09-21, Pete Forman wrote: >> CSV is quite good as a lowest common denominator exchange format. I >> say quite because I would characterize it by 8 attributes and you >> need to pick a dialect such as MS Excel which sets out what those

Re: XML Considered Harmful

2021-09-21 Thread Pete Forman
> for the job in hand. > > Naturally. That's what I'm exploring. You might also like to consider HDF5. It is targeted at large volumes of scientific data and its capabilities are well above what you need. MATLAB, Octave and Scilab use it as their native format. PyTables and h2py provide Python/NumPy bindings to it. -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

[issue33433] ipaddress is_private misleading for IPv4 mapped IPv6 addresses

2021-05-16 Thread Pete Wicken
Pete Wicken added the comment: I've opened a PR that should hopefully address this issue. -- ___ Python tracker <https://bugs.python.org/issue33433> ___ ___

[issue33433] ipaddress is_private misleading for IPv4 mapped IPv6 addresses

2021-05-16 Thread Pete Wicken
Change by Pete Wicken : -- keywords: +patch pull_requests: +24799 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26172 ___ Python tracker <https://bugs.python.org/issu

[issue28577] ipaddress.ip_network(...).hosts() returns nothing for an IPv4 /32

2021-04-22 Thread Pete Wicken
Change by Pete Wicken : -- pull_requests: +24255 pull_request: https://github.com/python/cpython/pull/25536 ___ Python tracker <https://bugs.python.org/issue28

[issue28577] ipaddress.ip_network(...).hosts() returns nothing for an IPv4 /32

2021-04-22 Thread Pete Wicken
Change by Pete Wicken : -- pull_requests: +24252 pull_request: https://github.com/python/cpython/pull/25533 ___ Python tracker <https://bugs.python.org/issue28

[issue28577] ipaddress.ip_network(...).hosts() returns nothing for an IPv4 /32

2021-04-22 Thread Pete Wicken
Change by Pete Wicken : -- pull_requests: +24251 pull_request: https://github.com/python/cpython/pull/25532 ___ Python tracker <https://bugs.python.org/issue28

[issue42935] Pickle can't import builtins at exit

2021-01-16 Thread Pete Wicken
Pete Wicken added the comment: Out of curiosity, why is there not much we can do? I'm not familiar enough with Python's C code to appreciate the difficulty of making the builtins available at the point where the pickle save is run when exiting. The fact that this segfaults in the 3.8

[issue42935] Pickle can't import builtins at exit

2021-01-15 Thread Pete Wicken
New submission from Pete Wicken : Originally found as an issue in Lib/shelve.py; if we attempt to pickle a builtin as the program is exiting then Modules/_pickle.c will fail at the point of the PyImport_Import in save_global. In CPython3.8 this causes a segfault, in CPython3.9

Re: Replacement for pygtk?

2020-09-07 Thread Pete Forman
PyQt. Most KDE apps do pull in > hundreds of packages, but I haven't had to install that many just to > use PyQt. Once you have one Qt app in a Gtk DE, or vice versa, then you have taken most of the hit for packages. I doubt that many people run pure versions of either. -- Pete Forman --

[issue28577] ipaddress.ip_network(...).hosts() returns nothing for an IPv4 /32

2020-05-11 Thread Pete Wicken
Pete Wicken added the comment: The patch for this has been merged - I guess this can be closed now? -- ___ Python tracker <https://bugs.python.org/issue28

[issue33433] ipaddress is_private misleading for IPv4 mapped IPv6 addresses

2020-03-03 Thread Pete Wicken
Change by Pete Wicken : -- nosy: +Wicken ___ Python tracker <https://bugs.python.org/issue33433> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28577] ipaddress.ip_network(...).hosts() returns nothing for an IPv4 /32

2020-03-03 Thread Pete Wicken
Pete Wicken added the comment: Ok it was bugging me that they were different, so I also added the same logic for IPv6Networks. -- ___ Python tracker <https://bugs.python.org/issue28

[issue28577] ipaddress.ip_network(...).hosts() returns nothing for an IPv4 /32

2020-03-02 Thread Pete Wicken
Pete Wicken added the comment: I've had a go at implementing this. I did not implement for IPv6 as this was not mentioned here, but it seems like it would make sense for it as well. I can add that in too if you like. -- ___ Python tracker <ht

[issue28577] ipaddress.ip_network(...).hosts() returns nothing for an IPv4 /32

2020-03-02 Thread Pete Wicken
Change by Pete Wicken : -- keywords: +patch nosy: +Wicken nosy_count: 5.0 -> 6.0 pull_requests: +18112 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18757 ___ Python tracker <https://bugs.python.org/i

[issue39710] "will be returned as unicode" reminiscent from Python 2

2020-02-28 Thread Pete Wicken
Change by Pete Wicken : -- pull_requests: +18053 pull_request: https://github.com/python/cpython/pull/18691 ___ Python tracker <https://bugs.python.org/issue39

[issue39710] "will be returned as unicode" reminiscent from Python 2

2020-02-28 Thread Pete Wicken
Change by Pete Wicken : -- pull_requests: -18050 ___ Python tracker <https://bugs.python.org/issue39710> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39710] "will be returned as unicode" reminiscent from Python 2

2020-02-28 Thread Pete Wicken
Change by Pete Wicken : -- nosy: +Wicken nosy_count: 3.0 -> 4.0 pull_requests: +18050 pull_request: https://github.com/python/cpython/pull/18691 ___ Python tracker <https://bugs.python.org/issu

[issue38750] Solve IPv4 categorisation issues with the ipaddress module

2019-11-08 Thread Pete Wicken
Pete Wicken added the comment: In addition to my previous comment, I think a more generic "is_special" could cover everything in the IANA special purpose address table for ease of checking anything that isn't publicly available IP. --

[issue38750] Solve IPv4 categorisation issues with the ipaddress module

2019-11-08 Thread Pete Wicken
Change by Pete Wicken : -- components: +Library (Lib) type: -> behavior versions: +Python 3.9 ___ Python tracker <https://bugs.python.org/issue38750> ___ _

[issue38750] Solve IPv4 categorisation issues with the ipaddress module

2019-11-08 Thread Pete Wicken
New submission from Pete Wicken : As alluded to in issue bpo-38655, the behaviour for getting categorising IPv4 networks is inconsistent with the IANA guideline, which the docs say it follows. I'm proposing we either change the documentation so that it describes the behaviour that should

[issue38655] ipaddress.ip_network('0.0.0.0/0').is_private == True

2019-11-05 Thread Pete Wicken
Pete Wicken added the comment: Looks like this happens because the is_private method that gets called is from _BaseNetwork, which checks if the network address '0.0.0.0' and the broadcast address '255.255.255.255' are both private, which they are as 0.0.0.0 falls into 0.0.0.0/8. I think

[issue38657] String format for hexadecimal notation breaks padding with alternative form

2019-11-03 Thread Pete Wicken
Change by Pete Wicken : -- keywords: +patch pull_requests: +16548 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17036 ___ Python tracker <https://bugs.python.org/issu

[issue38657] String format for hexadecimal notation breaks padding with alternative form

2019-11-02 Thread Pete Wicken
Pete Wicken added the comment: Given the comments above I appreciate that this is actually due to the padding being the total field width rather than the padding of the digits themselves. Having revised the documentation again, I believe this following line is explaining it: "

[issue38657] String format for hexadecimal notation breaks padding with alternative form

2019-10-31 Thread Pete Wicken
New submission from Pete Wicken : When formatting an integer as a hexadecimal value, the '#' alternate form modifier inserts a preceding '0x'. If this is used in combination with padding modifiers, the '0x' is counted as part of the overall width, which does not feel like the natural

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-24 Thread Pete Forman
e point reportlab will be made 3.x only which will require more > effort. Packages like reportlab with a need to support both Python 2 and 3 end up with the worst of both worlds. The initial drive for Py3k was to drop cruft that had accumulated over the years. Mixing old and new hampers your ability to write clean 3 code. -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

[issue33442] Python 3 doc sidebar dosnt follow page scrolling like 2.7 doc sidebar.

2018-05-07 Thread Pete Moore
New submission from Pete Moore <1petemo...@gmail.com>: the 3.x docs sidebar at location https://docs.python.org/3.6/library/logging.html does not follow the user's scrolling movements like the 2.7 docs sidebar at location https://docs.python.org/2.7/library/logging.html -- as

Re: This newsgroup (comp.lang.python) may soon be blocked by Google Groups

2018-02-01 Thread Pete Forman
no public, searchable archive > of comp.lang.idl-pvwave available. This was the real benefit of Google > groups, from my point of view. > > There is something called "narkive", but its search function seems to > be broken, and it doesn't archive very far back in time. A couple of other mail archivers are: https://www.mail-archive.com https://marc.info -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: how to read in the newsreader

2017-10-17 Thread Pete Forman
Thomas Jollans <t...@tjol.eu> writes: > On 16/10/17 20:02, Pete Forman wrote: >> Thomas Jollans <t...@tjol.eu> writes: >> >>> On 2017-10-16 08:48, Pete Forman wrote: >>>> Andrew Z <form...@gmail.com> writes: >>>> >>&g

Re: how to read in the newsreader

2017-10-16 Thread Pete Forman
Thomas Jollans <t...@tjol.eu> writes: > On 2017-10-16 08:48, Pete Forman wrote: >> Andrew Z <form...@gmail.com> writes: >> >>> hmm. i did do that. maybe just a delay. >>> I'll see how it will go tomorrow then. Thank you gents. >>> >

Re: how to read in the newsreader

2017-10-16 Thread Pete Forman
igest then check your newsreader for a feature to expand it. Then you can read and reply as if you were getting individual posts. -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: Case-insensitive string equality

2017-09-01 Thread Pete Forman
? This seems to me to be rather similar to sort() and sorted(). How about giving equals() an optional parameter key, and perhaps the older cmp? Using casefold or upper or lower would satisfy many use cases but also allow Unicode or more locale specific normalization to be applied. The shortcircuiting in a character based comparison holds little appeal for me. I generally find that a string is a more useful concept than a collection of characters. +1 for using an affix in the name to represent a normalized version of the input. -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: What's with all of the Case Solution and Test Bank nonsense posts?

2017-07-10 Thread Pete Forman
eric web forum API. RFC 4642 (updated by RFC 8143) describes the use of TLS with NNTP. It enhances the connection between NNTP client and server, primarily with encryption but optionally with other benefits. Of course it does nothing to improve the content of Usenet. -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: Who still supports recent Python on shared hosting

2017-03-05 Thread Pete Forman
ion says 2.6. > > Is Python on shared hosting dead? > I don't need a whole VM and something I > have to sysadmin, just a small shared > hosting account. I use OpenShift from Red Hat on their free hosting package. They offer Python 3.5, 3.3 and 2.7. -- Pete Forman https://payg-petef.rhclo

Exposing all methods of a class

2017-02-26 Thread Pete Dowdell
and grab the parent classes to insert into the editor view. Any suggestions? Maybe there are better ways of navigating inheritance but it does seem logical to expose the whole class code in one place, suitably annotated. I feel a plugin coming on. Ta, Pete -- https://mail.python.org/mailman

Re: PEP 393 vs UTF-8 Everywhere

2017-01-21 Thread Pete Forman
e build or Python 3.3+ then all is rosy. (At this point I'm tempted to put in a winky emoji but that might push the internal representation into UCS-4.) -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP 393 vs UTF-8 Everywhere

2017-01-21 Thread Pete Forman
2003). There is CESU-8 if you really need a naive encoding of UTF-16 to UTF-8-alike. py> low = '\uDC37' is only meaningful on narrow builds pre Python 3.3 where the user must do extra to correctly handle characters outside the BMP. -- Pete Forman https://payg-petef.rhcloud.com -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP 393 vs UTF-8 Everywhere

2017-01-20 Thread Pete Forman
about why PEP 393 was adopted to replace the deficient old implementations rather than another approach. The implicit question is whether a UTF-8 internal representation should replace that of PEP 393. -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP 393 vs UTF-8 Everywhere

2017-01-20 Thread Pete Forman
Chris Kaynor <ckay...@zindagigames.com> writes: > On Fri, Jan 20, 2017 at 2:35 PM, Pete Forman <petef4+use...@gmail.com> wrote: >> Can anyone point me at a rationale for PEP 393 being incorporated in >> Python 3.3 over using UTF-8 as an internal string representation?

PEP 393 vs UTF-8 Everywhere

2017-01-20 Thread Pete Forman
as a sequence of characters, is that a reason to shoehorn the subtleties of Unicode into that model? -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: lxml and xpath(?)

2016-10-27 Thread Pete Forman
;./name/text()") That enforces a single result. The original code will detect a lack of results but if the query returns multiple results when only one is expected then it silently returns the first. -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: Python packages listed in PyPI

2016-07-21 Thread Pete Forman
ditional downloads is automatic in pip. If the package you are installing requires some other packages then it will install those too. -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: Python packages listed in PyPI

2016-07-21 Thread Pete Forman
work on Windows as that does not bundle a compiler. -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: best text editor for programming Python on a Mac

2016-06-19 Thread Pete Forman
od at it its pretty amazing -- and no mouse. The other thing > about vim is that it is on every linux system, so you don't have to > load your editor if you are ssh-ing to some machine Both emacs and vim are powerful tools in the hands of experienced users but I would recommend ne

Re: Method Chaining

2016-06-19 Thread Pete Forman
Rustom Mody <rustompm...@gmail.com> writes: > On Saturday, June 18, 2016 at 5:34:30 PM UTC+5:30, Pete Forman wrote: >> Rustom Mody writes: >> [snip] >> >> One subtle difference between your two citations is that VB uses a >> leading dot. Might that lessen

Re: Method Chaining

2016-06-18 Thread Pete Forman
Joonas Liik <liik.joo...@gmail.com> writes: > On 18 June 2016 at 15:04, Pete Forman <petef4+use...@gmail.com> wrote: >> Rustom Mody <rustompm...@gmail.com> writes: >> >>> On Friday, June 17, 2016 at 2:58:19 PM UTC+5:30, Steven D'Aprano wrote: >>

Re: value of pi and 22/7

2016-06-18 Thread Pete Forman
t; with one significant digit, so the ratio of the two measurements >> should only have one significant digit. > > I’m not sure how you can write “30” with one digit... >>> int('U', 36) 30 -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: Method Chaining

2016-06-18 Thread Pete Forman
ses a leading dot. Might that lessening of ambiguity enable a future Python to allow this? class Foo: def .set(a): # equivalent to def set(self, a): .a = a# equivalent to self.a = a Unless it is in a with statement with obj: .a = 1# equivalent to obj.a = 1 .total = .total + 1 # obj.total = obj.total + 1 -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: Format a timedelta object

2016-05-27 Thread Pete Forman
ons; most people are familiar only with the date amd time formats. There are variations available but PnDTnHnMnS is probably the best. The biggest timedelta unit is days. Years and months are not appropriate. -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: for / while else doesn't make sense

2016-05-24 Thread Pete Forman
Gregory Ewing <greg.ew...@canterbury.ac.nz> writes: > Pete Forman wrote: >> However I am coming from scientific measurements where 1.0 is the >> stored value for observations between 0.95 and 1.05. > > You only know that because you're keeping some extra informatio

Re: for / while else doesn't make sense

2016-05-23 Thread Pete Forman
Ian Kelly <ian.g.ke...@gmail.com> writes: > On Mon, May 23, 2016 at 12:16 PM, Pete Forman <petef4+use...@gmail.com> wrote: >> Something else which I do not think has been stated yet in this >> thread is that floating point is an inexact representation. Just >

Re: for / while else doesn't make sense

2016-05-23 Thread Pete Forman
Something else which I do not think has been stated yet in this thread is that floating point is an inexact representation. Just because integers and binary fractions have an exact correspondence we ought not to be affording them special significance. Floating point 1 is not the integer 1, it stands for

Re: RFC: name for project of a cross version disassembler, and unmarshal program

2016-05-23 Thread Pete Forman
Rustom Mody <rustompm...@gmail.com> writes: > On Monday, May 23, 2016 at 1:38:41 PM UTC+5:30, rocky wrote: >> On Monday, May 23, 2016 at 2:17:07 AM UTC-4, Pete Forman wrote: >> > rocky writes: >> > >> > > I'm looking for a good name for a r

Re: RFC: name for project of a cross version disassembler, and unmarshal program

2016-05-23 Thread Pete Forman
". See > https://github.com/rocky/python-pyxdis. > > In the past I've been told by Polish-speaking people that my names are > hard to pronounce. (If you've ever heard any Polish tongue twisters, > you'll know that this really hurts.) > > Any suggestions for a better name? relipmoc -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: Guido sees the light: PEP 8 updated

2016-04-19 Thread Pete Forman
Rustom Mody <rustompm...@gmail.com> writes: > On Tuesday, April 19, 2016 at 6:49:34 AM UTC+5:30, sohcatoa wrote: >> On Monday, April 18, 2016 at 2:14:17 PM UTC-7, Pete Forman wrote: >> > Why is it that Python continues to use a fixed width font and therefore >> >

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread Pete Forman
Ian Kelly <ian.g.ke...@gmail.com> writes: > On Mon, Apr 18, 2016 at 3:14 PM, Pete Forman <petef4+use...@gmail.com> wrote: >> Why is it that Python continues to use a fixed width font and >> therefore specifies the maximum line width as a character count? >> >

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread Pete Forman
with hard tabs, that is not germane to my question). The content of the line need not be bound by the rules needed to position its start. -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: Continuing indentation

2016-03-02 Thread Pete Forman
) > > Those feel like warping your code around the letter of the law, > without really improving anything. I beg to differ. If an expression is long or complex then splitting it up and, importantly, giving good names to the intermediates makes the code clearer. That advice is not restricted to if statements. -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: Calculating longitudinal acceleration, lateral acceleration and normal acceleration

2016-01-24 Thread Pete Dowdell
On 24/01/16 07:27, Robert James Liguori wrote: Is there a python library to calculate longitudinal acceleration, lateral acceleration and normal acceleration? Might be rocket science... pd -- https://mail.python.org/mailman/listinfo/python-list

Re: Extracting and summing student scores from a JSON file using Python 2.7.10

2015-11-10 Thread Pete Dowdell
On 10/11/15 08:12, Bernie Lazlo wrote: > > import json > >import urllib > >url ="http://www.wickson.net/geography_assignment.json; > >response = urllib.urlopen(url) > >data = json.loads(response.read()) All good up to data. Now: # make a list of scores scores = [d['score'] for d in

Re: Converting a string into a float that includes the negative

2015-11-08 Thread Pete Dowdell
On 08/11/15 09:11, phamton...@gmail.com wrote: I am having issue with converting the string into a float because there is a negative, so only end up with "ValueError: invalid literal for float(): 81.4]"81.4] The error is right there in the exception: you are trying to cast '81.4]' - that's a

Re: Problem working with subprocess.check_call

2015-10-29 Thread Pete Dowdell
On 29/10/15 16:52, David Aldrich wrote: Hi I am working on Linux with Python 3.4. I want to do a bash diff on two text files and show just the first 20 lines of diff’s output. So I tried: >>> cmd = 'head -20 <(diff ' + file1 + ' ' + file2 + ')' >>> subprocess.check_call(cmd, shell=True)

Re: file.write() of non-ASCII characters differs in Interpreted Python than in script run

2015-08-26 Thread Pete Dowdell
On 26/08/15 04:19, RAH wrote: UnicodeEncodeError: 'ascii' codec can't encode character '\\xc7' in position 15: ordinal not in range(128) (Hi all, this is my first post to the list) This can be a frustrating issue to resolve, but your issue might be solved with this environment variable:

[issue24501] configure does not find (n)curses in /usr/local/libs

2015-06-24 Thread Pete Lancashire
Changes by Pete Lancashire p...@petelancashire.com: -- components: Build nosy: petepdx priority: normal severity: normal status: open title: configure does not find (n)curses in /usr/local/libs type: compile error versions: Python 2.7 ___ Python

[issue24501] configure does not find (n)curses in /usr/local/libs

2015-06-24 Thread Pete Lancashire
New submission from Pete Lancashire: ./configure does not find ncurses in /usr/local/lib, an older version of (one I don't want to use) copy exists in /usr/lib checking curses.h usability... yes checking curses.h presence... yes checking for curses.h... yes checking ncurses.h usability

[issue24501] configure does not find (n)curses in /usr/local/libs

2015-06-24 Thread Pete Lancashire
Pete Lancashire added the comment: added stdout of ./configure -- Added file: http://bugs.python.org/file39804/configure.out ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24501

Re: Sudoku solver

2015-03-26 Thread Pete Forman
|*** ***|***|418 ---+---+--- ***|*81|*** **2|***|*5* *4*|***|3** Solved, rating: dead easy Calculation took 18.006 ms 264|715|839 137|892|645 598|436|271 ---+---+--- 423|178|596 816|549|723 759|623|418 ---+---+--- 375|281|964 982|364|157 641|957|382 -- Pete Forman http://petef.22web.org/payg.html

Re: Martijn Faassen: The Call of Python 2.8

2014-04-14 Thread Pete Forman
if we adopted a non-numeric name for this product to support eXisting Python for those who were notified some years ago that Python 2 would be superseded? How about Python XP? I thought not ;-) -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: Teaching python to non-programmers

2014-04-11 Thread pete . bee . emm
On Thursday, April 10, 2014 3:40:22 PM UTC-7, Rhodri James wrote: It's called irony, and unfortunately Mark is reacting to an all-to-common situation that GoogleGroups foists on unsuspecting posters like yourself. People who say I can't be bothered to correct this while posting a wise a$$

Re: how to make [a,b,[c,d],e] into ['a', 'b', 'c', 'd', 'e'] ?

2014-04-10 Thread pete . bee . emm
I've been using compiler.ast.flatten, but I have comments indicating it will need be replaced if/when I move to Python 3. I don't pollute my code base with flatten, I just call my own version in my utility library that is currently redirecting to flatten. flatten works equally well with

Re: Teaching python to non-programmers

2014-04-10 Thread pete . bee . emm
Don't underestimate the value of morale. Python is a scripting language. You don't need to teach them very much python to get something working, and you can always revisit the initial code and refactor it for better coding hygiene. Someday they might have jobs, and be required to learn things

Re: Teaching python to non-programmers

2014-04-10 Thread pete . bee . emm
Just awesome, not only do we have double line spacing and single line paragraphs, we've also got top posting, oh boy am I a happy bunny :) I'll leave someone3 else to explain, I just can't be bothered. Do you get paid to be a jerk, or is it just for yuks? If the latter, you're

[issue20798] Reversed order in testtools messages

2014-02-27 Thread Pete Zaitcev
New submission from Pete Zaitcev: When using an assert such as self.assertEquals(tester(), expected), an error message suggests wrong argument order (as in, not the order in examples in the documentation). Apparently this is confusing enough that OpenStack even opened a whole bunch of bugs

[issue20798] Reversed order in testtools messages

2014-02-27 Thread Pete Zaitcev
Pete Zaitcev added the comment: Oh, indeed. The printout is in testtools only. The unittest prints this: [zaitcev@guren xxx]$ python3 -c 'import nose; nose.main()' F == FAIL: test_testEquals (testic.TestConfigTrueValue

Re: How to begin

2014-02-13 Thread pete suchsland
On Thursday, February 13, 2014 6:18:26 AM UTC-7, weixixiao wrote: http://www.codecademy.com I have learned the basic rules of Python in this website. What should I do next?where to go? I download the Pycharm the free version and I think I dunno how to use it except a Hello

Re: pip3.x error using LIST instead of list

2014-02-12 Thread Pete Forman
, and Linux computers for years: disable the caps-lock key My solution on Windows is to turn on Toggle Keys in the Accessibility options. That beeps when the Caps Lock (or Num or Scroll) is pressed. -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: Using virtualenv to bypass sudoer issues

2014-02-10 Thread Pete Forman
and activation is handled. E.g. in a fabfile myenv/bin/python myscript.py -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: Sorting dictionary by datetime value

2014-02-10 Thread pete suchsland
How about make it simple by using sorted(a.values()) ... a = {} a['first'] = datetime.datetime.now() a['second'] = datetime.datetime.now() a['third'] = datetime.datetime.now() a['forth'] = datetime.datetime.now() a['fifth'] = datetime.datetime.now() sorted(a.values())

Re: pytz question: GMT vs. UTC

2014-02-02 Thread Pete Forman
. And remember to write kelvins. SI units named after people such as kelvin, watt and pascal are lower case while their symbols have a leading capital: K, W, Pa. -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: Guessing the encoding from a BOM

2014-01-17 Thread Pete Forman
if there was an eighth encoding scheme defined there UTF-8NB which would be UTF-8 with BOM not allowed. -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

Re: Guessing the encoding from a BOM

2014-01-17 Thread Pete Forman
!!! :) Special delivery, a berm! Were you expecting one? Endian detection: Does my BOM look big in this? -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

[issue19269] subtraction of pennies incorrect rounding or truncation problem

2013-10-15 Thread Pete
New submission from Pete: Python makes errors on simple subtraction with 'pennies'. 2000.0 - 1880.98 119.019998 See attached file for more examples... -- components: Windows files: py_subtraction_bug messages: 200035 nosy: radiokinetics.pete priority: normal severity: normal

Re: Encoding of surrogate code points to UTF-8

2013-10-08 Thread Pete Forman
or UTF-32. -- Pete Forman -- https://mail.python.org/mailman/listinfo/python-list

[issue19088] TypeError with pickle in embedded python3.3 when starting multiple Interpreters.

2013-09-25 Thread Larry Pete
New submission from Larry Pete: Hexchat (fork of XChat IRC Client) switched with version 2.9.6 to Python 3.3 for their Python plugins. Hexchat loads plugins in a similar fashion like the attached C file (not entirely sure I used the C-API right though). For every plugin a new interpreter

Re: PyQt5 and virtualenv problem

2013-08-02 Thread Pete Forman
/PySide The Riverbank installer can install PyQt5 to your master copy of Python. You can then use the --system-site-packages flag when creating a virtualenv. The default behavior of virtualenv changed in 1.7 (2011-11-30) from including system packages to excluding them. -- Pete Forman -- http

Re: Popen and reading stdout in windows

2013-06-11 Thread Pete Forman
() and I have sent stdout to PIPE without luck. Just not sure what is the proper way to iterate over the stdout as it eventually makes its way from the buffer. You could try Sarge which is a wrapper for subprocess providing command pipeline functionality. http://sarge.readthedocs.org/ -- Pete Forman

[issue12641] Remove -mno-cygwin from distutils

2013-05-21 Thread Pete Forman
Pete Forman added the comment: Another +1 for Oscar. I've just done an install of Python 2.7.5 and had to hack cygwinccompiler.py again. I'm using mingw with gcc 4.6.2 on Windows 7. -- nosy: +Pete.Forman ___ Python tracker rep...@bugs.python.org

Re: LBYL vs EAFP

2013-02-05 Thread Pete Forman
, where the criterion depends on what your code is aiming to do with the value. BTW what if the value is Not-a-Number? ;-) -- Pete Forman -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL or something to open EXIF Metadata with Python

2013-01-10 Thread Pete Forman
https://bitbucket.org/haypo/hachoir/wiki/Home -- Pete Forman -- http://mail.python.org/mailman/listinfo/python-list

[issue16210] combine the two type() definitions in built-in function docs

2012-10-23 Thread Pete Sevander
Pete Sevander added the comment: Here's a patch for it. -- keywords: +patch nosy: +sevanteri Added file: http://bugs.python.org/file27671/issue16210.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16210

Re: Parsing ISO date/time strings - where did the parser go?

2012-09-12 Thread Pete Forman
-offset of -00:00 means UTC but local time is unknown -- Pete Forman -- http://mail.python.org/mailman/listinfo/python-list

setdefault behaviour question

2012-05-19 Thread pete McEvoy
I am confused by some of the dictionary setdefault behaviour, I think I am probably missing the obvious here. def someOtherFunct(): print in someOtherFunct return 42 def someFunct(): myDict = {1: 2} if myDict.has_key(1): print myDict has key 1 x = myDict.setdefault(1,

Re: setdefault behaviour question

2012-05-19 Thread pete McEvoy
Ah - I have checked some previous posts (sorry, should have done this first) and I now can see that the lazy style evaluation approach would not be good. I can see the reasons it behaves this way. many thanks anyway. -- http://mail.python.org/mailman/listinfo/python-list

[issue2745] Add support for IsWow64Process

2010-09-08 Thread Pete Bartlett
Pete Bartlett peter.bartl...@nomura.com added the comment: Hi, I am a Python user seeking an implementation of iswow64 and found this tracker. Unfortunately I don't think Martin's suggested alternative approach works. os.environ[PROCESSOR_ARCHITECTURE] returns x86 on my system when run from

Re: if, continuation and indentation

2010-06-09 Thread Pete Forman
variable to hold the result of the condition and then the if statement is more readable. -- Pete Forman-./\.- West Sussex, UK -./\.- http://petef.22web.net -./\.- petef4+use...@gmail.com -./\.- -- http://mail.python.org/mailman/listinfo/python-list

ANN: Twiggy 0.2, a more Pythonic logger

2010-06-03 Thread Pete
from the cheeseshop: http://pypi.python.org/pypi/Twiggy/ Feedback, help and donuts are always welcome. --Pete -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/

Exiting gracefully from ThreadingTCPServer

2010-03-12 Thread Pete Emerson
that I need *all* threads to close and not just the current one, so I'm not quite sure how to proceed. Pointers in the right direction are appreciated. And if there's a better way to do this threading httpd server (subjective, I realize), please let me know! Thanks. Pete

Re: Conditional based on whether or not a module is being used

2010-03-06 Thread Pete Emerson
On Mar 6, 2:38 pm, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: On Mar 5, 9:29 pm, Pete Emerson pemer...@gmail.com wrote: I have written my first module called logger that logs to syslog via the syslog module but also allows forloggingto STDOUT in debug mode at multiple levels (to increase

Re: Evaluate my first python script, please

2010-03-05 Thread Pete Emerson
Thanks for your response, further questions inline. On Mar 4, 11:07 am, Tim Wintle tim.win...@teamrubber.com wrote: On Thu, 2010-03-04 at 10:39 -0800, Pete Emerson wrote: I am looking for advice along the lines of an easier way to do this or a more python way (I'm sure that's asking

Re: Evaluate my first python script, please

2010-03-05 Thread Pete Emerson
On Mar 5, 7:00 am, Duncan Booth duncan.bo...@invalid.invalid wrote: Jean-Michel Pichavant jeanmic...@sequans.com wrote: And tell me how not using regexp will ensure the /etc/hosts processing is correct ? The non regexp solutions provided in this thread did not handled what you rightfully

  1   2   3   >