Hello,
It depends on the operating system. For example on Ubuntu, the default
python version is still 2.7. When you install both python2.7 and python3
on a system, then usually the "pip" will be a symlink to pip version 2
or 3. The default python interpreter can be different on different system
Hello!
We have a system where we have to create an exact copy of the original
database for testing. The database size is over 800GB. We have found
that using zfs snapshots and zfs clone is the best option. In order to
do this, you have to enable journaling in mongodb. Then you can take a
snap
Hello!
I wonder what kind of XSD <-> Python class mapper should I use for my
project. I need something that can generate classes from XSD files, and
then parse XML to an objecttree and also dump object trees to XML. I'll
be using Python version 3.6 and I would prefer to use something that is
b
>> Or maybe I misunderstood the docs and the timeout means the max. time
>> elapsed between receiving two chunks of data from the server?
> Yes. It's documented better here:
> http://docs.python-requests.org/en/master/user/advanced/#timeouts
>
> You can't specify a "total time" within which the op
> In other words: if the server starts to send the response, but then
> stops sending it (without closing the connection), then this will block
> forever anyway.
Or maybe I misunderstood the docs and the timeout means the max. time
elapsed between receiving two chunks of data from the server?
--
> (a) are you setting daemon=True on the thread?
> (b) are you setting a timeout on the requests call?
Hmm setting the timeout might not be the solution. This is from the docs
of the requests module:
>
> Note
>
> |timeout| is not a time limit on the entire response download; rather,
> an exception
2018. 01. 13. 15:03 keltezéssel, Jon Ribbens írta:
> On 2018-01-13, Nagy László Zsolt wrote:
>> I have a multi threaded Windows service written in Python. It is running
>> on 3.6.2. Sometimes I cannot stop the service, because on of the
>> threads won't exit. I have
Hi!
I have a multi threaded Windows service written in Python. It is running
on 3.6.2. Sometimes I cannot stop the service, because on of the
threads won't exit. I have narrowed down the problem to request and
_lib.SSL_read. I have used a modified version of this gem:
http://code.activestate.com/
> https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.ElementTree.write
>
> The argument was added in Python 3.4. Presumably, lxml implemented the
> API before this change.
>
> Maybe this would be considered a bug by lxml. Maybe it won't.
Maybe it is not a bug, just
> Result:
>
> Traceback (most recent call last):
> File "C:/not_telling/c14n.py", line 16, in
> short_empty_elements=False
> File "lxml.etree.pyx", line 1869, in lxml.etree._ElementTree.write
> (src\lxml\lxml.etree.c:57004)
> TypeError: write() got an unexpected keyword argument 'short_em
Here is an MWE:
import io
from lxml import etree
test_node = etree.fromstring('''
http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512";>
''')
output = io.BytesIO(b'')
test_node.getroottree().write(output,
enc
Hi!
On the official python site, it is possible to download python 3.4.4 here:
https://www.python.org/downloads/release/python-344/
There are binary installation files for Windows. But Python 3.4.4 is two
years old. There is 3.4.7 that was just released, but there are no
binaries.
https://www.
To answer my own question:
- You can convert a firebird 1.5 database into 2.5 with this tool:
http://gsbelarus.com/gs/fdbconvert/fdbconvert_eng.html
- You can install firebird 2.5 instead of 1.5. Old BDE based program
will still work with it, because the Firebird 2.5 server can talk with a
1.5 c
Hi!
I have an old HIS program written in Delphi. It uses Firebird 1.5
database. I need to make an interface to exchange data with other
healthcare providers. I do not want to do this in Delphi, that is
ancient code. It is also not an option to rewrite the whole program from
scratch. I just need
Do you have /opt/rocks/lib/python2.6/site-packages on sys.path?
Does your exread2.py file manipulate sys.path in any way?
2017. 05. 30. 10:18 keltezéssel, Mahmood Naderan via Python-list írta:
> Hello,
> Although I have installed a package via pip on a centos-6.6, python
> interpreter still says
> It was easier than I thought. It seems that zeep has a problem
> processing a basic WS-Security STS (Security Token Service, plain
> username+password authentication) document. I have changed the endpoint
> URL to example.com. Total size 11K compressed. I hope it is okay to
> attach here.
It wa
> There are less than 100 elements defined in the WSDL, so it cannot be
> the problem. It might be a recursive data definition, but then it should
> be handled by zeep instead of entering into an intinite recursion.
>
> Well, I'll be working on an MWE and post it here later.
It was easier than I t
>> line 259, in signature
>> from zeep.xsd import ComplexType
>> RecursionError: maximum recursion depth exceeded
>>
>> Looks like an infinite recursion to me. Due to a non-disclosure
>> agreement, I'm not able to send you the example wsdl.
> So you tell us it's just restin' under an NDA.
Ye
Running this command:
python3.6 -m zeep exmaple.wsdl
I get this (this is only the end of the traceback):
part = element.signature(schema, standalone=False)
File
"/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/indicators.py",
line 252, in signature
parts.append(element.signat
>> Yes, it is listed under the "Other useful packages and applications not
>> currently available on this page" section. Its home page (
>> https://github.com/mehcode/python-xmlsec ) does not tell how to install
>> it on windows.
> *facepalm* Sorry about that. I just automatically went to the page
>> So is there a way to do this? I would prefer a cross platform solution,
>> but I'll do whatever it takes.
> You might be in luck: xmlsec appears to be in this list:
>
> http://www.lfd.uci.edu/~gohlke/pythonlibs/
>
> I don't know anything about it, though, so you'll have to try it and see.
Yes,
Is there a library that handles SOAP and wsee (with x509 signed
requests) on Windows platform?
I went through a few. Suds is not supported anymore. py-wsee depends on
libxml2 that has no windows port. zeep is great, except that x509
cannot be used unless xmlsec library is installed. I could not b
>>
>> Simply because the concurrent future returned by executor.submit does
>> not implement __await__ and so it cannot be awaited for.
> I get that, but what happens if you try wrapping the executor.submit
> call with tornado.gen.convert_yielded as the tornado docs suggest and
> as I suggested a
> My guess: because asyncio wouldn't know what to do with a
> concurrent.futures.Future.
I see that as a problem.
>
> The tornado docs say that "You can also use
> tornado.gen.convert_yielded to convert anything that would work with
> yield into a form that will work with await":
> http://www.torn
I'm in a situation where I would like to refactor some code to use
native coroutine functions (aync def) instead of "normal" coroutines
that use yield. Most of the code is asnyc, but some of the operations
are performed in different threads (using concurrent.futures.Executor).
We have concurrent.
>> "C:\Users\Laci\AppData\Local\Programs\Python\Python35\lib\site-packages\win32\PythonService.exe"
> I wanted you to run the above executable, not python.exe. If it fails
> you'll get more information about why it's failing when run directly
> then when the service controller runs it. Since you'r
>
> The MWE I provided is so simple. By now, It should be obvious what is
> missing from it. :-(
>
>
The problem is NOT with my code. I just installed a new virtual machine,
and installed python3.5 amd64 + pypiwin32 on it. On that machine, the
test service works perfectly!
So it is with my machin
> On Wed, Oct 5, 2016 at 7:43 AM, Nagy László Zsolt
> wrote:
>> It did not help. I still get the same error message (service did not
>> respond in time).
> Can you run the service executable directly? From the command line
> check `sc qc TestService`. Run the BINARY_P
>> But again, that is not related to the question. Why does it not work?
>> What is missing?
> If you mean why running the service doesn't work, it should once you
> run the post-install script that copies pywintypes35.dll to the
> Windows System32 directory. This DLL is required by PythonService.
>> def main(self):
>> self.ReportServiceStatus(win32service.SERVICE_RUNNING)
>> while not self.stop_requested.is_set():
>> time.sleep(1) # So something useful here
> Why don't you use the Windows Event (hWaitStop) with
> WaitForSingleObject instead of an additional
>> Is it possible to write a win32 service with 64 bit python 3.5? The
>> pywin32 package does exist on 3.5 64bit, but missing some modules:
> Try pip installing the "pypiwin32" package.
That worked, thanks.
Do you have an explanation why to official build (
https://sourceforge.net/projects/pywi
Hello,
Is it possible to write a win32 service with 64 bit python 3.5? The
pywin32 package does exist on 3.5 64bit, but missing some modules:
>>> import win32service
Traceback (most recent call last):
File "", line 1, in
ImportError: DLL load failed:The specified module could not be found.
On Wed, Sep 28, 2016 at 12:54 AM, Jussi Piitulainen
> wrote:
>> I wasn't sure if it makes a copy or just returns the dict. But it's
>> true: help(dict) says dict(mapping) is a "new dictionary initialized
>> from a mapping object's (key, value) pairs".
> Yep. With mutable objects, Python's docs ar
The result that I need should be a real dict, not just a ChainMap. (It
is because I have to mutate it.)
d1 = {'a':1, 'b':2}
d2 = {'c':3, 'd':4}
d3 = {'e':5, 'f':6}
#1. My first naive approach was:
from collections import ChainMap
d = {}
for key,value in ChainMap(d1, d2, d3).items():
d[key]
> Yes, the get part works. The set part is a pain, and a bit ugly:
>
> super(B, B).foo.__set__(self, value)
>
> There is an issue for this on the tracker:
> http://bugs.python.org/issue14965
>
Thank you Ethan!
The superprop pure Python implementation is very promising. (
http://bugs.python.or
Yes, I believe it does. (Others may disagree. This is a design
question and very much a matter of style, not hard fact.) I would have
an explicit action "set_content" which will set the value of an input
field, the inner text of a textarea, the checked state of a check box,
etc.
In other words,
> Even the problem seems to rather defeat the purpose of a property. A
> property should be very simple - why do you need to override it and
> call super()? Doesn't this rather imply that you've gone beyond the
> normal use of properties *already*?
Here are some of my classes that can represent da
> Even the problem seems to rather defeat the purpose of a property. A
> property should be very simple - why do you need to override it and
> call super()? Doesn't this rather imply that you've gone beyond the
> normal use of properties *already*?
I'm not sure about that. I'm going to send a USE
By the way, I know that I can use a "property virtualizer", something
like this:
import inspect
class A:
def __init__(self, prop=0):
self.__prop = prop
def _prop_get(self):
return self.__prop
def _prop_set(self, value):
self.prop_set(value)
Example code:
class A:
def __init__(self, prop=0):
self.__prop = prop
@property
def prop(self):
return self.__prop
@prop.setter
def prop(self, value):
self.__prop = value
class B(A):
@A.prop.setter
def prop(self, value):
print
Hello,
I'm having problems finding the "preferrably one" way to convert a
datetime instance into an xs:datetime string.
Here is an example datetime instance with is format:
dt = datetime.now()
print(dt.isoformat()) # prints "2016-08-26 12:41:13.426081+02:00"
print(dt.strftime('%Y-%m-%dT%H:%M:
> Thanks, I'm in the same position as you, except that I'm in the position
> where I need it use the result, and if it ever returns INF my function will
> blow up. But it doesn't look like that can happen.
>
Doesn't atan2 relies on the C lib math floating point library? At least
in CPython. I thin
On 2016-06-23, MRAB wrote:
>> On 2016-06-23 21:58, David Shi via Python-list wrote:
>>> Can any one tell me?
>>> Regards.
>>> David
>>>
>> There's one in the standard library.
> Which has always worked fine for me...
Which always reminds me:
>>> import json
>>> d = {0:1, False:2}
>>> d
{0: 2}
>>>
Does anyone know a module that can be used to write a before-queue,
smtpd time milter with Python 3?
Unfortunately, pymilter does not work with Python 3:
Downloading
https://pypi.python.org/packages/58/2f/d4799c9cade461177955ca19ade6ca55385286f066c0db9a0770a332ab8a/pymilter-1.0.tar.gz#md5=ec9b95f
2016.06.10. 0:38 keltezéssel, Michael Selik írta:
> On Thu, Jun 9, 2016 at 5:07 AM Nagy László Zsolt <mailto:gand...@shopzeus.com>> wrote:
>
> I would like to create a collections.UserList subclass that can notify
> others when the list is mutated.
>
>
> Wh
> [Looks like you made progress while I struggled to come up with the
> following. I'll post it anyway.]
Your version is much better. Thanks! :-)
--
https://mail.python.org/mailman/listinfo/python-list
> @wrap_notify('remove', 'clear', 'append', 'insert', 'sort'):
> class ObservableList(ObservableCollection, list):
> pass
>
> I just can't find out the right syntax.
>
>
All right, this is working.
from contextlib import contextmanager
class ObservableCollection:
@contextmanager
def
> Using the built-in list or dict is problematic because sometimes the
> subclass methods are ignored when the internal data is accessed (sorry, I
> don't have an example).
Are you suggesting that I should use UserList and UserDict instead of
list and dict? What is the truth? Was UserDict left i
>> Is there a way to easily find out which methods of are mutating the
>> collection? Other than going over the source and checking all (normal
>> and inherited) methods?
> How about
>
> set(dir(collections.UserList)) - set(dir(collections.Sequence))
Thanks. It narrows down the list of possible me
>> Yes, and more. That property will also have a get method! Is it
>> intentional?
> It's a logical effect of how the setter() method works. The above is
> syntactic sugar for
>
> def set_parent(...):
>...
> set_parent = parent.setter(set_parent)
>
> and parent.setter() creates a new property
Hi,
I would like to create a collections.UserList subclass that can notify
others when the list is mutated. I'm not sure which methods I need to
override. I have checked the sources, and it seems difficult to figure
out which methods needs to be overriden. For example,
MutableSequence.extend i
>> @parent.setter
>> def set_parent(self, new_parent):
>> self._parent = new_parent
> This creates a settable property with the name "set_parent" and leaves the
> read-only property "parent" alone.
Yes, and more. That property will also have a get method! Is it intentional?
--
h
class Test:
def __init__(self):
self._parent = None
@property
def parent(self):
return self._parent
@parent.setter
def set_parent(self, new_parent):
self._parent = new_parent
p, c = Test(), Test()
c.parent = p
>py -3 test.py
Traceback (most recent c
>> pass
>>
>> NameError: name 'Test' is not defined
> I think you can fix this by using a string annotation as follows:
>
> class Test:
> def test(self, child: "Test"):
> pass
Yes, you are right. It is not directly written in the official
documentation ( https://doc
class Test:
def test(self, child : Test):
pass
NameError: name 'Test' is not defined
I understand that the class "Test" is not defined until the class
definition is executed. But it is very very common to build recursive
data structures, and I have concrete use case where the IDE did
>
> Things to know about super:
> Part 1 http://www.artima.com/weblogs/viewpost.jsp?thread=236275
> Part 2 http://www.artima.com/weblogs/viewpost.jsp?thread=236278
> Part 3 http://www.artima.com/weblogs/viewpost.jsp?thread=237121
>
> The wonders of super:
> http://www.artima.com/weblogs/viewpost.j
def getsMeet(files=file_list):
"""Get a File or List of Files.
From the list of files determine
what meetings exist and prepare them
to be parsed
"""
pyqFiles = []
for filename in sorted(file_list):
pyqFiles = pyqFiles.append(pq(filename=my_dir + file
Is the problem that the attribute or parameter has the same name in both
base classes, but has different meanings in each?
If they had different meanings, a simple rename would solve the problem.
They have the same meaning.
If you can't change the base classes, I've got some other solutions,
>> That's overly strict. As Raymond shows, it is easy to deal with
>> changing method signatures in *cooperative* classes.
> I must watch that for sure.
All right, I have read this:
https://rhettinger.wordpress.com/2011/05/26/super-considered-super/
There is still something I don't get: how to
>> But I have to initialize some default attributes.
> Then the statement “there is NOTHING else here” must be false. Either
> the custom ‘__init__’ does something useful, or it doesn't.
Well... the custom __init__ method with nothing else just a super() call
was expressed there to show the super
> Raymond Hettinger gives an excellent presentation where he describes various
> problems with MI and gives solutions for them. I think this might be it:
>
> http://pyvideo.org/video/1094/the-art-of-subclassing-0
This is a much better version from one year later:
https://www.youtube.com/watch?v=m
>
> In Python 3, that will be automatic and you don't need to worry about it.
I'm using Python 3. I'm aware of old style and new style classes in
Python 2.
>
>
> [...]
>> class BootstrapDesktop(BootstrapWidget, BaseDesktop):
>> def __init__(self, appserver, session):
>> # there is NOT
Today I come across this problem for the N+1st time. Here are some
classes for the example:
class Observable:
"""Implements the observer-observable pattern."""
def __init__(self):
# initialization code here...
super(Observable, self).__init__()
class AppServerSessionMixi
> Sorry to be late to the party--I applaud that you have already
> crafted something to attack your problem. When you first posted,
> there was a library that was tickling my memory, but I could not
> remember its (simple) name. It occurred to me this morning, after
> you posted your new lib
>> How about creating two classes for this? One that supports zero sized
>> intervals, and another that doesn't?
> If you don't want zero sized intervals, just don't put any in it. You
> don't have a separate list type to support even integers vs one that
> supports all floats. What operations are
>> It is blurred by design. There is an interpretation where an interval
>> between [0..4] equals to a set of intervals ([0..2],[2..4]).
> No, because 2.5 is in one and not the other.
My notation was: 0..4 for any number between 0 and 4. And 2..4 for any
number between 2 and 4. So yes, 2.5 is in
> Yes, my question is why it's useful to have a single Interval as a
> *distinct* type, separate from the interval set type, which supports a
> sharply limited number of set-like operations (such as the union of two
> overlapping intervals but NOT two non-overlapping ones). This doesn't
> appear t
> I don't know if I like it being immutable. Maybe have separate mutable
> and immutable versions.
The reason for making it immutable is implementation specific. These
intervals are stored in an ordered list. Overlapping intervals are
unified by the constructor. This makes sure that sets with equa
> Why do you limit the intervals to datetime? Are there any assumptions in
> your code that would make it fail with int values?
It has been generalized. Now it can be used with any immutable ordered
type. :-)
--
https://mail.python.org/mailman/listinfo/python-list
> Why do you limit the intervals to datetime? Are there any assumptions in
> your code that would make it fail with int values?
Just one. The empty interval is a singleton and I want it to be smaller
than any other interval.
UTC_ZERO = datetime.datetime.utcfromtimestamp(0)
EMPTY_INTERVAL = Inte
>> element ::= (start_point_in_time, end_point_in_time)
>> intervalset ::= { element1, element2, }
>>
>> Operations on elements:
>
> Eh... I think these should be realized as operations on an intervalset
> with a single element, and that elements should simply have properties
> like the start
>
> On Fri, Apr 1, 2016 at 1:32 AM Nagy László Zsolt <mailto:gand...@shopzeus.com>> wrote:
>
> Does anyone know a library that already implements these functions?
>
>
> What do you not like about the ones on PyPI?
> https://pypi.python.org/pypi?%3Aaction=s
Hi All,
If anyone is interested, a module was born:
https://bitbucket.org/nagylzs/intervalset
https://pypi.python.org/pypi/intervalset/0.1.1
I have some unit tests, but testers and comments are welcome.
Also see below.
>>
>> Hello,
>>
>> I need to compare sets of datetime intervals, and
Hello,
I need to compare sets of datetime intervals, and make set operations on
them: intersect, union, difference etc. One element of a set would be an
interval like this:
element ::= (start_point_in_time, end_point_in_time)
intervalset ::= { element1, element2, }
Operations on element
> Yes.
> I recommend you to use motor [1].
>
>
> * [1] https://github.com/mongodb/motor
Thanks. I have checked motor, and here are some problems with it:
* I cannot install it with "pip3 install motor", because it is trying to
downgrade (!!!) pymongo to version 2.8, but it fails to do so. There
m
ayncmongo requirements are "pymongo" and "tornado".
I have a fresh installation of Python 3.5, pymongo 3.2 and tornado 4.3,
but I cannot import asyncmongo.
Tracelog below.
P:\WinPython-64bit-3.5.1.2\python-3.5.1.amd64>python
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900
2016.02.25. 9:08 keltezéssel, Nagy László Zsolt írta:
> ayncmongo requirements are "pymongo" and "tornado".
>
> I have a fresh installation of Python 3.5, pymongo 3.2 and tornado 4.3,
> but I cannot import asyncmongo.
This seems to be the exact same bug r
I ran into a problem today where I had to determine the mean point
between two datetimes. Here is an example:
>>> start = datetime.datetime(2016,2,11)
>>> stop = datetime.datetime.now()
>>> mean = start + (stop-start)*0.5
Traceback (most recent call last):
File "", line 1, in
TypeError: unsuppo
> a=10
>
> 'a' is an integer. Is it an object too?
In Python, objects have an identity. When you do "a=10" then you *bind*
the object to the name *a*. By "variable", the documentation refers to a
name that was bound to an object. This is different from many other low
level languages. For example:
> PyPi: https://pypi.python.org/pypi/tornadostreamform
> Documentation: https://pypi.python.org/pypi/tornadostreamform
Wrong paste. Here is the good one:
https://pythonhosted.org/tornadostreamform/
--
https://mail.python.org/mailman/listinfo/python-list
Pure python module that let’s you upload *huge* files to a tornado web
server.
This project provides the
|tornadostreamform.multipart_streamer.MultiPartStreamer| class that
incrementally parses incoming multipart/form-data, splits it into form
fields, and streams the fields into file like objects
YubiStorm provides a simple module that can be used from a Tornado server to
authenticate users with YubiCloud authentication servers.
The PyPi package contains the module for the API only. The repository contains
an example web server that can be used to understand how YubiCloud
authentication
> Sorry For Bad Question, But I need List Of Lists That I Can
> Acces Horyzontaly, Not In The Deep(But This IS Not All,
> I End That Evey List In List Of Lists Can Be A List...
It is not possible to do it with a native list. But you can write your
own iterable that can be iterated forever, and ind
> I have question: Is there any difference between [[]] and []?
Yes.
[] - a list with zero elements. That is an empty list.
[[]] - A list with one element. (That element is an empty list.)
> [[]] can have deeper assignment and use than
You can have it as deep as you want, if you have enough mem
> Perhaps there is a size threshold? You could experiment with different block
> sizes in the following f.read() replacement:
>
> def read_chunked(f, size=2**20):
> read = functools.partial(f.read, size)
> return "".join(iter(read, ""))
>
Under win32 platform, my experience is that the fa
>> Hello,
>>
>> I installed 3.5, "successfully" as the installer indicated, yet the program
>> wouldn't run, with the following error message: "...failed to start because
>> api-ms-win-crt-runtime-I1-1-0.dll was not found. Re-installing the
>> application may fix this problem." I reinstalled, b
> Hello,
>
> I installed 3.5, "successfully" as the installer indicated, yet the program
> wouldn't run, with the following error message: "...failed to start because
> api-ms-win-crt-runtime-I1-1-0.dll was not found. Re-installing the
> application may fix this problem." I reinstalled, but no
Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64
bit (AMD64)] on win32
>>> from datetime import timedelta
>>> from babel.dates import format_timedelta
>>> td = timedelta(seconds=39.28355172422679)
>>> format_timedelta(td)
Traceback (most recent call last):
File "", line 1,
Can u give me a suited solution that simply works for me?
> http://stackoverflow.com/questions/11405549/how-do-i-install-pycrypto-on-windows
Voidspace only has Python 3.3. They are usually behind some minor
versions. The only good way to do this is to compile it from sources.
Unfortunately, not
> Hey,
>
> I have to write a LU-decomposition. My Code worked so far but (I want to
> become better:) ) I want to ask you, if I could write this LU-decomposition
> in a better way?
Why can't you just use scipy for this?
http://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.linalg.lu.
If I have a large project with multiple directories, then I may want to
assign different translation domains for different subpackages.
Suppose I have this directory structure:
main
|
|--- sub1
|
|--- sub2
|
| sub2.1
|
| sub2.2
try:
return await waiter
finally:
# TODO: Use a context manager to add and remove the keys.
for key in keys:
self._waiters[key].discard(waiter)
if handle:
handle.cancel()
def notify(s
OrcaStorm provides a simple module that can be used from a Tornado
server to authenticate users with SaasPass (www.saaspass.com) two-factor
authentication.
This is a pre-release, it can only be used with tornado version 4.3.
That version is still beta, but that is the only version that supports
as
ClefSform provides a simple module that can be used from a Tornado
server to authenticate users with Clef (www.getclef.com) two-factor
authentication.
This is a pre-release, it can only be used with tornado version 4.3.
That version is still beta, but that is the only version that supports
async d
>
> Could be http://bugs.python.org/issue20120 ?
Almost. Except that the password was saved incorrectly by distutils
itself. So maybe the read part should not be fixed, but the write part
should.
--
https://mail.python.org/mailman/listinfo/python-list
Today I have tried to register and upload a new package by executing
setup.py register
I was asked if I want to save the creditentials in a .pypirc file and I
answered yes.
Next I wanted to run
setup.py upload
and I got this error:
Traceback (most recent call last):
File "C:\Python\Projec
Dennis Lee Bieber writes:
>> (Python does not have anything that one might consider a true constant
>> -- other than the language defined singletons: None, and maybe by now
>> True and False).
> Python now deals with those by making the names keywords::
>
> >>> True = object()
> File ""
> These two statements make me think you come from C++ or something
> similar.
>
> In Python you can declare variables at class level, but this
> declaration must NOT be interpreted in the same manner of a similar
> declaration in C++: they remain at the abstract level of a class, and
> they have
> My questions are:
> What is the scope of class variables?
In Python, you bind values (objects) to names. It is conceptually
different from "setting the value of a variable". In Python, scope
applies to names, not variables.
When you say "class variable", what do you mean?
This may help:
A nam
>
> #!/usr/bin/python
> # -- developed using Python 2.7.3
>
> class BME280:
Not strictly related to the question, but you probably want to use so
called "new style classes" when developing a new program for Python
version 2. In other words, use:
class BME280(object):
instead of
class BME280:
1 - 100 of 852 matches
Mail list logo