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
Spot on!
https://imgs.xkcd.com/comics/python_environment.png
https://xkcd.com/1987/
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
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
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-
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
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-
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
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
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
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
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
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,
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
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
"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
"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.
-
"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
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
"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
"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
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
28 matches
Mail list logo