Was: Dynamic Data type assignment

2020-01-29 Thread DL Neil via Python-list
Further thoughts on the OP's point:- On 29/01/20 4:51 PM, sushma ms wrote: ... But why can't we make output of input also dynamic data assignment. ... when i'm assigning value dynamically and when we comparing in "if" loop it is throwing compiler error. It should not throw error

Re: Help on dictionaries...

2020-01-29 Thread Souvik Dutta
How do I connect it with my dictionary On Thu, Jan 30, 2020, 7:03 AM Tim Chase wrote: > On 2020-01-30 06:44, Souvik Dutta wrote: > > Hey I was thinking how I can save a dictionary in python(obviously) > > so that the script is rerun it automatically loads the dictionary. > > This is almost exact

Re: Help on dictionaries...

2020-01-29 Thread MRAB
On 2020-01-30 01:51, Michael Torrie wrote: On 1/29/20 6:14 PM, Souvik Dutta wrote: Hey I was thinking how I can save a dictionary in python(obviously) so that the script is rerun it automatically loads the dictionary. You could use the pickle module for that. See the python.org documentation o

Re: on sorting things

2020-01-29 Thread Cameron Simpson
On 20Dec2019 08:23, Chris Angelico wrote: On Fri, Dec 20, 2019 at 8:06 AM Eli the Bearded <*@eli.users.panix.com> wrote: Consider a sort that first compares file size and if the same number of bytes, then compares file checksum. Any decently scaled real world implementation would memoize the c

Re: Help on dictionaries...

2020-01-29 Thread Souvik Dutta
Thank you all. On Thu, Jan 30, 2020, 7:25 AM DL Neil via Python-list < python-list@python.org> wrote: > On 30/01/20 2:14 PM, Souvik Dutta wrote: > > Hey I was thinking how I can save a dictionary in python(obviously) so > that > > the script is rerun it automatically loads the dictionary. > > > P

Re: PyQt5 QLineEditor help!!!

2020-01-29 Thread Michael Torrie
On 1/29/20 6:11 PM, Souvik Dutta wrote: > Hi guys I just started to learn PyQt5 and was wondering if like kivy we can > delete the text in a textbox after taking the input. That is I want to make > the textbox blank after the text is read. Also can you suggest a way to > connect a cancel button wit

Re: Help on dictionaries...

2020-01-29 Thread Tim Chase
On 2020-01-30 06:44, Souvik Dutta wrote: > Hey I was thinking how I can save a dictionary in python(obviously) > so that the script is rerun it automatically loads the dictionary. This is almost exactly what the "dbm" (nee "anydbm") module does, but persisting the dictionary out to the disk: im

Re: Help on dictionaries...

2020-01-29 Thread DL Neil via Python-list
On 30/01/20 2:14 PM, Souvik Dutta wrote: Hey I was thinking how I can save a dictionary in python(obviously) so that the script is rerun it automatically loads the dictionary. Perhaps a YAML or JSON file (which follow a very similar format and structure to Python dicts), or a 'NoSQL' database

Re: Help on dictionaries...

2020-01-29 Thread Michael Torrie
On 1/29/20 6:14 PM, Souvik Dutta wrote: > Hey I was thinking how I can save a dictionary in python(obviously) so that > the script is rerun it automatically loads the dictionary. You could use the pickle module for that. See the python.org documentation on pickle. Alternatively you could use a js

Help on dictionaries...

2020-01-29 Thread Souvik Dutta
Hey I was thinking how I can save a dictionary in python(obviously) so that the script is rerun it automatically loads the dictionary. -- https://mail.python.org/mailman/listinfo/python-list

PyQt5 QLineEditor help!!!

2020-01-29 Thread Souvik Dutta
Hi guys I just started to learn PyQt5 and was wondering if like kivy we can delete the text in a textbox after taking the input. That is I want to make the textbox blank after the text is read. Also can you suggest a way to connect a cancel button with a function so that when the cancel button is c

Re: Suggestions on mechanism or existing code - maintain persistence of file download history

2020-01-29 Thread Chris Angelico
On Thu, Jan 30, 2020 at 8:59 AM DL Neil via Python-list wrote: > * NB I don't use SQLite (in favor of going 'full-fat') and thus cannot > vouch for its behavior under load/queuing mechanism/concurrent > accesses... but I'm biased and probably think/write SQL more readily > than Python - oops! I d

Re: Suggestions on mechanism or existing code - maintain persistence of file download history

2020-01-29 Thread DL Neil via Python-list
On 30/01/20 10:38 AM, jkn wrote: On Wednesday, January 29, 2020 at 8:27:03 PM UTC, Chris Angelico wrote: On Thu, Jan 30, 2020 at 7:06 AM jkn wrote: I want to be a able to use a simple 'download manager' which I was going to write (in Python), but then wondered if there was something suitable

Re: Suggestions on mechanism or existing code - maintain persistence of file download history

2020-01-29 Thread jkn
On Wednesday, January 29, 2020 at 8:27:03 PM UTC, Chris Angelico wrote: > On Thu, Jan 30, 2020 at 7:06 AM jkn wrote: > > > > Hi all > > I'm almost embarrassed to ask this as it's "so simple", but thought I'd > > give > > it a go... > > Hey, nothing wrong with that! > > > I want to be a able

Re: Suggestions on mechanism or existing code - maintain persistence of file download history

2020-01-29 Thread Dan Sommers
On Thu, 30 Jan 2020 07:26:36 +1100 Chris Angelico wrote: > On Thu, Jan 30, 2020 at 7:06 AM jkn wrote: > > The situation is this - I have a long list of file URLs and want to > > download these as a 'background task'. I want this to process to be > > 'crudely persistent' - you can CTRL-C out, an

Re: Suggestions on mechanism or existing code - maintain persistence of file download history

2020-01-29 Thread Chris Angelico
On Thu, Jan 30, 2020 at 7:49 AM MRAB wrote: > > On 2020-01-29 20:00, jkn wrote: > > I could have a file with all the URLs listed and work through each line in > > turn. > > But then I would have to rewrite the file (say, with the > > previously-successful > > lines commented out) as I go. > > >

Re: Suggestions on mechanism or existing code - maintain persistence of file download history

2020-01-29 Thread MRAB
On 2020-01-29 20:00, jkn wrote: Hi all I'm almost embarrassed to ask this as it's "so simple", but thought I'd give it a go... I want to be a able to use a simple 'download manager' which I was going to write (in Python), but then wondered if there was something suitable already out ther

Re: Suggestions on mechanism or existing code - maintain persistence of file download history

2020-01-29 Thread Chris Angelico
On Thu, Jan 30, 2020 at 7:06 AM jkn wrote: > > Hi all > I'm almost embarrassed to ask this as it's "so simple", but thought I'd > give > it a go... Hey, nothing wrong with that! > I want to be a able to use a simple 'download manager' which I was going to > write > (in Python), but then wo

Suggestions on mechanism or existing code - maintain persistence of file download history

2020-01-29 Thread jkn
Hi all I'm almost embarrassed to ask this as it's "so simple", but thought I'd give it a go... I want to be a able to use a simple 'download manager' which I was going to write (in Python), but then wondered if there was something suitable already out there. I haven't found it, but thought p

Re: on sorting things

2020-01-29 Thread Peter Otten
Tony Flury via Python-list wrote: > > On 20/12/2019 18:59, Peter Otten wrote: >> Chris Angelico wrote: >> >>> On Sat, Dec 21, 2019 at 5:03 AM Peter Otten <__pete...@web.de> wrote: PS: If you are sorting files by size and checksum as part of a deduplication effort consider using dict-s i

Re: Python 3.8.1

2020-01-29 Thread Terry Reedy
On 1/29/2020 8:13 AM, J Conrado wrote: I installed the Python3.8.1 in my computer. I have other versions 2.6 and  3.7. When I use 2.6 and 3.7 I didn't have problem with: python2 Python 2.6.6 (r266:84292, Jun 20 2019, 14:14:55) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linux2 Type "help", "co

Python 3.8.1

2020-01-29 Thread J Conrado
Hi, I installed the Python3.8.1 in my computer. I have other versions 2.6 and  3.7. When I use 2.6 and 3.7 I didn't have problem with: python2 Python 2.6.6 (r266:84292, Jun 20 2019, 14:14:55) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linux2 Type "help", "copyright", "credits" or "license"

Re: Is there a character that never appears in the output of zlib.compress?

2020-01-29 Thread Richard Damon
On 1/29/20 12:09 AM, Peng Yu wrote: Hi, I'd like to tell what part is zlib.compress data in an input stream. One way is to use some characters that never appear in zlib.compress output to denote the boundary. Are there such characters? Thanks. A compression routine that avoid one byte value wou

Re: Is there a character that never appears in the output of zlib.compress?

2020-01-29 Thread Cameron Simpson
On 28Jan2020 23:09, Peng Yu wrote: I'd like to tell what part is zlib.compress data in an input stream. One way is to use some characters that never appear in zlib.compress output to denote the boundary. Are there such characters? Thanks. If you mean: is there a byte which never appears, then