Intel Distribution for Python

2019-02-12 Thread ElChino
I just got an Intel newsletter describing "Intel Distribution for Python". Quote: With Intel® Distribution for Python, it’s not unusual to see speed-ups of 20x (or more) for numerically intensive Python codes like those that use the Numpy* and SciPy* stack. Sounds very exiting; 20 times sp

Todays XKCD

2018-05-01 Thread ElChino
Spot on! https://imgs.xkcd.com/comics/python_environment.png https://xkcd.com/1987/ -- https://mail.python.org/mailman/listinfo/python-list

Re: beacons and geofences

2018-04-11 Thread ElChino
Rafal Sikora wrote: Hi! I want users’ devices to be able to monitor the maximum amount of POIs at once (geo-fences/beacons) and I need to prepare an algorithm solution for > monitoring the POIs. How should it be implemented in Python? What? You'll have to describe the problem in more details

Re: try-except syntax

2018-04-06 Thread ElChino
Steven D'Aprano wrote: imp.find_module is deprecated and should not be used in new code. ... try: block except (ImportError, RuntimeError): block Thanks Steven and others who replied. Looks more elegant. By the way, RuntimeError is almost never something you want t

try-except syntax

2018-04-05 Thread ElChino
I'm trying to simplify a try-except construct. E.g. how come this: try: _x, pathname, _y = imp.find_module (mod, mod_path) return ("%s" % pathname) except ImportError: pass except RuntimeError: pass return ("") Cannot be simplified into this: try: _x, pathname, _y

Re: Python with PyDev on Visual Studio Code

2018-02-19 Thread ElChino
Fabio Zadrozny wrote: See: http://www.pydev.org/vscode/ for more information! That page includes so many dead links that it looks like a joke. -- https://mail.python.org/mailman/listinfo/python-list

Re: Tips or strategies to understanding how CPython works under the hood

2018-01-09 Thread ElChino
Chris Angelico wrote: CPython is a stack-based interpreter, which means it loads values onto an (invisible) internal stack, processes values at the top of the stack, and removes them when it's done. Is this similar to how Lua operates too? -- https://mail.python.org/mailman/listinfo/python-li

Re: sys.path[] question

2017-10-29 Thread ElChino
Thomas Jollans wrote: You can find out where a module is loaded from by checking its __file__ attribute. Run python (in interactive mode) and execute import pyreadline pyreadline.__file__ Thanks for that tip. Does that mean that only this .egg is where python imports all pyreadline files f

sys.path[] question

2017-10-28 Thread ElChino
From the Python2.7 snippet in [1], Python2.7 reports that my sys.path[] contains: f:\ProgramFiler\Python27\lib\site-packages\pyreadline-2.0-py2.7-win32.egg (a .zip-file) But I have also a 'f:\ProgramFiler\Python27\lib\site-packages\pyreadline' directory. With the complete package AFAICS. So m

Re: Building a PDF from Byte-of-Python

2017-05-24 Thread ElChino
Dennis Lee Bieber wrote: As for creating a PDF -- that is described in the about.md file (it uses "gitbook") Thanks. Tried Gitbook after downloading it. Yuk! But I had some success using "sphinx-quickstart --batchfile" and tweaking the generated source/conf.py file and a hand-generated

Building a PDF from Byte-of-Python

2017-05-23 Thread ElChino
I'd like to know how to create a 'Byte-of-Python.PDF' from the *.md sources at: https://github.com/swaroopch/byte-of-python I'm not sure how to do this since that page doesn't mention it AFAICS. Is 'sphinx-build' the way to do it? If so, how? -- https://mail.python.org/mailman/listinfo/python-

Re: print() with no newline

2016-12-18 Thread ElChino
Chris Warrick wrote: >> I'm getting a syntax error in Python2. Python3 is fine. >> How can I make this Py2+3 compatible? > > With a __future__ import, the Python 3 syntax will work with both Pythons: > > from __future__ import print_function > print(s, end="") Thanks. Lovely. -- https://mail

print() with no newline

2016-12-18 Thread ElChino
In this snippet: import sys PY3 = (sys.version_info[0] >= 3) def print_no_nl (s): if PY3: print (s, end="") else: print (s), I'm getting a syntax error in Python2. Python3 is fine. How can I make this Py2+3 compatible? -- https://mail.python.org/mailman/listinfo/python-

Re: Python launcher problem

2015-07-31 Thread ElChino
Zachary Ware wrote: On Jul 30, 2015 2:05 AM, "ElChino" mailto:elch...@cnn.cn>> wrote: > > If I in a cmd-shell (actually it is 4NT), do: > c:>py -3 -V & python3 -V > > I get: > Requested Python version (3) not installed << ! from py -3

Python launcher problem

2015-07-30 Thread ElChino
If I in a cmd-shell (actually it is 4NT), do: c:>py -3 -V & python3 -V I get: Requested Python version (3) not installed << ! from py -3 -V Python 3.5.0b2 << ! from the 2nd cmd. What nonsense is this? I DO HAVE Python3 in my %PATH. A Registry setting gone haywire? -- https://mail.python

Re: what windows compiler for python 3.5?

2015-07-24 Thread ElChino
Brian Gladman wrote: > Visual Studio 2015 Community was relased earlier this week so there is no need to work with the prerelease version. Hope MS have fixed all the "internal compiler errors". E.g. trying to compile GeoIpApi-C [1], consistently reports: libGeoIP/regionName.c(7596): fatal er

Re: Can Python function return multiple data?

2015-06-04 Thread ElChino
Steven D'Aprano wrote: > But you still find a few people here and there who have been exposed to Java foolishness, and will argue that Python is "pass by value, where the value is an implementation dependent reference to the thing that you thought was the value". To quote Niklaus Wirth (the fa

Re: l = range(int(1E9))

2015-04-30 Thread ElChino
Chris Angelico wrote: > Very easily and simply: Python 3 and Python 2 will always install separately, and the only possible conflicts are over the "python" command in PATH and which program is associated with ".py" files. You can fix both of them by installing a recent version of Python and usin

Re: l = range(int(1E9))

2015-04-30 Thread ElChino
Mark Lawrence wrote: You might find this useful then in you haven't already seen it https://docs.python.org/3/howto/pyporting.html The main reason I haven't switched to Python3 (from 2.7.4/MSVC), is fear of a major breakage. How can I be certain that even if I install to different directories,

Re: [OT] Git for nazis

2015-04-23 Thread ElChino
Albert-Jan Roskam wrote: Just had to share this: https://youtu.be/CDeG4S-mJts "Linus had a a weekend coding binge, jacked up on blow in Vegas". Sounds pretty accurate. -- https://mail.python.org/mailman/listinfo/python-list

Re: Simple question

2014-08-23 Thread ElChino
wrote: Can some one explain why this happens: True, False = False, True print True, False False True I assume the value of True and False can be falsified. Like the 'None' object can be. So swapping their values and printing them is similar to: a = 0 b = 1 a, b = b, a print a, b Except t

Re: 'is not' or '!='

2014-08-21 Thread ElChino
"Dan Stromberg" wrote: You've got some good answers. I've counted around 210 messages in this thread!! I'd like to point out that this might make a good entry in a Python FAQ list... Ok. -- https://mail.python.org/mailman/listinfo/python-list

Re: Begginer in python trying to load a .dll

2014-08-19 Thread ElChino
"Laurent Pointal" wrote: On Windows there is dumpbin http://msdn.microsoft.com/en-us/library/c1h23y6c%28v=vs.100%29.aspx On Windows, google also found this graphical tool: http://www.dependencywalker.com/ PEdump is also a great tool: http://www.wheaty.net/pedump.zip Includes source too. -

Re: 'is not' or '!='

2014-08-18 Thread ElChino
"Marko Rauhamaa" wrote: In almost all cases, both tests would result in the same behavior. However, the "is not" test is conceptually the correct one since you want to know if x is the one and only None object. You don't want to be fooled by an imposter object that simply looks like the None ob

'is not' or '!='

2014-08-18 Thread ElChino
A newbie question to you; what is the difference between statements like: if x is not None: and if x != None: Without any context, which one should be preferred? IMHO, the latter is more readable. -- https://mail.python.org/mailman/listinfo/python-list

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread ElChino
"Grant Edwards" wrote: To all of us out here in user-land a change in the first value in the version tuple means breakage and incompatibilities. And when the second value is "0", you avoid it until some other sucker has found the bugs and a few more minor releases have come out. "Three shall

Re: Python (windows)packet sniffer ARP

2014-01-31 Thread ElChino
"Mark Betz" wrote: I am wondering if it possible to create a packet sniffer in windows using python that only sniffs for ARP packets. A couple of links to get you started: The OP could use Impacket's libpcap bindings. With one of the examples, it's easy: python examples/sniff.py ether pro

Re: monitor multicast traffic/IP

2013-08-20 Thread ElChino
wrote: I am a Network Engineer, but have been trying to teach myself Python since Cisco will be leverage it on new high end models, yet I am very new to programming and Python; however, I have a need to have the ability to monitor traffic, more specificity multicast packets from a few sources