Multithreaded compression/decompression library with python bindings?

2017-10-04 Thread Thomas Nyberg
in advance! Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Easier way to do this?

2017-10-04 Thread Thomas Jollans
On 04/10/17 18:42, 20/20 Lab wrote: > Looking for advice for what looks to me like clumsy code. > > I have a large csv (effectively garbage) dump. I have to pull out > sales information per employee and count them by price range. I've got > my code working, but I'm thinking there must be a more re

Re: Easier way to do this?

2017-10-04 Thread Thomas Jollans
On 04/10/17 22:47, Fabien wrote: > On 10/04/2017 10:11 PM, Thomas Jollans wrote: >> Be warned, pandas is part of the scientific python stack, which is >> immensely powerful and popular, but it does have a distinctive style >> that may appear cryptic if you're used to the

Re: Python community "welcoming" feedback

2017-10-04 Thread Thomas Jollans
are probably tutor, python-dev and python-ideas. -- Thomas > > Thanks, > Bill > > >> >> Several people have stepped up their "welcome" game and I've been >> very impressed with the way things are going. >> >> Great job! >> >> Leam > -- https://mail.python.org/mailman/listinfo/python-list

Re: The "loop and a half"

2017-10-04 Thread Thomas Jollans
n you call the builtin print(). You can delve into the constituent parts of your favourite Python implementation or the language reference to prove it, but that's no longer simple. "simple and constituent parts" is, quite often, not well-defined. Iterators are pretty simple, and, while they have constituent parts, pretty fundamental to Python, at least in spirit. -- Thomas > -- https://mail.python.org/mailman/listinfo/python-list

Re: Lies in education [was Re: The "loop and a half"]

2017-10-05 Thread Thomas Jollans
On 2017-10-05 06:24, Steve D'Aprano wrote: > On Thu, 5 Oct 2017 02:14 pm, Stefan Ram wrote: > >> Chris Angelico writes: >>> You can get through a lot of life believing that mass is conserved, >>> but technically it is not, as can be proven. >> >> Well, in fact, it is conserved. > > It certainl

Re: Multithreaded compression/decompression library with python bindings?

2017-10-05 Thread Thomas Nyberg
add a wait in to the close method as follows: def close(self): self._tar.close() self._p.wait() However if I do that, the (parent) process will simply hang. If I don't have it everything seems to work fine as long as I let the parent process itself finish. Does anyone here know the best way to wait on the subprocess? Thanks for any help! Cheers, Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: OT I before E [was Re: Lies in education [was Re: The "loop and a half"]]

2017-10-05 Thread Thomas Jollans
ere are so few applicable cases, > and enough difficulty in applying the rule correctly, that the rule is not > worth the breath it takes to say it. Maybe we should just all switch to Dutch on this list. Might be easier. Certainly more consistent. groetjes Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Multithreaded compression/decompression library with python bindings?

2017-10-05 Thread Thomas Nyberg
to stream in my fashion, I'm certainly curious to hear about it. Cheers, Thomas -- https://mail.python.org/mailman/listinfo/python-list

How do native namespaces work?

2017-10-05 Thread Thomas Nyberg
__pycache__ example_pkg_b-1-py3.5.egg setuptools pipsetuptools-32.3.1.dist-info pip-9.0.1.dist-info -- Am I missing something totally obvious here? Does anyone here see what I'm doing wrong? Thanks for any help! Cheers, Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: How do native namespaces work?

2017-10-05 Thread Thomas Nyberg
prompt in my cleaned up prompt...) The venv was definitely activated (and in fact I tried again). Cheers, Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Multithreaded compression/decompression library with python bindings?

2017-10-05 Thread Thomas Jollans
On 05/10/17 20:38, Stephan Houben wrote: > Op 2017-10-05, Thomas Nyberg schreef : >> Btw if anyone knows a better way to handle this sort of thing, I'm all >> ears. Given my current implementation I could use any compression that >> works with stdin/stdout as long as I

Re: Interactive scripts (back on topic for once) [was Re: The "loop and a half"]

2017-10-06 Thread Thomas Jollans
re-arranged a program's input so > that some non-zero input fileno is attached to a terminal won't need the > prompt! stdin is ALWAYS fileno 0, whether the input is attached to a tty or not. The only situation where sys.stdin.fileno() != 0 is when sys.stdin has been reassigned from within python. $ python -c 'import sys; print(sys.stdin.fileno())' < /dev/zero 0 This should be true for all platforms, or at least all platforms python supports. > > > -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: The "loop and a half"

2017-10-06 Thread Thomas Jollans
On 2017-10-06 15:48, Dennis Lee Bieber wrote: > {Okay -- I've probably inspired someone to create an OS where one uses a > leading "-" to "undo" the normal action of the following command} For clarity, I think it should be +mount! and -mount! to mount and unmount, and +mount? to see what's mounted

Re: Interactive scripts (back on topic for once) [was Re: The "loop and a half"]

2017-10-06 Thread Thomas Jollans
On 2017-10-06 17:01, eryk sun wrote: > On Fri, Oct 6, 2017 at 1:31 PM, Thomas Jollans wrote: >> On 2017-10-06 12:33, Ben Bacarisse wrote: >> >>> A general solution to the (rather odd) complaint about silent waiting >>> should really check any input fileno t

Re: callable values

2017-10-06 Thread Thomas Jollans
On 06/10/17 18:25, Stefan Ram wrote: > Terry Reedy writes: >> On 10/6/2017 8:44 AM, ROGER GRAYDON CHRISTMAN wrote: >>> Despite the documentation, I would still be tempted to say that range is a >>> function. >> It is, *according* to the documentation. Built-in classes are included >> in Library

Re: callable values

2017-10-07 Thread Thomas Jollans
On 07/10/17 01:58, Steve D'Aprano wrote: > On Sat, 7 Oct 2017 03:25 am, Stefan Ram wrote: > >> FWIW, in my course notes, I have coined a special word for >> this: >> >> A /prelate/ (German: "Prälat") is a callable value (object). > > In English, prelate is a kind of priest, a senior clergyman

Re: Pandas/dataexplore, how do you get data into them?

2017-10-08 Thread Thomas Jollans
ction that you might find useful -- Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: pathlib PurePosixPath

2017-10-10 Thread Thomas Jollans
th, 'a') as f: > f.write(data) > > ##Output > File "C:/Users/Sayth/PycharmProjects/ubet_api_mongo/json_download.py", line > 42, in > with open(result_path, 'a') as f: > FileNotFoundError: [Errno 2] No such file or directory: > 'C:\\Users\\Sayth\\Projects\\results\\Warwick Farm_2017-09.json' > > Process finished with exit code 1 > > Cheers > > Sayth > -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: about 'setattr(o, name, value)' and 'inspect.signature(f)'

2017-10-10 Thread Thomas Jollans
mplex', 'dict', 'enumerate', 'filter', 'float', 'frozenset', 'property', 'int', 'list', 'map', 'range', 'reversed', 'set', 'slice', 'staticmethod', 'str', 'super', 'tuple', 'type', 'zip'] >>> len([name for name in no_sig if name[0] == name[0].lower()]) 35 >>> [name for name in has_sig if name[0] == name[0].lower()] ['__loader__', 'abs', 'all', 'any', 'ascii', 'bin', 'callable', 'chr', 'compile', 'delattr', 'divmod', 'eval', 'exec', 'format', 'globals', 'hasattr', 'hash', 'hex', 'id', 'input', 'isinstance', 'issubclass', 'len', 'locals', 'oct', 'ord', 'pow', 'repr', 'setattr', 'sorted', 'sum', 'memoryview', 'object', 'open', 'quit', 'exit', 'copyright', 'credits', 'license', 'help'] >>> len([name for name in has_sig if name[0] == name[0].lower()]) 40 >>> -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Thomas Jollans
edition was completely impenetrable without first having read the 1st edition. -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: Unable to run pip in Windows 10

2017-10-11 Thread Thomas Jollans
quoted an error message, and that's great. What's missing is really any information on how you GOT this error message. -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Thomas Jollans
e in this matter, thus my question. >> -- >> https://mail.python.org/mailman/listinfo/python-list > > AFAIK, JavaScript frameworks has largely replaced PHP. I personally use > Pelican to generate static web pages and use JavaScript sparingly. "Remember Ruby on Rails?" -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: OT: MPC-HC project ending? [Re: Lies in education [was Re: The "loop and a half"]]

2017-10-12 Thread Thomas Jollans
was a few years ago, but nobody noticed at the time) -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Thomas Jollans
s not relevant. For starters, people tend to care more about their home than about their PHP code. -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Thomas Jollans
x27;re using FastCGI with nginx or lighttpd, I believe the configuration would look pretty similar in both cases. Then again, I don't do much web programming any more and generally stay away from PHP, so I may be misremembering. -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Thomas Jollans
d (in a way) Julia: "C++ is horrid, but C is a slog. Python is too slow for [insert specific use case]. There has to be a better way!" -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Thomas Jollans
On 2017-10-12 15:16, Ben Bacarisse wrote: > Gregory Ewing writes: > >> Ben Bacarisse wrote: >>> That's a different type. I think you mean that a human writing C >>> (rather than bartc's code generator) would probably design the code to >>> use tokenrec ** then I agree, but the latter is not just

Re: Return str to a callback raise a segfault if used in string formating

2017-10-13 Thread Thomas Jollans
On 2017-10-13 11:07, Vincent Vande Vyvre wrote: > Le 13/10/17 à 09:23, Chris Angelico a écrit : >> On Fri, Oct 13, 2017 at 4:46 PM, Vincent Vande Vyvre >> wrote: >>> Simplified code: >>> >>> ---%<-- >>> ... >>> ---%<--

Re: Python 2 -> 3, urllib.urlOpen

2017-10-13 Thread Thomas Jollans
ntrolled university environment. > I cannot download any external packages (other then pygame, which I got > special permission for) onto the computers in the school. Therefore, I'm > looking for something in the Python 3.6 Standard Library. It's nice that Python

Re: Best practise for passing time as arguments

2017-10-14 Thread Thomas Jollans
tps://docs.python.org/3/library/datetime.html When working with time zones, the standard library needs a little help. Luckily, there's a module for that. https://pypi.python.org/pypi/pytz -- Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: how to read in the newsreader

2017-10-16 Thread Thomas Jollans
asy! > > If you do stick with a digest then check your newsreader for a feature > to expand it. Then you can read and reply as if you were getting > individual posts. > That exists? How does it work? -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: Searching For Old Posts On Python

2017-10-16 Thread Thomas Jollans
On 2017-10-16 11:01, Cai Gengyang wrote: > Does anyone here know a way I can search for and display all my old posts on > Python ? Thanks a lot. > > Gengyang > You already asked this recently. You received good answers. -- https://mail.python.org/mailman/listinfo/python-list

Re: Searching For Old Posts On Python

2017-10-16 Thread Thomas Jollans
On 16/10/17 22:04, Cai Gengyang wrote: > I cannot remember where I posted the question it was a while ago .. > > On Mon, Oct 16, 2017 at 5:12 PM, Thomas Jollans <mailto:t...@tjol.eu>> wrote: > > On 2017-10-16 11:01, Cai Gengyang wrote: > > Does anyon

Re: why del is not a function or method?

2017-10-16 Thread Thomas Jollans
On 16/10/17 21:12, Stefan Ram wrote: > r...@zedat.fu-berlin.de (Stefan Ram) writes: >> »x = None« observably has not the same effect as »del x«: > > Paradoxically, /deleting/ a local variable which did not > ever exist, has the effect of creating a ghost of that > local variable which then w

Re: how to read in the newsreader

2017-10-16 Thread Thomas Jollans
On 16/10/17 20:02, Pete Forman wrote: > Thomas Jollans writes: > >> On 2017-10-16 08:48, Pete Forman wrote: >>> Andrew Z writes: >>> >>>> hmm. i did do that. maybe just a delay. >>>> I'll see how it will go tomorrow then. Thank y

Re: how to read in the newsreader

2017-10-17 Thread Thomas Jollans
On 17/10/17 00:55, Mikhail V wrote: > Thomas wrote: >> >> On 16/10/17 20:02, Pete Forman wrote: >>> Thomas Jollans writes: >>> ... >>>>> If you do stick with a digest then check your newsreader for a feature >>>>> to expand it. Then

Re: why del is not a function or method?

2017-10-17 Thread Thomas Jollans
On 2017-10-17 03:07, Steve D'Aprano wrote: > On Tue, 17 Oct 2017 08:57 am, Thomas Jollans wrote: > >> On 16/10/17 21:12, Stefan Ram wrote: >>> r...@zedat.fu-berlin.de (Stefan Ram) writes: >>>> »x = None« observably has not the same effect as »del x«: >&

Re: multiprocessing shows no benefit

2017-10-17 Thread Thomas Nyberg
Could you post a full code snippet? If the lists of 16k numpy arrays are fixed (say you read them from a file), you could just generate random values that could be fed into the code as your list would. It's hard to say how things could be sped up without a bit more specificity. Cheers, T

Re: how to read in the newsreader

2017-10-18 Thread Thomas Jollans
On 2017-10-17 20:38, Pete Forman wrote: > Thomas Jollans writes: > >> On 16/10/17 20:02, Pete Forman wrote: >>> Thomas Jollans writes: >>> >>>> On 2017-10-16 08:48, Pete Forman wrote: >>>>> Andrew Z writes: >>>>> >&g

Re: multiprocessing shows no benefit

2017-10-18 Thread Thomas Nyberg
This will make it much more likely that someone will be able to help you. Cheers, Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP 249 Compliant error handling

2017-10-18 Thread Thomas Jollans
), the best solution is almost certainly to use errors='surrogatepass' in both en- and decoding. I believe this is fairly common practice when full interoperability with software that predates UTF-16 (and previously used UCS-2) is required. This should solve all your problems as long as you don't get strings with an odd number of bytes. See: https://en.wikipedia.org/wiki/UTF-16#U.2BD800_to_U.2BDFFF -- Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: right list for SIGABRT python binary question ?

2017-10-18 Thread Thomas Jollans
DateTime import * > File "/usr/lib/python2.7/dist-packages/mx/DateTime/DateTime.py", > line 9, in > from mxDateTime import * > File > "/usr/lib/python2.7/dist-packages/mx/DateTime/mxDateTime/__init__.py", line > 13, in > raise ImportError, why > ImportError: > /usr/lib/python2.7/dist-packages/mx/DateTime/mxDateTime/mxDateTime.so: > undefined symbol: Py_InitModule4 I don't really what exactly is going on here, but in general extension modules compiled for non-debug builds won't work with debug builds. The Debian package is almost certainly fine. > For good measure I have filed a bug with Debian asking for > recompilation of python-egenix-mxdatetime. Even if the maintainers do that, it won't help. Check that the module works on its own with the regular Python build and then close the bug if the maintainers don't beat you to it. > When run under "normal" py2.7 it runs all the way through but > upon shutdown (*after* sys.exit(0)) faulthandler shows a > problem (and returns 134 which made me think of SIGABRT): We still don't know what "it" is. Strip down your script as much as possible. It looks like you're using a lot of extension modules, and any one of them could (in theory) be causing problems. -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: What happens when a __call__ function is defined in both class and object ?

2017-10-19 Thread Thomas Jollans
#x27;)(test), NOT getattr(test, '__call__')(). -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: Efficient counting of results

2017-10-19 Thread Thomas Jollans
in between, and IMHO only gives you significant added value (if your data is already in a database) if you want to do some form of statistical analysis, some other kind of more complex computation, or if you want to create plots. -- Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: multiprocessing shows no benefit

2017-10-20 Thread Thomas Nyberg
t the operation itself is so simple that IPC might be a drag no matter what. Cheers, Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: integer copy

2017-10-20 Thread Thomas Nyberg
On 10/20/2017 10:30 AM, ast wrote: > I am aware that it is useless to copy an integer > (or any immutable type). > > ... > > any comments ? > > Why is this a problem for you? Cheers, Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: integer copy

2017-10-20 Thread Thomas Jollans
Why is this disturbing? As you said, it'd be completely pointless. As to what's going on: copy.copy does not make any attempt to copy immutable types. That's all there is to it. Read the source if you want to know how this is done. https://github.com/python/cpython/blob/master/Lib/c

Re: integer copy

2017-10-20 Thread Thomas Jollans
On 2017-10-20 13:17, bartc wrote: > On 20/10/2017 10:09, Thomas Jollans wrote: > >> Read the source if you want to know how this is done. >> https://github.com/python/cpython/blob/master/Lib/copy.py#L111 > > Good, informative comment block at the top of the type th

Re: Compression of random binary data

2017-10-23 Thread Thomas Jollans
On 2017-10-23 11:32, danceswithnumb...@gmail.com wrote: > According to this website. This is an uncompressable stream. > > https://en.m.wikipedia.org/wiki/Incompressible_string > > 12344321 No, it's not. According to that article, that string is incompressible by a particular algorithm.

Re: right list for SIGABRT python binary question ?

2017-10-23 Thread Thomas Jollans
On 2017-10-23 14:23, Karsten Hilbert wrote: > On Sat, Oct 21, 2017 at 09:31:54AM +0200, dieter wrote: > >> It points to a memory corruption. > > While running valgrind and friends is beyond my capabilitis I > have run the problem through gdb to at least obtain a stack > trace to see what gives:

Re: Compression of random binary data

2017-10-23 Thread Thomas Jollans
in > the file system, ends up being *larger* than the original. Well done to > Patrick Craig for finding a clever loophole to "win" the challenge, but he > did so without actually compressing the original data. Thanks Steve that was very entertaining. -- Thomas Jollans -- ht

Re: Compression of random binary data

2017-10-23 Thread Thomas Jollans
On 2017-10-23 17:39, danceswithnumb...@gmail.com wrote: > Thanks Paul...blunt to the point. > > My 8 year old can decode this back into base 10, i still have to help him a > bit going from base 10 to 8 bit bytesit's incredibly simple to decode. No > dictionary, can easily be done with pencil

Re: Windows alternative: multiprocessing.connection.wait on Pipe, Tkinter File Handlers

2017-10-23 Thread Thomas Jollans
On 23/10/17 18:34, Josh Jacobson wrote: > The two functions in the subject are not fully implementable on Windows, > and so I am looking for an alternative. > > Relevant SO postings including full code and description, with bounty: > Freezes >

Re: grapheme cluster library

2017-10-23 Thread Thomas Jollans
dictionaries: In Dutch, "ij" (the "long IJ", as opposed to the "greek Y") is generally considered a single letter, or at the very least a single grapheme. There is a unicode codepoint for it (ij), but it isn't widely used. So "vrij" (free) has three graphemes (v r ij) and three or four letters. However, in "bijectie" (bijection), "i" and "j" are two separate graphemes, so this word has eight letters and seven or eight graphemes. ("ie" may or may not be one single grapheme...) -- Thomas PS: This may not be obvious to you at first unless you're Dutch. -- https://mail.python.org/mailman/listinfo/python-list

Re: Installing tkinter on FreeBSD

2017-10-23 Thread Thomas Jollans
/Tk installed? If yes, does the configure script output say anything about tcl, tk or tkinter? -- Thomas -- https://mail.python.org/mailman/listinfo/python-list

Let's talk about debuggers!

2017-10-25 Thread Thomas Jollans
y remember WinPDB, but that hasn't seen a release in more than seven years... -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: Let's talk about debuggers!

2017-10-25 Thread Thomas Jollans
ow you what line you're at when stepping through (seriously?). I'll go back to not even touching IDLE with a ten-foot pole now. -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: Let's talk about debuggers!

2017-10-25 Thread Thomas Jollans
On 25/10/17 22:18, Terry Reedy wrote: > On 10/25/2017 12:12 PM, Thomas Jollans wrote: >> On 2017-10-25 15:57, Rustom Mody wrote: >>> >>> pdb inside emacs works (to a fashion) >>> And it shows the arrow for current line so its at least quasi-gui >>> >

Re: Compression of random binary data

2017-10-26 Thread Thomas Jollans
y common) circumstances. If it adds information, that's poetry, not compression. -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: read_table € symbol

2017-10-26 Thread Thomas Jollans
till there: > pd.read_table('filename.txt', sep=';', encoding='utf-8') > Anyone can help me? > Many thanks in advance > > Davide What error? Are you sure the file is UTF-8 encoded? (and not ISO-8859-15, or Windows-1252, or something?) -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: How to plot

2017-10-27 Thread Thomas Jollans
mentation is quite good. If you need the plots to update quickly (it doesn't sound like it) then you might need to luck into something else, like pyqtgraph or vispy. -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: Just a quick question about main()

2017-10-27 Thread Thomas Jollans
On 27/10/17 20:05, ROGER GRAYDON CHRISTMAN wrote: > While teaching my introductory course in Python, I occasionally see > submissions containing the following two program lines, even before > I teach about functions and modules: > > if __name__ = '__main__': > ... main() > > When I ask about it,

Re: Keep or drop index.html from Django?

2017-10-28 Thread Thomas Jollans
e web server configuration, but you can do this in Django) -- Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: sys.path[] question

2017-10-29 Thread Thomas Jollans
gt; 'f:\ProgramFiler\Python27\lib\site-packages\pyreadline' ? This sounds like a fairly high risk of breaking something (presumably there is some reason the files are where they are) for absolutely no gain. It's not like it takes up any meaningful amount of space, is it? Why would you want to? -- Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Pandas to_html cannot apply style

2017-10-30 Thread Thomas Jollans
On 30/10/17 08:44, zljubi...@gmail.com wrote: > Hi, > > the following code never applies style and I cannot figure out why. > Can someone please help? > > import pandas as pd > > def function2(row): > if row.A == True: > color = '#FF' > else: > color = '#00FF00' > >

Re: FW: Reading a remove csv file

2017-11-06 Thread Thomas Jollans
On 2017-11-03 00:40, Stefan Ram wrote: > I knew I reïnvented something. Maybe it was »map«. Quite. If you really need that one-argument callable, you can curry map() with functools.partial. Also, that tréma is highly unorthodox. -- Thomas Jollans -- https://mail.python.org/mailman/listi

Re: Calling of GetVolumeInformation returns empty serial number

2017-11-07 Thread Thomas Jollans
inters-or-passing-parameters-by-reference > > The doc said it's LPDWORD (pointer to DWORD): > > https://msdn.microsoft.com/en-us/library/windows/desktop/aa364993(v=vs.85).aspx > > _Out_opt_ LPDWORD lpVolumeSerialNumber, > > > Thank you for any advance in this theme! > > Best wishes >dd > -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: Easiest way to access C module in Python

2017-11-07 Thread Thomas Jollans
fix that. I'm sure people on this list will be happy to help if you start a new thread with some details of what is happening on your system. -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: How to modify this from Python 2.x to v3.4?

2017-11-12 Thread Thomas Jollans
h your port) if you want to, but you might want to consider whether it's easier to port your code from ctypes/ctypesgen to cffi instead. -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: for/ if against dict - one liner

2017-11-14 Thread Thomas Jollans
'.join(f'{k} {v}' for k, v in dict.items() if k >= 2)) But indeed, you can build concise dictionary filters like that with generator expressions and list comprehensions. -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: for/ if against dict - one liner

2017-11-14 Thread Thomas Jollans
gt; for k, val in dct: Don't you mean dct.items() >if k >= 2: > # do magnificent things > > Thank you > AZ > -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: Windows - py363 crashes with "vonLöwis.py"

2017-11-16 Thread Thomas Jollans
On 2017-11-16 11:51, breamore...@gmail.com wrote: > On Thursday, November 16, 2017 at 8:43:24 AM UTC, wxjm...@gmail.com wrote: >> Le mercredi 15 novembre 2017 23:43:46 UTC+1, Terry Reedy a écrit : >>> On 11/15/2017 6:58 AM, breamoreboy wrote: On Wednesday, November 15, 2017 at 8:53:44 AM UTC,

Re: Problem in defining multidimensional array matrix and regression

2017-11-19 Thread Thomas Jollans
On 19/11/17 18:55, shalu.ash...@gmail.com wrote: > Hello Peter, > > Many thanks for your suggestion. > Now I am using Pandas & > I already did that but now I need to make a multi-dimensional array for > reading all variables (5 in this case) at one x-axis, so I can perform > multiple regression

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Thomas Jollans
On 23/11/17 19:42, Mikhail V wrote: > I mean for a real practical situation - for example for an average > Python programmer or someone who seeks a programmer job. > And who does not have a 500-key keyboard, I don't think it's too much to ask for a programmer to have the technology and expertise

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Thomas Jollans
he Unicode standard and works very well, right? -- Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Thomas Jollans
On 24/11/17 00:18, Richard Damon wrote: > On 11/23/17 5:45 PM, Thomas Jollans wrote: >> On 23/11/17 23:15, Richard Damon wrote: >>> My thought is you define a legal only those Unicode characters that via >>> the defined classification would be normally legal

Re: Increasing the diversity of people who write Python (was: Benefits of unicode identifiers)

2017-11-23 Thread Thomas Jollans
On 24/11/17 05:45, Andrew Z wrote: > I have hard time seeing the benefits of this "necessity" , just > unreasonable overcomplications for the name of "diversity". What complications? -- https://mail.python.org/mailman/listinfo/python-list

Re: Benefits of unicode identifiers

2017-11-24 Thread Thomas Jollans
ll have π [copied from the one above!]? > > Apart perhaps from the ones in Greece, where π might already be heavily > used in the same way we use 'p'. > -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: Increasing the diversity of people who write Python (was: Benefits of unicode identifiers)

2017-11-28 Thread Thomas Jollans
quot; and "US international" keyboard layouts and switch between them depending on what I'm typing. It's not ideal, but it's better than either programming being a pain in the arse (with all the dead keys) or not being able to type natural-language words properly. -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: nospam ** infinity?

2017-11-28 Thread Thomas Jollans
t; Any ideas how to investigate further? No, but with this information they should be relatively easy to filter out at the mail/news boundary, right? (It's not ideal, I know) -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: Meaning of "Add Python to environment variables"

2017-12-03 Thread Thomas Jollans
others? If the note on the "PrependPath" option in https://docs.python.org/3/using/windows.html#installing-without-ui is complete (which I believe it is, but I couldn't swear to it), it's PATH and PATHEXT. -- Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Please tell me how to execute python file in Ubuntu by double clicking on file.

2017-12-04 Thread Thomas Jollans
hen i double click on it as any > *.Exe file executes as in Window. > Sir please help me. > https://askubuntu.com/a/544544 -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: Please tell me how to execute python file in Ubuntu by double clicking on file.

2017-12-04 Thread Thomas Jollans
On 05/12/17 01:03, Michael Torrie wrote: > On 12/04/2017 04:49 AM, Thomas Jollans wrote: >> On 2017-12-04 10:48, dhananjaysingh091...@gmail.com wrote: >>> Respected Sir/Mam, >>> I am Dhananjay Singh,Student of IIIT Manipur. Sir/Mam when i am >>

Re: zlib OverflowError: 'size does not fit in an int'

2017-12-04 Thread Thomas Jollans
On 05/12/17 01:15, Chris Angelico wrote: > On Tue, Dec 5, 2017 at 10:46 AM, Larry Martell > wrote: >> Trying to zip a large file is failing with OverflowError: 'size does >> not fit in an int'. Googling I found this: >> >> https://bugs.python.org/issue23306 >> >> and this: >> >> https://hg.python

Re: zlib OverflowError: 'size does not fit in an int'

2017-12-04 Thread Thomas Jollans
On 05/12/17 01:21, Larry Martell wrote: > On Mon, Dec 4, 2017 at 7:15 PM, Chris Angelico wrote: >> On Tue, Dec 5, 2017 at 10:46 AM, Larry Martell >> wrote: >>> Trying to zip a large file is failing with OverflowError: 'size does >>> not fit in an int'. Googling I found this: >>> >>> https://bugs

Re: SystemError: error return without exception set

2017-12-07 Thread Thomas Nyberg
it in a way to make that pretty difficult. Another approach might be not to use the python bindings, but to use whatever other binding are available (say in C?). Then you could try to set things up in the same way and see if an error occurs there and if that error has more information than yours.

Re: SystemError: error return without exception set

2017-12-07 Thread Thomas Nyberg
On 12/07/2017 05:15 PM, Natalie Leung wrote: > Hi Thomas, > > You are correct in that the software and its packages are close-sourced. I > have emailed the provider but their technical support staff has stated that > they have exhausted of all ideas. > > An interesting

Re: Meaning of "Add Python to environment variables"

2017-12-08 Thread Thomas Jollans
If the note on the "PrependPath" option in https://docs.python.org/3/using/windows.html#installing-without-ui is complete (which I believe it is, but I couldn't swear to it), it's PATH and PATHEXT. -- Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Please tell me how to execute python file in Ubuntu by double

2017-12-08 Thread Thomas Jollans
click on it as any *.Exe file executes as in Window. > Sir please help me. > https://askubuntu.com/a/544544 -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: scipy

2017-12-09 Thread Thomas Jollans
I'm just guessing here, but do you have the latest versions of distutils, setuptools and pip? It's likely that scipy requires newer versions of these than your distribution provides. You may have to upgrade them. Best of luck, Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-12-09 Thread Thomas Jollans
a proof-of-concept just to show it > can be done, That's certainly what it looks like, though the documentation page reads like a bad joke (or a once-mediocre one that really hasn't aged well). Joke or not, it does appear to be real, however, and a part of this long dead and forgotten package: https://pypi.python.org/pypi/EasyExtend/3.0.1 -- Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Please tell me how to execute python file in Ubuntu by double clicking on file. (Posting On Python-List Prohibited)

2017-12-09 Thread Thomas Jollans
ficantly more money for Canonical than the desktop one, too. -- Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Please tell me how to execute python file in Ubuntu by double clicking on file. (Posting On Python-List Prohibited)

2017-12-10 Thread Thomas Jollans
On 10/12/17 07:01, Chris Angelico wrote: > On Sun, Dec 10, 2017 at 4:52 PM, Steve D'Aprano > wrote: >> On Sun, 10 Dec 2017 02:01 pm, Chris Angelico wrote: >> >>> On Sun, Dec 10, 2017 at 12:56 PM, Steve D'Aprano >>> wrote: Remember the context here: we're replying to a thread discussing someb

Re: Problem with timeit

2017-12-15 Thread Thomas Jollans
"x" (which will take seconds) >>> Timer("x=123456**123456").timeit(10**6) 0.00969144597183913 >>> Timer("print(123456**123456, file=open('/dev/null', 'w'))").timeit(1) 4.949162941076793 -- Thomas > > What happens plz ? > -- https://mail.python.org/mailman/listinfo/python-list

Re: [OT] Python and Excel

2017-12-19 Thread Thomas Jollans
nguage-to-excel/ > I don't use Excel, but if this happens it could be really good news for IronPython. -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: [META] Are the list admins honouring Posting Prohibited demands?

2017-12-20 Thread Thomas Jollans
didn't turn up. > > https://groups.google.com/d/msg/comp.lang.python/yQEarGwOl6M/1e-mJg3FBQAJ > -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: Spectre/Meltdown bug affecting Python ?

2018-01-06 Thread Thomas Nyberg
ifically, all modern processors capable of keeping many instructions in flight are potentially vulnerable. In particular, we have verified Spectre on Intel, AMD, and ARM processors. - Cheers, Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Why does __ne__ exist?

2018-01-07 Thread Thomas Jollans
e], dtype=bool) >>> I couldn't tell you why this was originally allowed, but it does turn out to be strangely useful. (As far as the numpy API is concerned, it would be even nicer if 'not' could be overridden, IMHO) Cheers Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Why does __ne__ exist?

2018-01-08 Thread Thomas Jollans
On 2018-01-08 01:31, breamore...@gmail.com wrote: > On Monday, January 8, 2018 at 12:02:09 AM UTC, Ethan Furman wrote: >> On 01/07/2018 12:33 PM, Chris Angelico wrote: >>> On Mon, Jan 8, 2018 at 7:13 AM, Thomas Jollans wrote: >>>> On 07/01/18 20:55, Chris An

<    1   2   3   4   5   6   7   8   9   10   >