If you're familiar with C++, I recommend to have a look at Boost::Python.
Sample program:
#include
#include
void world()
{
std::cout << "hello world" << std::endl;
}
BOOST_PYTHON_MODULE( hello )
{
using namespace ::boost::python;
def( "world", &world );
}
Usage:
python -c "i
> but what about integers or strings?
Can you provide example?
---
No matter if __all__ uses names or objects, I think it should be validated not
only when importing '*', but always.
Frankly, do you always unit-test if __all__ works?
--
https://mail.python.org/mailman/listinfo/python-list
Hi,
I today uncovered subtle bug and would like to share it with you.
By a mistake, I forgot to put comma into '__all__' tuple of some module. Notice
missing comma after 'B'.
# module foo.py
__all__ = (
'A',
'B'
'C',
)
class A: pass
class B: pass
class C: pass
If you try to import
Have you considered to use rather WSGI-based solution? (for Apache Httpd is
mod_wsgi). Mod_python is totally obsolete.
--
https://mail.python.org/mailman/listinfo/python-list
Hi,
can you explain, why is the attribute 'fired' class-level and not
instance-level? There must be good reason for modifying class attribute from
instance.
Dne pondělí 6. června 2016 15:26:08 UTC+2 Chris Withers napsal(a):
> Hi All,
>
> errorhandler is a tiny but useful logging handler for th
I don't understand why all of you are telling him about '\r\n\, write(),..'
instead of recommending to use take library which already has all problems
resolved (python-gammu / wammu).
When one will write custom templating stuff, you would also recommend him to
take jinja.
--
https://mail.pytho
On Tuesday, September 22, 2015 at 1:20:07 PM UTC+2, Timon Rhynix wrote:
> Hello, I have used pyserial, sms0.4 and other libraries to send sms via
> huawei E1750 modem.
> The code runs well and no error is thrown but the text message is not
> sent/delivered to the number.
> One of my code is as fo
Hi Chris, yeah, I have to stick on the software which my employer provides to
me (we're enterprise company). I'm not root on that system. I'm happy with 2.6
now, two years ago we were on older RHEL with python 2.4 and it was a real pain
:)
> > $ cat /etc/redhat-release
> > Red Hat Enterprise Li
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)
$ python --version
Python 2.6.6
> Incidentally, why Python 2.6?
>
> ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
True if True if True if True ]
Dne středa 5. srpna 2015 8:49:20 UTC+2 Pavel S napsal(a):
> Hi,
>
> I recently found interesting GOTCHA while doing list comprehension in python
> 2.6:
>
> >>> values = ( True, False, 1, 2, 3, None )
> >>> [ value for valu
Hi,
I recently found interesting GOTCHA while doing list comprehension in python
2.6:
>>> values = ( True, False, 1, 2, 3, None )
>>> [ value for value in values if value if not None ]
[True, 1, 2, 3]
I was wondering why this list comprehension returns incorrect results and
finally found a typ
11 matches
Mail list logo