[OT] Security question

2016-12-22 Thread Frank Millman
reply sound reasonable, or are my concerns valid? Thanks Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: [OT] Security question

2016-12-22 Thread Frank Millman
"Chris Angelico" wrote in message news:CAPTjJmoQK39EU=m3w1zr8xa7myv42kyn4mxprgqmye4rga+...@mail.gmail.com... On Thu, Dec 22, 2016 at 8:39 PM, Frank Millman wrote: > To my surprise, they sent me my existing username *and* my existing > password, all in clear text. > Your co

Re: [OT] Security question

2016-12-22 Thread Frank Millman
"Chris Angelico" wrote in message news:CAPTjJmrG+1==nmoxf6cu2pttgcykgz_dvi36gjaqhqa9daf...@mail.gmail.com... On Thu, Dec 22, 2016 at 9:10 PM, Frank Millman wrote: > What about the second part of my query? Is it acceptable that they keep > passwords on their system in clea

Another security question

2016-12-23 Thread Frank Millman
eel that, for my purposes, the above procedure is adequate. Does all this sound reasonable? Any comments appreciated. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Another security question

2016-12-23 Thread Frank Millman
"Steve D'Aprano" wrote in message news:585d009f$0$1599$c3e8da3$54964...@news.astraweb.com... On Fri, 23 Dec 2016 09:19 pm, Frank Millman wrote: > > 3. Generate the password from the string supplied by the user as > follows - > from hashlib import blake

Re: Another security question

2016-12-23 Thread Frank Millman
"Chris Angelico" wrote in message news:captjjmpppgm+_ut_amtnb7vgo0vrgptu6iagyjqwvpxg5yp...@mail.gmail.com... On Fri, Dec 23, 2016 at 9:19 PM, Frank Millman wrote: > 3. Generate the password from the string supplied by the user as > follows - >from hashlib import bl

Re: Another security question

2016-12-24 Thread Frank Millman
pwd) print(pwd_hash) print(chk_password(pwd_hash, pwd)) ["sha256", "2cd1150b98dab7219136c8deceda00e3", 10, "6301857d79554c3e2035fc779e4903f098ba2df36536028b72952426a5773f0a"] True I know that 'rolling your own' is a no-no when it comes to security. I don&

Re: Another security question

2016-12-24 Thread Frank Millman
"Frank Millman" wrote in message news:o3lcfk$pah$1...@blaine.gmane.org... By the way, I have realised how I ended up getting sidetracked by Blake2 in the first place. If you call up the online documentation for Python3.6 and select modules>h> hashlib, it takes you stra

Re: working with classes, inheritance, _str_ returns and a list

2017-01-15 Thread Frank Millman
n You have been given an explanation, and a couple of workarounds. Here is another possible workaround, which may help depending on how you actually print the list - If you are saying - for item in list: print(item) you can say instead - for item in list: print(str(item)

Re: working with classes, inheritance, _str_ returns and a list

2017-01-15 Thread Frank Millman
"Frank Millman" wrote in message news:o5hlh4$1sb$1...@blaine.gmane.org... If you are saying - for item in list: print(item) you can say instead - for item in list: print(str(item)) This is not correct, sorry. print(item) will automatically print

Re: working with classes, inheritance, _str_ returns and a list

2017-01-15 Thread Frank Millman
"Frank Millman" wrote in message news:o5hnbq$q36$1...@blaine.gmane.org... "Frank Millman" wrote in message news:o5hlh4$1sb$1...@blaine.gmane.org... > > If you are saying - > for item in list: > print(item) > > you can say instead - > f

Re: Which part of the loop is it going through in this class frame?

2018-03-07 Thread Frank Millman
he variable 'self.time'. 'time', a local variable, is set to '6:30'. 'self.time', an instance variable, is set to '5:30'. You printed self.time, hence the result. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: String Formatting with new .format()

2018-03-28 Thread Frank Millman
assign its numerical position to all the elements in the template that use that value. They will all be populated with the same value. Personally, I always use empty {} unless point 2 above applies. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Question about Decimal and rounding

2018-04-27 Thread Frank Millman
ng aloud, maybe this is a better test - is_integer = (value == value.quantize(0)) Thanks Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about Decimal and rounding

2018-04-27 Thread Frank Millman
"Thomas Jollans" wrote in message news:19223891-2006-d496-bdfe-32776834e...@tjol.eu... On 27/04/18 10:21, Frank Millman wrote: > I have an object which represents a Decimal type. > > It can receive input from various sources. It has to round the value to > a particul

Problem with OrderedDict

2018-05-30 Thread Frank Millman
difference is not caused by using a normal dictionary. I am using Python 3.6.0. Thanks Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Problem with OrderedDict

2018-05-30 Thread Frank Millman
"Steven D'Aprano" wrote in message news:pem8b8$lm6$4...@blaine.gmane.org... On Wed, 30 May 2018 10:48:06 +0200, Frank Millman wrote: > I tried to reduce it to a simple example. I succeeded, but there are two > problems - > > 1. It always fails, so I have not reprodu

Re: Problem with OrderedDict - progress report

2018-05-31 Thread Frank Millman
"Frank Millman" wrote in message news:pemchs$r12$1...@blaine.gmane.org... So working backwards, I have solved the first problem. I am no nearer to figuring out why it fails intermittently in my live program. The message from INADA Naoki suggests that it could be inherent in CPython

Re: Problem with OrderedDict - progress report

2018-05-31 Thread Frank Millman
"Steven D'Aprano" wrote in message news:peorib$1f4$2...@blaine.gmane.org... On Thu, 31 May 2018 10:05:43 +0200, Frank Millman wrote: > From the interpreter session below, you will see that adding a key while > processing the *last* key in an OrderedDict does not give r

Re: Problem with OrderedDict - progress report

2018-06-01 Thread Frank Millman
ttent error. I was adding a key while iterating, which was an error. But if I happened to be on the last key at the time, it did not raise an exception. If I was on a previous key, it did raise an exception. Frank -- https://mail.python.org/mailman/listinfo/python-list

Re: list of lists

2018-07-22 Thread Frank Millman
econd element of the first inner list. HTH Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: coding style - where to declare variables

2018-07-23 Thread Frank Millman
at Python objects have 3 attributes - a type, a value, and a unique id. One thing that they do *not* have is a name. Once I understood that, a lot of things became clearer. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Pylint false positives

2018-08-14 Thread Frank Millman
quite a few of them, so it would add some clutter. Second question - if my present code is not unpythonic, is there an easy way to suppress the error messages, without disabling 'no-member' altogether? Thanks Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Pylint false positives

2018-08-14 Thread Frank Millman
"D'Arcy Cain" wrote in message news:865ed61a-cf1d-959f-f77e-dc586fe6e...@vybenetworks.com... On 2018-08-14 03:38 AM, Frank Millman wrote: > Hi all > > Pylint is flagging a lot of lines as errors that I would consider to be > acceptable. > > I have an abstr

Re: Pylint false positives

2018-08-14 Thread Frank Millman
"Thomas Jollans" wrote in message news:53faf0ef-4054-53fa-6179-a862495ea...@tjol.eu... On 2018-08-14 09:38, Frank Millman wrote: > Hi all > > Pylint is flagging a lot of lines as errors that I would consider to be > acceptable. > > I have an abstract class ClassA w

Re: Pylint false positives

2018-08-14 Thread Frank Millman
"Frank Millman" wrote in message news:pku0qd$ua5$1...@blaine.gmane.org... Pylint is flagging a lot of lines as errors that I would consider to be acceptable. I have an abstract class ClassA with a number of concrete sub-classes. ClassA has a method which invokes 'self.metho

Re: Pylint false positives

2018-08-16 Thread Frank Millman
"D'Arcy Cain" wrote in message news:6b4b8587-46c0-19b0-c538-efdf396f0...@vybenetworks.com... On 2018-08-14 04:58 AM, Frank Millman wrote: > As an example, I have a master class defining a unit of data (i.e. the > value of a column) retrieved from a database. I have separ

Re: Pylint false positives

2018-08-17 Thread Frank Millman
"Steven D'Aprano" wrote in message news:pl5qbk$r7k$5...@blaine.gmane.org... On Fri, 17 Aug 2018 08:14:02 +0200, Frank Millman wrote: > I find that using a separate method per subclass does exactly what I > want, and that part of my project has been working stably for

Re: Pylint false positives

2018-08-17 Thread Frank Millman
"Dan Sommers" wrote in message news:pl622a$a1f$1...@blaine.gmane.org... On Fri, 17 Aug 2018 09:46:01 +0200, Frank Millman wrote: > It is just a slight annoyance (to me) that pylint complains about the > subclass methods when they are called from the Field class. I don't

Question about floating point

2018-08-28 Thread Frank Millman
' at this point? Or if I do this - z = (1.1 + 2.2) * 10 / 10 z 3.3 What makes it different from the first example? Thanks Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about floating point

2018-08-28 Thread Frank Millman
"Frank Millman" wrote in message news:pm3l2m$kv4$1...@blaine.gmane.org... I know about this gotcha - >>> x = 1.1 + 2.2 >>> x 3.3003 [...] >>> y = 3.3 >>> y 3.3 [...] >>> z = (1.1 + 2.2) * 10 / 10 >>>

Re: Question about floating point

2018-09-01 Thread Frank Millman
"Frank Millman" wrote in message news:... "Frank Millman" wrote in message news:pm3l2m$kv4$1...@blaine.gmane.org... I know about this gotcha - >>> x = 1.1 + 2.2 >>> x 3.3003 [...] I have enjoyed the discussion, and I have learnt a lot abo

Quickest way to concatenate strings

2018-10-11 Thread Frank Millman
c per loop Interestingly, the 'format' function is slower - C:\Users\User>python -m timeit -s "x='a'*500; y='b'*500; z='c'*500" '{}{}{}'.format(x, y, z) 50 loops, best of 5: 559 nsec per loop I am using Python 3.7.0 on Windows 10. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Quickest way to concatenate strings

2018-10-12 Thread Frank Millman
On 12/10/2018 08:36, Thomas Jollans wrote: > On 12/10/2018 07:55, Frank Millman wrote: > Hi all > > > I have often read that the quickest way to concatenate a number of > > strings is to place them in a list and 'join' them - > > > > > > C

Re: Quickest way to concatenate strings

2018-10-12 Thread Frank Millman
"Dennis Lee Bieber" wrote in message news:cnk0sdl5a7p17framc5er811p1230mp...@4ax.com... On Fri, 12 Oct 2018 07:55:58 +0200, "Frank Millman" declaimed the following: >I have often read that the quickest way to concatenate a number of >strings >is to place t

Questions about weakref

2018-10-16 Thread Frank Millman
ource. The source says 'return list(self.data)', and the docstring clearly states 'Return a list of weak references to the keys'. I think the docs should say the same. Should I raise an issue for this? Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: (Python 3.5) Asyncio and an attempt to run loop.run_until_complete() from within a running loop

2016-04-08 Thread Frank Millman
k when I wanted to run a background task. It works perfectly for me. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: passing dictionay as argument

2016-06-13 Thread Frank Millman
ns syntax error: # define dictionary outside the function call: credit_card={ 'card_number': '4111', 'expiration_date': '04/2014', 'card_code': '343', } [...] result = authorize.Transaction.sale({'amount&#

Re: Multiline parsing of python compiler demistification needed

2016-06-16 Thread Frank Millman
d string in its own right. The correct way to write it is - print "A test case " + "str_1[%s] " % (str_1) + "str_2[%s]" % (str_2) If you wrote it without the '+' signs, the answer would be different. Python treats contiguous strings as a single string, so y

Re: python3: why writing to socket require bytes type while writing to a file require str ?

2016-07-22 Thread Frank Millman
n text mode, using 'w', it expects a string. If you open it in binary mode, using 'wb', it expects bytes. HTH Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Print Error

2016-07-26 Thread Frank Millman
ere you call int() - int(myAge) - so myAge must be an invalid literal. You could print it out and see what it is, but the traceback is already giving you that information for free. Can you see the '' at the end of the message. That is the contents of the invalid literal. HTH Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Odd truth result with in and ==

2018-11-23 Thread Frank Millman
n write this as bool([1, 2, 3]) == True True I have on vary rare occasions had to convert 'truthiness' to an actual boolean, and this is how I do it. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Error Python version 3.6 does not support this syntax.

2018-11-27 Thread Frank Millman
line 'return None', it may be complaining that None is superfluous - a plain 'return' does the same thing. HTH Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Complex 'compare'

2018-12-18 Thread Frank Millman
columns will be the primary key, so the two rows should never be equal. Thanks Frank Millman def compare(source_row, target_row, order, compare_type): # source_row - the row I want to compare - some sort columns could contain None # target_row - the row I want to compare it with - no sort

Re: Complex 'compare'

2018-12-18 Thread Frank Millman
"Chris Angelico" wrote in message news:CAPTjJmpLuyFf04AT+34VraJ5itDvNySVJspEv=ddwdsmmsf...@mail.gmail.com... On Tue, Dec 18, 2018 at 9:52 PM Frank Millman wrote: > I need to know if one row is greater than or less than the other. The > sort > sequence can be complex -

Re: Complex 'compare'

2018-12-25 Thread Frank Millman
"Frank Millman" wrote on 2018-12-18 in message news:... I want to compare two tuples. They each represent a row in a database, and each element represents a column, so I will use that terminology. I need to know if one row is greater than or less than the other. The sort seque

Re: the python name

2019-01-02 Thread Frank Millman
#why-is-it-called-python HTH Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Best practice for upgrading SQLite C library (DLL, SO, etc) that ships with Python

2019-01-05 Thread Frank Millman
can't comment about Linux or macOS, sorry. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Exercize to understand from three numbers which is more high

2019-01-27 Thread Frank Millman
which is the lowest. Give that a go, and come back here if you get stuck. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Exercize to understand from three numbers which is more high

2019-01-27 Thread Frank Millman
The last two lines appear to be indented under the 'if number3 < ' line. I think you want them to be unindented so that they run every time. 2. When you have lines such as - if a == 1: do something if a == 2: do something else then if 'a' is equal

Re: Exercize to understand from three numbers which is more high

2019-01-28 Thread Frank Millman
nes to be executed every time. If so, they should be lined up underneath the 'if', not the 'print'. > if a == 1: > do something > elif a == 2: > do something else Finally I understood the differences between if and elif! Lol! :D It i

Re: Implement C's Switch in Python 3

2019-02-03 Thread Frank Millman
'11th' chooseFrom[21] '21st' Not having a default case as in switch forced you to write out all possible combinations. I think the intent and readbility of switch statements is a bit nicer. I have not been following this thread in detail, but how about this

python3.7 installation failing - so why?

2019-02-22 Thread Frank Miles
I have a Debian/Linux machine that I just upgraded to the newer "testing" distribution. I'd done that earlier to another machine and all went well. With the latest machine, python2 is OK but python3 can barely run at all. For example: $ python3 Python 3.7.2+ (default, Feb 2 2019, 14:31:48)

Re: python3.7 installation failing - so why?

2019-02-22 Thread Frank Miles
On Sat, 23 Feb 2019 14:56:03 +1100, Chris Angelico wrote: > On Sat, Feb 23, 2019 at 2:51 PM Frank Miles > wrote: >> >> I have a Debian/Linux machine that I just upgraded to the newer >> "testing" >> distribution. I'd done that earlier to another m

Stack Overflow Developer Survey

2019-04-13 Thread Frank Millman
first on the list - """ Python, the fastest-growing major programming language, has risen in the ranks of programming languages in our survey yet again, edging out Java this year and standing as the second most loved language (behind Rust). """ I thought

Re: How to concatenate strings with iteration in a loop?

2019-05-21 Thread Frank Millman
e string as per the above format? Thanks in advance The following (untested) assumes that you are using a reasonably up-to-date Python that has the 'f' format operator. tempStr = f'{year},{mon},{day},{UTCHrs[k]:6.4f}' for col in range(10): tempStr += f',{AExt[k, col]:9.7f}' HTH Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: pyodbc -> MS-SQL Server Named Instance ?

2019-07-01 Thread Frank Millman
tabase, user=self.user, password=self.pwd, trusted_connection=True) SQL Server is running on the same host as my python program, so it may be a simpler setup than yours. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: pyodbc -> MS-SQL Server Named Instance ?

2019-07-02 Thread Frank Millman
On 2019-07-02 3:41 PM, Adam Tauno Williams wrote: On Tue, 2019-07-02 at 07:36 +0200, Frank Millman wrote: On 2019-07-01 10:13 PM, Adam Tauno Williams wrote: I am trying to connect to a Named Instance on an MS-SQL server using pyODBC. This is what I use -  conn = pyodbc.connect

Re: How Do You Replace Variables With Their Values?

2019-07-10 Thread Frank Millman
eparate lists called 'Starters', 'Main Course', and 'Desert'?", the code that you started with is exactly what you asked for. I think you were asking how to create a variable called 'Starters' containing the list of starters. It can be done, using th

Re: Accumulate , Range and Zeros

2019-07-13 Thread Frank Millman
default, range() starts from 0. Anything multiplied by 0 equals 0. So you can multiply as many numbers as you like, if the first one is 0, the rest will also be 0. QED Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Enumerate - int object not subscriptable

2019-08-20 Thread Frank Millman
): print(num[idx + 1], num) I am expecting 2, 1. But am receiving TypeError: 'int' object is not subscriptable Why? I think you want a[idx+1], not num[idx+1]. Bear in mind that you will get IndexError for the last item in the list. Frank Millman -- https://mail.python.org/mailma

Re: How should we use global variables correctly?

2019-08-23 Thread Frank Millman
27;, whereas with a global 'foo' there can only be one value of 'foo' for the module. It would make sense to use the 'global' keyword if you have a module with various functions, several of which refer to 'foo', but only one of which changes the value of 'foo'. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Compare zip lists where order is important

2019-08-28 Thread Frank Millman
x27;, 2)] What's a working way to go about this? This would have worked if you sorted your lists first - >>> [i for i, j in zip(sorted(teams), sorted(shuffle_teams)) if i != j] [('Ally', 2), ('Fredricka', 3), ('Tim', 1)] Except you wanted to see the re

Re: ``if var'' and ``if var is not None''

2019-08-31 Thread Frank Millman
On 2019-09-01 8:12 AM, Hongyi Zhao wrote: Hi, The following two forms are always equivalent: ``if var'' and ``if var is not None'' Regards Not so. Here is an example - >>> var = [] >>> bool(var) False >>> bool(var is not None) True >>

Re: phyton

2019-09-10 Thread Frank Millman
>>> my_dict = dict() >>> my_dict {} >>> my_dict = {} # this does the same, but is shorter >>> my_dict {} >>> my_dict['high'] = 21 >>> my_dict {'high': 21} >>> Try that, and report back with any questions Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Python in The Economist

2019-09-24 Thread Frank Millman
ng machines. That approach has attracted interest from DARPA ..." Hope this is of interest. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: sqlalchemy & #temp tables

2019-10-07 Thread Frank Millman
you have a large volume of temp data, but it may be worth trying. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Instantiating sub-class from super

2019-10-15 Thread Frank Millman
ure 2) showing the data relationships. I downloaded the original article onto my computer years ago, and my local copy does have the images, so if you would like to see them let me know and I will upload my version somewhere to make it accessible. Frank Millman -- https://mail.python.org/m

Re: Instantiating sub-class from super

2019-10-16 Thread Frank Millman
On 2019-10-16 7:33 AM, Frank Millman wrote: Here is a link to an article entitled 'Understanding Hidden Subtypes'. It dates back to 2004, but I think it is still relevant. It addresses precisely the issues that you raise, but from a data-modelling perspective, not a programming o

Re: Instantiating sub-class from super

2019-10-24 Thread Frank Millman
On 2019-10-19 12:37 AM, DL Neil via Python-list wrote: On 16/10/19 6:33 PM, Frank Millman wrote: On 2019-10-14 10:55 PM, DL Neil via Python-list wrote: Is there a technique or pattern for taking a (partially-) populated instance of a class, and re-creating it as an instance of one of its sub

datetime gotcha

2019-12-10 Thread Frank Millman
object." If it was using multiple inheritance, a dtm should also be an instance of tm, but it is not. This is using Python 3.7.2. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: datetime gotcha

2019-12-12 Thread Frank Millman
found a workaround. >>> from datetime import date as dt, datetime as dtm >>> type(dtm.now()) is dtm True >>> type(dtm.now()) is dt False >>> I will run with this. Frank -- https://mail.python.org/mailman/listinfo/python-list

Re: Lists And Missing Commas

2019-12-23 Thread Frank Millman
mon. More likely is the use of a newline. I use this from time to time when constructing long string literals - long_string = ( "this is the first chunk " "this is the second chunk " "etc etc" ) My 0.02c Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: name 'sys' is not defined

2019-12-29 Thread Frank Millman
o add this line - import sys HTH Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Fun with IO

2020-01-17 Thread Frank Millman
wait pdf_handler(client_writer) client_writer.write(b'\r\n') It works! ReportLab accepts client_writer as a file-like object, and writes to it directly. I cannot use chunking, so I just let it do its thing. Can anyone see any problem with this? Thanks Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Sandboxing eval()

2020-01-21 Thread Frank Millman
quite difficult" I realised that my method is vulnerable to this and, like Robin, I have not come up with an easy way to guard against it. Frank Millman Just use floats instead of integers. I like that idea. I will probably use Decimal instead of float, but the principle is the sa

Re: Fun with IO

2020-01-21 Thread Frank Millman
On 2020-01-21 6:17 PM, Maxime S wrote: Hi, Le ven. 17 janv. 2020 à 20:11, Frank Millman a écrit : It works perfectly. However, some pdf's can be large, and there could be concurrent requests, so I wanted to minimise the memory footprint. So I tried passing the client_writer directly t

Re: Print statement

2020-01-28 Thread Frank Millman
can't multiply sequence by non-int of type 'float' >>> You probably meant float(squares) * float(.15) or more simply float(squares) * .15 HTH Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

lxml - minor problem appending new element

2020-02-02 Thread Frank Millman
', 'b', 'c', 'd'] >>> >>> lmx = '' >>> xml = etree.fromstring(lmx) >>> for y in xml: ... print(etree.tostring(y)) ... if y.get('z') == 'c': ... xml.append(etree.Element('y', attrib={'z': 'd'})) ... b'' b'' b'' >>> etree.tostring(xml) b'' As you can see, the last element is correctly appended, but is not included in the iteration. Is there any chance that this can be looked at, or is it just the way it works? BTW, I see that ElementTree in the standard library does not have this problem. Thanks Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: lxml - minor problem appending new element

2020-02-03 Thread Frank Millman
On 2020-02-03 10:39 AM, Peter Otten wrote: Frank Millman wrote: This is a minor issue, and I have found an ugly workaround, but I thought I would mention it. Like this? children = list(xml) for y in children: print(etree.tostring(y)) if y.get('z') == 'c&#

Change in behaviour Python 3.7 > 3.8

2020-02-06 Thread Frank Millman
. I have a workaround, so I am just reporting this for the record. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Change in behaviour Python 3.7 > 3.8

2020-02-06 Thread Frank Millman
On 2020-02-06 2:58 PM, Frank Millman wrote: [...] I have a module (A) containing common objects shared by other modules. I have a module (B) which imports one of these common objects - a set(). [...] This has worked for years, but now when the __del__ method is called, the common object

Re: Change in behaviour Python 3.7 > 3.8

2020-02-07 Thread Frank Millman
On 2020-02-07 1:06 PM, Barry Scott wrote: On 7 Feb 2020, at 05:27, Frank Millman wrote: @Barry I agree that __del__() is rarely useful, but I have not come up with an alternative to achieve what I want to do. My app is a long-running server, and creates many objects on-the-fly depending

Asyncio question

2020-02-20 Thread Frank Millman
he session is closed. Is this better, worse, or does it make no difference? If it makes no difference, I will lean towards the first approach, as it is easier to reason about what is going on. Thanks for any advice. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Asyncio question

2020-02-21 Thread Frank Millman
On 2020-02-21 11:13 PM, Greg Ewing wrote: On 21/02/20 7:59 pm, Frank Millman wrote: My first attempt was to create a background task for each session which runs for the life-time of the session, and 'awaits' its queue. It works, but I was concerned about having a lot a background tas

Why is passing loop argument to asyncio.Event deprecated?

2020-02-22 Thread Frank Millman
Hi all Why is 'explicit passing of a loop argument to asyncio.Event' deprecated (see What's new in Python 3.8)? I use this in my project. I can find a workaround, but it is not elegant. I can explain my use case if requested, but I was just curious to find out the reason.

Re: python

2020-02-22 Thread Frank Millman
IN, or is ignored as neither. Now -- write a program does just that... """ Try his suggestion, and come back here if you get stuck. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Asyncio question (rmlibre)

2020-02-28 Thread Frank Millman
ime efficient at handling large numbers of > concurrent async tasks. > Thanks for the reply. That is exactly what I want, and in an earlier response Greg echoes what what you say here - background tasks are lightweight and are ideal for my situation. Frank -- https://mail.python.org/mailman/listinfo/python-list

Groovy to Python Converter ?

2020-02-29 Thread Frank Rentmeister
In my new project, I am supposed to bring the current test cases, all written in Groovy, to a Python base. We are talking about several thousand test cases that have accumulated over the last years. Since the test cases are also to be extended towards API gateway testing, and since we work with

Intermittent bug with asyncio and MS Edge

2020-03-21 Thread Frank Millman
() writer.close() await writer.wait_closed() I have asked the same question on StackOverflow, from an MS Edge perspective - https://stackoverflow.com/questions/60785767/ms-edge-randomly-does-not-load-script I don't know whether the problem lies with Python or MS Edge, but a

Re: Intermittent bug with asyncio and MS Edge

2020-03-22 Thread Frank Millman
On 2020-03-21 8:04 PM, Barry Scott wrote: On 21 Mar 2020, at 13:43, Frank Millman wrote: Hi all I have a strange intermittent bug. The role-players - asyncio on Python 3.8 running on Windows 10 Microsoft Edge running as a browser on the same machine The bug does not occur with

Re: Intermittent bug with asyncio and MS Edge

2020-03-22 Thread Frank Millman
On 2020-03-22 10:45 AM, Chris Angelico wrote: On Sun, Mar 22, 2020 at 6:58 PM Frank Millman wrote: I'd look at the network traffic with wireshark to see if there is anything different between edge and the other browsers. You are leading me into deep waters here :-) I have never

Re: Intermittent bug with asyncio and MS Edge

2020-03-22 Thread Frank Millman
On 2020-03-22 11:00 AM, Barry Scott wrote: On 22 Mar 2020, at 07:56, Frank Millman wrote: On 2020-03-21 8:04 PM, Barry Scott wrote: I'd look at the network traffic with wireshark to see if there is anything different between edge and the other browsers. You are leading me into

Re: Intermittent bug with asyncio and MS Edge

2020-03-22 Thread Frank Millman
On 2020-03-22 1:01 PM, Chris Angelico wrote: On Sun, Mar 22, 2020 at 12:45 AM Frank Millman wrote: Hi all I have a strange intermittent bug. The role-players - asyncio on Python 3.8 running on Windows 10 Microsoft Edge running as a browser on the same machine The bug does not

Re: Intermittent bug with asyncio and MS Edge

2020-03-23 Thread Frank Millman
On 2020-03-22 12:11 PM, Chris Angelico wrote: On Sun, Mar 22, 2020 at 8:30 PM Frank Millman wrote: On 2020-03-22 10:45 AM, Chris Angelico wrote: If you can recreate the problem with a single socket and multiple requests, that would be extremely helpful. I also think it's highly likely

Re: Intermittent bug with asyncio and MS Edge

2020-03-23 Thread Frank Millman
On 2020-03-23 12:57 PM, Chris Angelico wrote: On Mon, Mar 23, 2020 at 8:03 PM Frank Millman wrote: On 2020-03-22 12:11 PM, Chris Angelico wrote: On Sun, Mar 22, 2020 at 8:30 PM Frank Millman wrote: On 2020-03-22 10:45 AM, Chris Angelico wrote: If you can recreate the problem with a

Re: Intermittent bug with asyncio and MS Edge

2020-03-24 Thread Frank Millman
On 2020-03-23 1:56 PM, Frank Millman wrote: On 2020-03-23 12:57 PM, Chris Angelico wrote: On Mon, Mar 23, 2020 at 8:03 PM Frank Millman wrote: On 2020-03-22 12:11 PM, Chris Angelico wrote: On Sun, Mar 22, 2020 at 8:30 PM Frank Millman wrote: On 2020-03-22 10:45 AM, Chris Angelico wrote

Re: Intermittent bug with asyncio and MS Edge

2020-03-24 Thread Frank Millman
On 2020-03-24 1:54 PM, Frank Millman wrote: On 2020-03-23 1:56 PM, Frank Millman wrote: I have one frustration with Wireshark. I will mention it in case anyone has a solution. I can see that Edge opens multiple connections. I am trying to track the activity on each connection separately. I

Re: Intermittent bug with asyncio and MS Edge

2020-03-24 Thread Frank Millman
On 2020-03-24 8:39 PM, Barry Scott wrote: On 24 Mar 2020, at 11:54, Frank Millman wrote: I decided to concentrate on using Wireshark to detect the difference between a Python3.7 session and a Python3.8 session. Already I can see some differences. There is only one version of my program

Python version and Apache mod_python mismatching version

2020-04-03 Thread frank . scarpa
Hello, I have a Centos7 web server with python 2.7 installed and I want Apache to serve python scripts so I figure I have to install mod_python: i know that this module is deprecated, but I need it only for internal pourposes. Is the mod_python version (which is 3.5 with Python 3 support) someho

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