Re: Privy: An easy, fast lib to password-protect your data

2017-07-05 Thread ofekmeister
> The person spamming right now would be you. You just posted a link, > without any explanations, any marketing blurbs, nothing. I've explained everything as succinctly as I can in the readme. Pasting bits of it here would not benefit anyone. > Why would I use your tool instead of something esta

Re: School Management System in Python

2017-07-05 Thread Tim Chase
On 2017-07-06 11:47, Gregory Ewing wrote: > The only reason I can think of to want to use tsv instead > of csv is that you can sometimes get away without having > to quote things that would need quoting in csv. But that's > not an issue in Python, since the csv module takes care of > all of that fo

Re: EuroPython 2017: Free Intel Distribution for Python

2017-07-05 Thread Gregory Ewing
Grant Edwards wrote: That trick of hiding links has become quite fashionable -- I don't know why. Probably the result of graphic arts people who think that appearance is everything and don't really understand the web. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: School Management System in Python

2017-07-05 Thread Gregory Ewing
On 07/05/2017 03:18 PM, YOUR_NAME_HERE wrote: Some people complain that tsv has problems, so maybe csv would be the way to go. The main downside to tsv is that it can be hard to deal with in a text editor -- the difference between tabs and spaces is not visually obvious. The only reason I can

Re: EuroPython 2017: Free Intel Distribution for Python

2017-07-05 Thread Grant Edwards
On 2017-07-05, Terry Reedy wrote: > On 7/5/2017 9:51 AM, Grant Edwards wrote: > >> Just click on the link on the europython blog page. > > What link? The first screen has 7 links to EuroPython and no obvious > links to Intel. > > Oh, the headline is a cleverly disguised link that does not look l

Re: get value from list using widget

2017-07-05 Thread Terry Reedy
On 7/5/2017 12:34 PM, jorge.conr...@cptec.inpe.br wrote: I would like know dow can I select and get the value from a list of values uisng widgets. One way is to learn tkinter and then learn to use the Listbox widget. The doc references a couple of decent tutorial web sites. Stackoverflow has

Re: How to write raw strings to Python

2017-07-05 Thread Pavol Lisy
On 7/5/17, Binary Boy wrote: > On Wed, 05 Jul 2017 20:37:38 +0300, Jussi Piitulainen wrote: >> Sam Chats writes: >> >> > On Wednesday, July 5, 2017 at 9:09:18 PM UTC+5:30, Grant Edwards wrote: >> >> On 2017-07-05, Sam Chats wrote: >> >> >> >> > I want to write, say, 'hello\tworld' as-is to a file

Re: EuroPython 2017: Free Intel Distribution for Python

2017-07-05 Thread Terry Reedy
On 7/5/2017 9:51 AM, Grant Edwards wrote: On 2017-07-04, MRAB wrote: On 2017-07-04 23:05, Terry Reedy wrote: On 7/4/2017 10:22 AM, M.-A. Lemburg wrote: http://blog.europython.eu/post/162590522362/europython-2017-free-intel-distribution-for I looked but did not find the most important thing

Re: Proper architecture

2017-07-05 Thread Andrew Zyman
Cameron, took me some time to get to this. Waling down your comments: >...Normally I would have your DB class represent an open (or openable, if you wanted to defer that) database connection. So your main class would go: > def __init__(self, ...other args...): > self.db = DB(location="blah.sqli

Re: How to write raw strings to Python

2017-07-05 Thread Jussi Piitulainen
Binary Boy writes: > On Wed, 05 Jul 2017 20:37:38 +0300, Jussi Piitulainen wrote: >> Sam Chats writes: >> >> > On Wednesday, July 5, 2017 at 9:09:18 PM UTC+5:30, Grant Edwards wrote: >> >> On 2017-07-05, Sam Chats wrote: >> >> >> >> > I want to write, say, 'hello\tworld' as-is to a file, but do

Re: Python threading and sharing variables

2017-07-05 Thread eryk sun
On Wed, Jul 5, 2017 at 5:06 PM, Chris Angelico wrote: > On Thu, Jul 6, 2017 at 2:24 AM, eryk sun wrote: >>> But what could it do? Most likely, it's going to end up mutating a >>> dict (the core type), so unless the __setitem__ is itself maintaining >>> complex state that needs a lock, all you've

Re: How to write raw strings to Python

2017-07-05 Thread Binary Boy
On Wed, 05 Jul 2017 20:37:38 +0300, Jussi Piitulainen wrote: > Sam Chats writes: > > > On Wednesday, July 5, 2017 at 9:09:18 PM UTC+5:30, Grant Edwards wrote: > >> On 2017-07-05, Sam Chats wrote: > >> > >> > I want to write, say, 'hello\tworld' as-is to a file, but doing > >> > f.write('hello\tw

Re: School Management System in Python

2017-07-05 Thread Binary Boy
On Wed, 5 Jul 2017 15:28:51 +0200, Thomas Nyberg wrote: > On 07/05/2017 03:18 PM, YOUR_NAME_HERE wrote: > > On Wed, 5 Jul 2017 13:02:36 + (UTC) YOUR_NAME_HERE wrote: > >> I can use either tsv or csv. Which one would be better? > > > > > > Some people complain that tsv has problems, so maybe c

Re: How to write raw strings to Python

2017-07-05 Thread Jussi Piitulainen
Sam Chats writes: > On Wednesday, July 5, 2017 at 9:09:18 PM UTC+5:30, Grant Edwards wrote: >> On 2017-07-05, Sam Chats wrote: >> >> > I want to write, say, 'hello\tworld' as-is to a file, but doing >> > f.write('hello\tworld') makes the file look like: >> [...] >> > How can I fix this? >> >> T

Re: get value from list using widget

2017-07-05 Thread John Gordon
In jorge.conr...@cptec.inpe.br writes: > Hi, > I would like know dow can I select and get the value from a list of > values uisng widgets. You haven't given us nearly enough detail to answer your question. What do you mean by "widget"? Do you mean HTML input elements such as radio buttons o

Re: How to write raw strings to Python

2017-07-05 Thread Sam Chats
On Wednesday, July 5, 2017 at 9:09:18 PM UTC+5:30, Grant Edwards wrote: > On 2017-07-05, Sam Chats wrote: > > > I want to write, say, 'hello\tworld' as-is to a file, but doing > > f.write('hello\tworld') makes the file look like: > [...] > > How can I fix this? > > That depends on what you mean

get value from list using widget

2017-07-05 Thread jorge . conrado
Hi, I would like know dow can I select and get the value from a list of values uisng widgets. Thanks, Conrado -- https://mail.python.org/mailman/listinfo/python-list

Re: Python threading and sharing variables

2017-07-05 Thread Chris Angelico
On Thu, Jul 6, 2017 at 2:24 AM, eryk sun wrote: >> But what could it do? Most likely, it's going to end up mutating a >> dict (the core type), so unless the __setitem__ is itself maintaining >> complex state that needs a lock, all you've done is move the problem >> around, and the same solutions w

Re: Python threading and sharing variables

2017-07-05 Thread eryk sun
On Wed, Jul 5, 2017 at 4:04 PM, Chris Angelico wrote: > On Thu, Jul 6, 2017 at 12:39 AM, eryk sun wrote: >>> This doesn't show a potential concurrency problem. Calculating a hash >>> on "cnt" is independent of other threads; the actual work of >>> __setitem__ isn't visible in this view. There cer

Re: how to add new tuple as key in dictionary?

2017-07-05 Thread John Gordon
In <344c23f8-f440-4c23-a5e6-9f93b0145...@googlegroups.com> Ho Yeung Lee writes: > I find that list can not be key in dictionary > then find tuple can be as key > but when I add new tuple as key , got error in python 2.7 > groupkey = {(0,0): []} > groupkey[tuple([0,3])] = groupkey[tuple([0,3])]

Re: Python threading and sharing variables

2017-07-05 Thread Chris Angelico
On Thu, Jul 6, 2017 at 12:39 AM, eryk sun wrote: >> This doesn't show a potential concurrency problem. Calculating a hash >> on "cnt" is independent of other threads; the actual work of >> __setitem__ isn't visible in this view. There certainly are places >> where a context switch could cause prob

Re: How to write raw strings to Python

2017-07-05 Thread Grant Edwards
On 2017-07-05, Sam Chats wrote: > I want to write, say, 'hello\tworld' as-is to a file, but doing > f.write('hello\tworld') makes the file look like: [...] > How can I fix this? That depends on what you mean by "as-is". Seriously. Do you want the single quotes in the file? Do you want the bac

Re: Meta: double posts [Was: School Management System in Python]

2017-07-05 Thread saurabh chaturvedi
No, I am not. I'm not posting to Python-list@python.org. However, I'm using my own NNTP client I built as an exercise. Maybe it has a bug. I'll work on it. Thanks! Sam On Wed, Jul 5, 2017 at 7:49 PM, Tim Golden wrote: > Are you posting both to python-list@python.org and to comp.lang.python > --

Re: How to write raw strings to Python

2017-07-05 Thread Thomas Jollans
On 2017-07-05 17:09, Sam Chats wrote: > > Thanks, but I've tried something similar. Actually, I want to convert a > string which I receive from a NNTP server to a raw string. So if I try > something like: > raw = r"%s" % string_from_server > You may me looking for repr()

Re: How to write raw strings to Python

2017-07-05 Thread Sam Chats
On Wednesday, July 5, 2017 at 8:22:13 PM UTC+5:30, Stephen Tucker wrote: > Sam, > > You use > > f.write(r'hello\tworld') > > The r in front of the string stands for raw and is intended to switch off > the escape function of the backslash in the string. It works fine so long > as the string doesn

Re: School Management System in Python

2017-07-05 Thread Thomas Nyberg
On 07/05/2017 03:30 PM, YOUR_NAME_HERE wrote: > Hey that was simple enough! Thanks for the code! I was also considering the > use of JSON. Which one would be better? > If you have hierarchical data best described by dicts/lists (in the python meaning), then json isn't a bad approach. But if you j

Re: School Management System in Python

2017-07-05 Thread Christopher Reimer
On Jul 5, 2017, at 6:34 AM, Sam Chats wrote: > Just curious, is it better, performance wise, to read from a text file (css > or tsv) compared to reading from a binary pickle file? I prefer CSV because I can load the file into Microsoft Excel and do a quick search. Chris R. -- https://mail.py

Re: How to write raw strings to Python

2017-07-05 Thread Stephen Tucker
Sam, You use f.write(r'hello\tworld') The r in front of the string stands for raw and is intended to switch off the escape function of the backslash in the string. It works fine so long as the string doesn't end with a backslash, as in f.write('hello\tworld\') If you try this, you get an error

Re: How to write raw strings to Python

2017-07-05 Thread Stephen Tucker
Sam, You use r'hello\tworld' The r in front of the string stands for raw and it is intended to switch off the normal escape function of a backslash. It works fine so long as the string doesn't end with a backslash. If you end the string with a backslash, as in r'hello\tworld\' you get an error

Re: Python threading and sharing variables

2017-07-05 Thread eryk sun
On Wed, Jul 5, 2017 at 2:03 PM, Chris Angelico wrote: > On Wed, Jul 5, 2017 at 11:50 PM, eryk sun wrote: >> Assignment of a single variable in an unoptimized namespace isn't >> completely immune to this -- in principle. Think __setitem__, >> __getitem__, __hash__, and __eq__. For example: >> >>

Re: School Management System in Python

2017-07-05 Thread Thomas Nyberg
On 07/05/2017 03:34 PM, Sam Chats wrote: > Just curious, is it better, performance wise, to read from a text file (css > or tsv) compared to reading from a binary pickle file? > I honestly don't know. You should probably measure it if you're wondering. However, I don't think it's worth thinking a

How to write raw strings to Python

2017-07-05 Thread Sam Chats
I want to write, say, 'hello\tworld' as-is to a file, but doing f.write('hello\tworld') makes the file look like: hello world How can I fix this? Thanks in advance. Sam -- https://mail.python.org/mailman/listinfo/python-list

Meta: double posts [Was: School Management System in Python]

2017-07-05 Thread Tim Golden
Are you posting both to python-list@python.org and to comp.lang.python -- and under different names? If you are, please use one or the other: they mirror both ways, and we're seeing double posts which the gateway thinks are different because of a different sending address. Thanks TJG -- htt

Re: Python threading and sharing variables

2017-07-05 Thread Chris Angelico
On Wed, Jul 5, 2017 at 11:50 PM, eryk sun wrote: > Assignment of a single variable in an unoptimized namespace isn't > completely immune to this -- in principle. Think __setitem__, > __getitem__, __hash__, and __eq__. For example: > > >>> exec('cnt = 42; cnt = 43; cnt', NoisyNS()) > __seti

Re: School Management System in Python

2017-07-05 Thread YOUR_NAME_HERE
On Wed, 5 Jul 2017 06:34:26 -0700 (PDT), Sam Chats wrote: > On Wednesday, July 5, 2017 at 6:56:06 PM UTC+5:30, Thomas Nyberg wrote: > > On 07/05/2017 03:18 PM, YOUR_NAME_HERE wrote: > > > On Wed, 5 Jul 2017 13:02:36 + (UTC) YOUR_NAME_HERE wrote: > > >> I can use either tsv or csv. Which one wou

Re: EuroPython 2017: Free Intel Distribution for Python

2017-07-05 Thread Grant Edwards
On 2017-07-04, MRAB wrote: > On 2017-07-04 23:05, Terry Reedy wrote: >> On 7/4/2017 10:22 AM, M.-A. Lemburg wrote: >> >>> http://blog.europython.eu/post/162590522362/europython-2017-free-intel-distribution-for >> >> I looked but did not find the most important thing. >> What version of Python? >>

Re: Python threading and sharing variables

2017-07-05 Thread eryk sun
On Wed, Jul 5, 2017 at 12:14 PM, Peter Otten <__pete...@web.de> wrote: > Chris Angelico wrote: > >> You can be confident that a single assignment will happen atomically. >> Even if "self.cnt = i" requires multiple instructions to perform > > For name binding > > cnt = i > > maybe, but > > self.cnt

Re: School Management System in Python

2017-07-05 Thread YOUR_NAME_HERE
On Wed, 5 Jul 2017 15:28:51 +0200, Thomas Nyberg wrote: > On 07/05/2017 03:18 PM, YOUR_NAME_HERE wrote: > > On Wed, 5 Jul 2017 13:02:36 + (UTC) YOUR_NAME_HERE wrote: > >> I can use either tsv or csv. Which one would be better? > > > > > > Some people complain that tsv has problems, so maybe c

Re: School Management System in Python

2017-07-05 Thread Sam Chats
On Wednesday, July 5, 2017 at 6:56:06 PM UTC+5:30, Thomas Nyberg wrote: > On 07/05/2017 03:18 PM, YOUR_NAME_HERE wrote: > > On Wed, 5 Jul 2017 13:02:36 + (UTC) YOUR_NAME_HERE wrote: > >> I can use either tsv or csv. Which one would be better? > > > > > > Some people complain that tsv has prob

Re: School Management System in Python

2017-07-05 Thread Thomas Nyberg
On 07/05/2017 02:56 PM, Tim Golden wrote: > There's been some discussion recently on the Computing At School forums > here in the UK where at least one teacher explained that they taught > pickle in the way it's being used here essentially because it's really > simple: you just through your object

Re: School Management System in Python

2017-07-05 Thread Thomas Nyberg
On 07/05/2017 03:18 PM, YOUR_NAME_HERE wrote: > On Wed, 5 Jul 2017 13:02:36 + (UTC) YOUR_NAME_HERE wrote: >> I can use either tsv or csv. Which one would be better? > > > Some people complain that tsv has problems, so maybe csv would be the way to > go. > I almost always use csv personally,

Re: School Management System in Python

2017-07-05 Thread YOUR_NAME_HERE
On Wed, 5 Jul 2017 13:02:36 + (UTC) YOUR_NAME_HERE wrote: > I can use either tsv or csv. Which one would be better? Some people complain that tsv has problems, so maybe csv would be the way to go. -- https://mail.python.org/mailman/listinfo/python-list

Re: School Management System in Python

2017-07-05 Thread Tim Golden
On 05/07/2017 13:49, Thomas Nyberg wrote: On 07/05/2017 02:14 PM, Sam Chats wrote: Thanks for your suggestions. I would've not used pickle had I been aware about other tools while developing this. I was thinking about migrating to sqlite3. How about that? And yes, I need more comprehanesive do

Re: Python threading and sharing variables

2017-07-05 Thread Chris Angelico
On Wed, Jul 5, 2017 at 8:40 PM, Rhodri James wrote: > On 05/07/17 09:26, Chris Angelico wrote: >> >> On Wed, Jul 5, 2017 at 5:56 PM, pozz wrote: >>> >>> It seems it works, but I'm not sure it is the correct way to share the >>> variable self.cnt. It is only written in the long thread and only rea

Re: School Management System in Python

2017-07-05 Thread YOUR_NAME_HERE
I can use either tsv or csv. Which one would be better? -- https://mail.python.org/mailman/listinfo/python-list

Re: Python threading and sharing variables

2017-07-05 Thread Chris Angelico
On Wed, Jul 5, 2017 at 10:14 PM, Peter Otten <__pete...@web.de> wrote: > Chris Angelico wrote: > >> You can be confident that a single assignment will happen atomically. >> Even if "self.cnt = i" requires multiple instructions to perform > > For name binding > > cnt = i > > maybe, but > > self.cnt

Re: School Management System in Python

2017-07-05 Thread Thomas Nyberg
On 07/05/2017 02:14 PM, Sam Chats wrote: > Thanks for your suggestions. I would've not used pickle had I been aware > about other tools while developing this. > I was thinking about migrating to sqlite3. How about that? And yes, I need > more comprehanesive documentation. > Will work on that soon

Re: School Management System in Python

2017-07-05 Thread YOUR_NAME_HERE
Thanks for your suggestions. I would've not used pickle had I been aware about other tools while developing this. I was thinking about migrating to sqlite3. How about that? And yes, I need more comprehanesive documentation. Will work on that soon. Thanks, Sam Chats -- https://mail.python.or

Re: School Management System in Python

2017-07-05 Thread Sam Chats
Thanks for your suggestions. I would've not used pickle had I been aware about other tools while developing this. I was thinking about migrating to sqlite3. How about that? And yes, I need more comprehanesive documentation. Will work on that soon. Thanks, Sam Chats -- https://mail.python.org/ma

Re: Python threading and sharing variables

2017-07-05 Thread Peter Otten
Chris Angelico wrote: > You can be confident that a single assignment will happen atomically. > Even if "self.cnt = i" requires multiple instructions to perform For name binding cnt = i maybe, but self.cnt = i can execute arbitrary Python code (think __setattr__()). With threads I'd rather p

Re: School Management System in Python

2017-07-05 Thread Sam Chats
Check message Sorry for this message. Sam -- https://mail.python.org/mailman/listinfo/python-list

Re: School Management System in Python

2017-07-05 Thread Thomas Nyberg
On 07/05/2017 01:31 PM, Sam Chats wrote: > Feel free to comment on my high school project. I really enjoyed building it > and it is the biggest project I've developed so far > (in terms of lines of code). All you need to do is to run the S-Koo-L.py > script. > > I've built more eye-catchy things

School Management System in Python

2017-07-05 Thread Sam Chats
Feel free to comment on my high school project. I really enjoyed building it and it is the biggest project I've developed so far (in terms of lines of code). All you need to do is to run the S-Koo-L.py script. I've built more eye-catchy things with less code (see my other repos), but this does a

Re: Python threading and sharing variables

2017-07-05 Thread Rhodri James
On 05/07/17 09:26, Chris Angelico wrote: On Wed, Jul 5, 2017 at 5:56 PM, pozz wrote: It seems it works, but I'm not sure it is the correct way to share the variable self.cnt. It is only written in the long thread and only read in the main thread. Could a single Python instruction be interrupted

Re: Generator - Provide parameters to url - requests

2017-07-05 Thread Peter Otten
Sayth Renshaw wrote: > Thanks. > > I left "base" out as i was trying to remove as much uneeded code from > example as possible. I had defined it as > > base = datetime.datetime(2017,1,1) You actually did provide that line in your post. > Reading your code this sounds to simple :-). > > def da

Re: memory leak with re.match

2017-07-05 Thread Peter Otten
Mayling ge wrote: > Sorry. The code here is just to describe the issue and is just pseudo > code, That is the problem with your post. It's too vague for us to make sense of it. Can you provide a minimal example that shows what you think is a "memory leak"? Then we can either help you avo

EuroPython 2017: Beginners’ Day workshop revived

2017-07-05 Thread M.-A. Lemburg
Our Beginners’ Day host Harry Percival cannot attend EuroPython due to personal reasons, but thanks to our brilliant community, we have managed to find trainers who are willing to help out and run the workshop: * Ilian Iliev * Juan Manuel Santos * Petr Viktorin * Lasse Schuirmann * Michał Bul

Re: Python threading and sharing variables

2017-07-05 Thread Chris Angelico
On Wed, Jul 5, 2017 at 6:57 PM, Thomas Nyberg wrote: > On 07/05/2017 10:40 AM, Chris Angelico wrote: >> What would the lock surround? > > Sorry yes I agree with you that no lock is needed in this method. I was > a bit confused by the code and probably was thinking something like "a > += 1" in my h

Re: Generator - Provide parameters to url - requests

2017-07-05 Thread Sayth Renshaw
Thanks. I left "base" out as i was trying to remove as much uneeded code from example as possible. I had defined it as base = datetime.datetime(2017,1,1) Reading your code this sounds to simple :-). def dates(first, numdays): # generate datetime objects for extra clarity # note ther

Re: Python threading and sharing variables

2017-07-05 Thread Thomas Nyberg
On 07/05/2017 10:40 AM, Chris Angelico wrote: > What would the lock surround? Sorry yes I agree with you that no lock is needed in this method. I was a bit confused by the code and probably was thinking something like "a += 1" in my head (even though that's not what he was doing...). Thanks for cl

Re: Python threading and sharing variables

2017-07-05 Thread Thomas Nyberg
On 07/05/2017 10:20 AM, Thomas Nyberg wrote: > [...snip...] Btw I forgot to mention that you'd probably want to use q.get_nowait() instead of q.get() in my code example if you don't want the main thread to block (which what I think you want to avoid from your code example). https://docs.

Re: Python threading and sharing variables

2017-07-05 Thread Chris Angelico
On Wed, Jul 5, 2017 at 6:26 PM, Thomas Nyberg wrote: > I think the general rule would be that no it's not safe to skip the > locks. It's true that with cpython, your method shouldn't run into > problems, but that's just a quirk of how you're using it. I look at from > another perspective, if it's

Re: memory leak with re.match

2017-07-05 Thread Mayling ge
Sorry. The code here is just to describe the issue and is just pseudo code, please forgive some typo. I list out lines because I need line context. Sent from Mail Master On 07/05/2017 15:52, [1]Albert-Jan Roskam wrote: From: Python-list on behalf of Maylin

Re: Python threading and sharing variables

2017-07-05 Thread Chris Angelico
On Wed, Jul 5, 2017 at 5:56 PM, pozz wrote: > It seems it works, but I'm not sure it is the correct way to share the > variable self.cnt. It is only written in the long thread and only read in > the main thread. > Could a single Python instruction be interrupted (in this case, self.cnt = > i)? Sho

Re: Python threading and sharing variables

2017-07-05 Thread Thomas Nyberg
On 07/05/2017 10:05 AM, pozz wrote: > > Ok, maybe this atomic behaviour depends on the Python implementation, so > it's better to avoid relying on atomicity and use a lock to access > shared variables from different running thread. > > However in my simple case one thread writes the variable and

Re: EuroPython 2017: Free Intel Distribution for Python

2017-07-05 Thread M.-A. Lemburg
On 05.07.2017 00:05, Terry Reedy wrote: > On 7/4/2017 10:22 AM, M.-A. Lemburg wrote: >> We are very pleased to have Intel as Diamond Sponsor for EuroPython >> 2017. You can visit them at the most central booth in our exhibit >> area, the Sala della Piazza, and take the opportunity to chat with >> t

Re: Python threading and sharing variables

2017-07-05 Thread Thomas Nyberg
On 07/05/2017 09:56 AM, pozz wrote: > It seems it works, but I'm not sure it is the correct way to share the > variable self.cnt. It is only written in the long thread and only read > in the main thread. > Could a single Python instruction be interrupted (in this case, self.cnt > = i)? Should I use

Re: Python threading and sharing variables

2017-07-05 Thread pozz
Il 05/07/2017 09:56, pozz ha scritto: > [...] It seems it works, but I'm not sure it is the correct way to share the variable self.cnt. It is only written in the long thread and only read in the main thread. Could a single Python instruction be interrupted (in this case, self.cnt = i)? Should I

Python threading and sharing variables

2017-07-05 Thread pozz
I'd like to launch *and control* a long thread. I want to print the progress of the long thread in the main thread. It's a GUI script, here it's a console script only to simplify. import threading import time class MyClass: def start(self): self.max = 5 self.pause = 1

Re: memory leak with re.match

2017-07-05 Thread Albert-Jan Roskam
From: Python-list on behalf of Mayling ge Sent: Tuesday, July 4, 2017 9:01 AM To: python-list Subject: memory leak with re.match      Hi,    My function is in the following way to handle file line by line. There are    multiple error patterns  defined and  need to apply  to each  line. I  us

Re: Generator - Provide parameters to url - requests

2017-07-05 Thread Frank Millman
"Sayth Renshaw" wrote in message news:328f42bb-ba23-4199-9f3a-9ec1829bc...@googlegroups.com... Hi I am struggling to figure out how I can create a generator to provide values to my url. My url needs to insert the year month and day in the url not as params to the url. import json import re

Re: Generator - Provide parameters to url - requests

2017-07-05 Thread Peter Otten
Sayth Renshaw wrote: > Hi > > I am struggling to figure out how I can create a generator to provide > values to my url. My url needs to insert the year month and day in the url > not as params to the url. > > > import json > import requests > import datetime > > # using this I can create a lis

Re: Privy: An easy, fast lib to password-protect your data

2017-07-05 Thread Chris Warrick
On 5 July 2017 at 02:39, wrote: > On Monday, July 3, 2017 at 10:36:39 PM UTC-4, ofekm...@gmail.com wrote: >> https://github.com/ofek/privy > > Bump b/c spam > -- > https://mail.python.org/mailman/listinfo/python-list The person spamming right now would be you. You just posted a link, without any

Re: memory leak with re.match

2017-07-05 Thread Mayling ge
Thanks. I actually comment out all handling code. The loop ends with the re_pat.match and nothing followed. Sent from Mail Master On 07/05/2017 08:31, [1]Cameron Simpson wrote: On 04Jul2017 17:01, Mayling ge wrote: > My function is in the following way to handle file lin