Re: Posting warning message

2018-06-15 Thread T Berger
On Monday, June 11, 2018 at 4:32:56 AM UTC-4, Cameron Simpson wrote:

> This is one reason to prefer the mailing list. You can subscribe here:
> 
>   https://mail.python.org/mailman/listinfo/python-list
> 
> Many of us prefer that to Google Groups. You have the advantage that email 
> messages arrive to your GMail directly, instead of to the group. You can 
> easily 
> file messages from the list into its own folder (in GMail, this is called 
> "apply a label").
> 
> Wait for the first message or so and for that message choose GMail's "filter 
> messages like this" action. I like to choose "Apply the label Python" and 
> "Skip 
> the inbox" for such things. Then you'll get a nice little "Python" mail 
> folder 
> in your collection where the list will accumulate. And less spam than the 
> Group.

Sounds great, Cameron. But Gmail doesn't give me the options "Apply the label 
Python" and "Skip the inbox" under "Filter messages like this." I just get the 
generic To, From, Has the words, Doesn't have. 

Tamara 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How can I verify if the regex exist in a file without reading ?

2018-06-15 Thread francois . rabanel
Le vendredi 15 juin 2018 02:42:12 UTC+2, Cameron Simpson a écrit :
> On 15Jun2018 00:24, Steven D'Aprano  
> wrote:
> >On Fri, 15 Jun 2018 10:00:59 +1000, Cameron Simpson wrote:
> >> Francois, unless your regex can cross multiple lines it is better to
> >> search files like this:
> >>
> >>   with open(the_filename) as f:
> >> for line in f:
> >>   ... search the line for the regexp ...
> >>
> >> That way you only need to keep one line at a time in memory.
> >
> >That's what François is doing.
> 
> Urr, so he is. Then like you, I don't know why he's concerned about running 
> out 
> of memory. Unless it hasn't been made clear the Python will free up unused 
> memory on its own.
> 
> Cheers,
> Cameron Simpson 


Thanks you a lot for all your tips ! They helps me a lot :) 
I'm beginner in python, this is an excercise I'm trying to realise.

I gonna read more about exceptions and .splitex() !

I work with a file which contains millions lines, a simply file.read() and I'm 
running out of memory


François
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Posting warning message

2018-06-15 Thread Cameron Simpson

On 14Jun2018 21:09, Tamara Berger  wrote:

On Monday, June 11, 2018 at 4:32:56 AM UTC-4, Cameron Simpson wrote:

This is one reason to prefer the mailing list. You can subscribe here:
  https://mail.python.org/mailman/listinfo/python-list

[...]

Wait for the first message or so and for that message choose GMail's "filter
messages like this" action. I like to choose "Apply the label Python" and "Skip
the inbox" for such things. Then you'll get a nice little "Python" mail folder
in your collection where the list will accumulate. And less spam than the
Group.


Sounds great, Cameron. But Gmail doesn't give me the options "Apply the label 
Python" and "Skip the inbox" under "Filter messages like this." I just get the 
generic To, From, Has the words, Doesn't have.


The first panel with to/from etc is just the message selection panel. It 
probably has the "includes the words" field already filled in with something 
that will match a python-list message. When you click "Create filter with this 
search" you get another panel with what to do with matching messages.


I usually:

- skip the Inbox
- apply the label: click the "Choose label" dropdown and create a new label 
 "python" or whatever suits you
- also apply filter to matching conversations, which will gather up all the 
 list messages that have already arrived and filter them, too


Also note that you don't need a label per list. I file a few mailing lists in 
the same "python" folder.


Alternatively, you might make a label per list; note that you can put a slash 
in a label eg "python/python-list" and GMail will treat that as a hierarchy, 
making a "python" category on the left with "python-list" underneath it. Might 
be handy of you join several lists and want to group them.


Cheers,
Cameron Simpson 
--
https://mail.python.org/mailman/listinfo/python-list


Re: Regex to extract multiple fields in the same line

2018-06-15 Thread Ganesh Pal
>
 {'struct': 'data_block', 'log_file': '/var/1000111/test18.log', 'loc':
> '0', 'size': '8'}
>
>
MARB, as usual the solution you you look nice, Thanks for the excellent
solutions

>>> regex = re.compile (r"--(struct|loc|size|mirror|l
og_file)\s*=\s*([^\s]+)")
>>> regex.findall (line)
[('struct', 'data_block'), ('log_file', '/var/1000111/test18.log'), ('loc',
'0'), ('mirror', '10')]

Frederic  , this look  great, thanks for your response
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How can I verify if the regex exist in a file without reading ?

2018-06-15 Thread Steven D'Aprano
On Fri, 15 Jun 2018 01:01:03 -0700, francois.rabanel wrote:

> I work with a file which contains millions lines, a simply file.read()
> and I'm running out of memory

Assuming each line is on average a hundred characters long, a million 
lines is (approximately) 100 MB. Even on a computer with only 2GB of 
memory, you should be able to read 100 MB.

But you shouldn't: it is much better to process the file line by line.


# Don't do this:
with open(pathname) as f:
text = f.read()  # Slurp the entire file into memory at once.
...

# Do this instead
with open(pathname) as f:
for line in f:
# process one line at a time


You said you are running out of memory, earlier you said the computer was 
crashing... please describe exactly what happens. If you get a Traceback, 
copy and paste the entire message.

(Not just the last line.)




-- 
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson

-- 
https://mail.python.org/mailman/listinfo/python-list


text mining

2018-06-15 Thread mohan shanker
anotology using text mining in python pls any one one described fo me
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How can I verify if the regex exist in a file without reading ?

2018-06-15 Thread francois . rabanel
Le vendredi 15 juin 2018 12:36:40 UTC+2, Steven D'Aprano a écrit :
> On Fri, 15 Jun 2018 01:01:03 -0700, francois.rabanel wrote:
> 
> > I work with a file which contains millions lines, a simply file.read()
> > and I'm running out of memory
> 
> Assuming each line is on average a hundred characters long, a million 
> lines is (approximately) 100 MB. Even on a computer with only 2GB of 
> memory, you should be able to read 100 MB.
> 
> But you shouldn't: it is much better to process the file line by line.
> 
> 
> # Don't do this:
> with open(pathname) as f:
> text = f.read()  # Slurp the entire file into memory at once.
> ...
> 
> # Do this instead
> with open(pathname) as f:
> for line in f:
> # process one line at a time
> 
> 
> You said you are running out of memory, earlier you said the computer was 
> crashing... please describe exactly what happens. If you get a Traceback, 
> copy and paste the entire message.
> 
> (Not just the last line.)
> 
> 
> 
> 
> -- 
> Steven D'Aprano
> "Ever since I learned about confirmation bias, I've been seeing
> it everywhere." -- Jon Ronson

I resolve my problem and when I look to my solution I don't understand why I 
didn't do it earlier :)


with open(path) as file:
  result = []
  for line in file:
find_regex  = re.search(regex,line)
if find_regex:
  result.append(find_regex.group())
  if len(result) == 0:
sys.exit('Regex not found')
  elif result[0] == '':
sys.exit('Whitespace as regex don\'t work')


I was looking for a way to check if the regex's user was correct or not
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: text mining

2018-06-15 Thread Steven D'Aprano
On Fri, 15 Jun 2018 05:23:17 -0700, mohan shanker wrote:

> anotology using text mining in python pls any one one described fo me

fi u cant b bothed to rite prper sentences y shld we be bothered to anwsr 
ur qestion


Seriously, you are asking strangers to help you out of the goodness of 
their heart. If your intention was to send the message that you're lazy, 
drunk, or just don't give a damn about the question, you were successful.



-- 
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Django-hotsauce 1.0 LTS (Commercial Edition) now available for preorder!!

2018-06-15 Thread Etienne Robillard



Le 2018-06-14 à 12:58, Jim Lee a écrit :



On 06/13/2018 11:38 PM, Chris Angelico wrote:

On Thu, Jun 14, 2018 at 11:07 AM, Jim Lee  wrote:
I haven't purchased commercial software in decades, so I'm not up on 
the

prevailing business model, but I have to ask:

Why would anyone purchase software and then agree to wait 14 weeks 
for it to
be delivered?  I can see that model for hardware, where material 
resources

are limited and a finite number of product is produced, but software?
What's the point?


For the 50% discount, I presume. If you wait 14 weeks, then buy, then
own, you pay full price.

 From the company's point of view: if the release date is in the future
and ALL the revenue is also in the future, cash flow becomes tricky.
By getting at least _some_ money in advance, they give themselves a
way to pay the bills.

ChrisA
But the "50% discount" is supposedly good up until the release date.  
I could purchase the software the day before release and still enjoy 
the same benefit without the 14 week wait.


I understand the advantages *to the company*, but to enjoy those 
advantages, they need to provide some kind of incentive to the buyer.  
I don't see one here.  Anyway, I was just curious to see if there was 
any kind of thought process behind the "promotion".


-Jim



Thought process?

I believe the current strategy I have in mind is to let any potential 
new customers to take the time needed to consider seriously 
Django-hotsauce for their commercial web applications.


This includes allowing some time for peoples (developers) to at least 
try the free version and then possibly consider switching to the LTS 
version for extended support and troubleshooting.


Anyways, thank you for your input! :)

Etienne

--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
https://mail.python.org/mailman/listinfo/python-list


Re: Regex to extract multiple fields in the same line

2018-06-15 Thread Nathan Hilterbrand
On Wed, Jun 13, 2018 at 4:08 AM, Ganesh Pal  wrote:

>  Hi Team,
>
> I wanted to parse a file and extract few feilds that are present after "="
> in a text file .
>
>
> Example , form  the below line I need to extract the values present after
> --struct =, --loc=, --size= and --log_file=
>
> Sample input
>
> line = '06/12/2018 11:13:23 AM python toolname.py  --struct=data_block
> --log_file=/var/1000111/test18.log --addr=None --loc=0 --mirror=10
> --path=/tmp/data_block.txt size=8'
>
>
> Expected output
>
> data_block
> /var/1000111/test18.log
> 0
> 8
>
>
> Here is my sample code , its still not complete ,  I wanted to use regex
> and find and extract all the fields after " =", any suggestion or
> alternative way to optimize this further
>
>
> import re
> line = '06/12/2018 11:13:23 AM python toolname.py  --struct=data_block
> --log_file=/var/1000111/test18.log --addr=None --loc=0 --mirror=10
> --path=/tmp/data_block.txt size=8'
>
> r_loc = r"--loc=(\d+)"
> r_struct = r'--struct=(\w+)'
>
> if re.findall(r_loc, line):
>print re.findall(r_loc, line)
>
> if re.findall(r_struct, line):
>print re.findall(r_struct, line)
>
>
> root@X1:/# python regex_02.py
> ['0']
> ['data_block']
>
>
> I am a  Linux  user with python 2.7
>
>
> Regards,
> Ganesh
>

---

Ooops...  I didn't notice the 'python 2.7' part until after I had coded up
something.  This solution could probably be squeezed to work with Python 2
somehow, though

I am actually a perl guy, and I love regex... in perl.  I do tend to avoid
it if all possible in Python, though.  I pieced together an ugly function
to do what you want.  It avoids naming the arguments, so if a new argument
is added to your records, it should handle it with no changes.  In python,
I love comprehensions almost as much as I love regex in perl.

Anyway, here is my n00bish stab at it:

#!/usr/bin/python3

line = '06/12/2018 11:13:23 AM python toolname.py  --struct=data_block
--log_file=/var/1000111/test18.log --addr=None --loc=0 --mirror=10
--path=/tmp/data_block.txt size=8'

def get_args(lne):

first_hyphens = lne.find('--')# find where the args start
if first_hyphens == -1:# Blow up if ill-formed arg
raise ValueError("Invalid input line")
prelude = lne[0:first_hyphens]  # Get the stuff before the args
prelude = prelude.strip()
args = lne[first_hyphens:]  # Get the arguments
#  The following line uses comprehensions to build a dictionary of
#  argument/value pairs.  The arguments portion is split on whitespace,
#  then each --XX=YY pair is split by '=' into a two element list,  Each
#  two element list then provides the key and value for each argument.
#  Note the 'd[0][2:]' strips the '--' from the front of the argument
#  name
argdict = {d[0][2:]:d[1] for d in [e.split('=')[0:2] for e in
args.split()]}
return (prelude, argdict)

if __name__ == "__main__":
pre, argdict = get_args(line)
print('Prelude is "{}"'.format(pre))
for arg in argdict:
print('  Argument {} = {}'.format(arg, argdict[arg]))



> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Regex to extract multiple fields in the same line

2018-06-15 Thread Friedrich Rentsch



On 06/15/2018 12:37 PM, Ganesh Pal wrote:

Hey Friedrich,

The proposed solution worked nice , Thank you for  the reply really
appreciate that


Only thing I think would need a review is   if the assignment of the value
of one dictionary to the another dictionary  if is done correctly ( lines
17 to 25 in the below code)


Here is my code :

root@X1:/Play_ground/SPECIAL_TYPES/REGEX# vim Friedrich.py
   1 import re
   2 from collections import OrderedDict
   3
   4 keys = ["struct", "loc", "size", "mirror",
   5 "filename","final_results"]
   6
   7 stats =  OrderedDict.fromkeys(keys)
   8
   9
  10 line = '06/12/2018 11:13:23 AM python toolname.py  --struct=data_block
--log_file=/var/1000111/test18.log --addr=None --loc=0 --mirror=10
--path=/tmp/data_block.txt --size=8'
  11
  12 regex = re.compile (r"--(struct|loc|size|mirror|
log_file)\s*=\s*([^\s]+)")
  13 result = dict(re.findall(regex, line))
  14 print result
  15
  16 if result['log_file']:
  17stats['filename'] = result['log_file']
  18 if result['struct']:
  19stats['struct'] = result['struct']
  20 if result['size']:
  21stats['size'] = result['size']
  22 if result['loc']:
  23stats['loc'] = result['loc']
  24 if result['mirror']:
  25stats['mirror'] = result['mirror']
  26
  27 print stats
  28
Looks okay to me. If you'd read 'result' using 'get' you wouldn't need 
to test for the key. 'stats' would then have all keys and value None for 
keys missing in 'result':


stats['filename'] = result.get ('log_file')
stats['struct']   = result.get ('struct')

This may or may not suit your purpose.


Also, I think  the regex can just be
(r"--(struct|loc|size|mirror|log_file)=([^\s]+)")
no need to match white space character (\s* )  before and after the =
symbol because this would never happen ( this line is actually a key=value
pair of a dictionary getting logged)

You are right. I thought your sample line had a space in one of the 
groups and didn't reread to verify, letting the false impression take 
hold. Sorry about that.


Frederic



Regards,
Ganesh






On Fri, Jun 15, 2018 at 12:53 PM, Friedrich Rentsch <
anthra.nor...@bluewin.ch> wrote:


Hi Ganesch. Having proposed a solution to your problem, it would be kind
of you to let me know whether it has helped. In case you missed my
response, I repeat it:


regex = re.compile (r"--(struct|loc|size|mirror|l

og_file)\s*=\s*([^\s]+)")

regex.findall (line)

[('struct', 'data_block'), ('log_file', '/var/1000111/test18.log'),
('loc', '0'), ('mirror', '10')]

Frederic


On 06/13/2018 07:32 PM, Ganesh Pal wrote:


On Wed, Jun 13, 2018 at 5:59 PM, Rhodri James 
wrote:

On 13/06/18 09:08, Ganesh Pal wrote:

Hi Team,

I wanted to parse a file and extract few feilds that are present after
"="
in a text file .


Example , form  the below line I need to extract the values present
after
--struct =, --loc=, --size= and --log_file=

Sample input

line = '06/12/2018 11:13:23 AM python toolname.py  --struct=data_block
--log_file=/var/1000111/test18.log --addr=None --loc=0 --mirror=10
--path=/tmp/data_block.txt size=8'

Did you mean "--size=8" at the end?  That's what your explanation

implied.




Yes James you got it right ,  I  meant  "--size=8 " .,


Hi Team,


I played further with python's re.findall()  and  I am able to extract all
the required  fields , I have 2 further questions too , please suggest


Question 1:

   Please let me know  the mistakes in the below code and  suggest if it
can
be optimized further with better regex


# This code has to extract various the fields  from a single line (
assuming the line is matched here ) of a log file that contains various
values (and then store the extracted values in a dictionary )

import re

line = '06/12/2018 11:13:23 AM python toolname.py  --struct=data_block
--log_file=/var/1000111/test18.log --addr=None --loc=0 --mirror=10
--path=/tmp/data_block.txt --size=8'

#loc is an number
r_loc = r"--loc=([0-9]+)"
r_size = r'--size=([0-9]+)'
r_struct = r'--struct=([A-Za-z_]+)'
r_log_file = r'--log_file=([A-Za-z0-9_/.]+)'


if re.findall(r_loc, line):
 print re.findall(r_loc, line)

if re.findall(r_size, line):
 print re.findall(r_size, line)

if re.findall(r_struct, line):
 print re.findall(r_struct, line)

if re.findall(r_log_file, line):
 print re.findall(r_log_file, line)


o/p:
root@X1:/Play_ground/SPECIAL_TYPES/REGEX# python regex_002.py
['0']
['8']
['data_block']
['/var/1000111/test18.log']


Question 2:

I  tried to see if I can use  re.search with look behind assertion , it
seems to work , any comments or suggestions

Example:

import re

line = '06/12/2018 11:13:23 AM python toolname.py  --struct=data_block
--log_file=/var/1000111/test18.log --addr=None --loc=0 --mirror=10
--path=/tmp/data_block.txt --size=8'

match = re.search(r'(?P(?<=--loc=)([0-9]+))', line)
if match:
 print match.group('loc')


o/p: root@X1:/Play_ground/SPECIAL_TYPES/REGEX# python regex_002.py

0


I  want to build  the sub patterns

Re: Posting warning message

2018-06-15 Thread Tamara Berger
Cameron,

I DON'T HAVE the options "skip the inbox" and "apply the label." Not
within the option "filter messages like this," which is where I
understood you to say they were, or outside that option. Does Gmail
have these options?

Tamara
On Fri, Jun 15, 2018 at 4:17 AM Cameron Simpson  wrote:
>
> On 14Jun2018 21:09, Tamara Berger  wrote:
> >On Monday, June 11, 2018 at 4:32:56 AM UTC-4, Cameron Simpson wrote:
> >> This is one reason to prefer the mailing list. You can subscribe here:
> >>   https://mail.python.org/mailman/listinfo/python-list
> [...]
> >> Wait for the first message or so and for that message choose GMail's 
> >> "filter
> >> messages like this" action. I like to choose "Apply the label Python" and 
> >> "Skip
> >> the inbox" for such things. Then you'll get a nice little "Python" mail 
> >> folder
> >> in your collection where the list will accumulate. And less spam than the
> >> Group.
> >
> >Sounds great, Cameron. But Gmail doesn't give me the options "Apply the label
> >Python" and "Skip the inbox" under "Filter messages like this." I just get 
> >the
> >generic To, From, Has the words, Doesn't have.
>
> The first panel with to/from etc is just the message selection panel. It
> probably has the "includes the words" field already filled in with something
> that will match a python-list message. When you click "Create filter with this
> search" you get another panel with what to do with matching messages.
>
> I usually:
>
> - skip the Inbox
> - apply the label: click the "Choose label" dropdown and create a new label
>   "python" or whatever suits you
> - also apply filter to matching conversations, which will gather up all the
>   list messages that have already arrived and filter them, too
>
> Also note that you don't need a label per list. I file a few mailing lists in
> the same "python" folder.
>
> Alternatively, you might make a label per list; note that you can put a slash
> in a label eg "python/python-list" and GMail will treat that as a hierarchy,
> making a "python" category on the left with "python-list" underneath it. Might
> be handy of you join several lists and want to group them.
>
> Cheers,
> Cameron Simpson 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Posting warning message

2018-06-15 Thread Tamara Berger
Hi Cameron,

Please ignore my last email. I found those two options AFTER I created
the filter. I expected them to be on the "filter messages like this"
panel.

Tamara  > On 14Jun2018 21:09, Tamara Berger  wrote:
> >On Monday, June 11, 2018 at 4:32:56 AM UTC-4, Cameron Simpson wrote:
> >> This is one reason to prefer the mailing list. You can subscribe here:
> >>   https://mail.python.org/mailman/listinfo/python-list
> [...]
> >> Wait for the first message or so and for that message choose GMail's 
> >> "filter
> >> messages like this" action. I like to choose "Apply the label Python" and 
> >> "Skip
> >> the inbox" for such things. Then you'll get a nice little "Python" mail 
> >> folder
> >> in your collection where the list will accumulate. And less spam than the
> >> Group.
> >
> >Sounds great, Cameron. But Gmail doesn't give me the options "Apply the label
> >Python" and "Skip the inbox" under "Filter messages like this." I just get 
> >the
> >generic To, From, Has the words, Doesn't have.
>
> The first panel with to/from etc is just the message selection panel. It
> probably has the "includes the words" field already filled in with something
> that will match a python-list message. When you click "Create filter with this
> search" you get another panel with what to do with matching messages.
>
> I usually:
>
> - skip the Inbox
> - apply the label: click the "Choose label" dropdown and create a new label
>   "python" or whatever suits you
> - also apply filter to matching conversations, which will gather up all the
>   list messages that have already arrived and filter them, too
>
> Also note that you don't need a label per list. I file a few mailing lists in
> the same "python" folder.
>
> Alternatively, you might make a label per list; note that you can put a slash
> in a label eg "python/python-list" and GMail will treat that as a hierarchy,
> making a "python" category on the left with "python-list" underneath it. Might
> be handy of you join several lists and want to group them.
>
> Cheers,
> Cameron Simpson 
-- 
https://mail.python.org/mailman/listinfo/python-list


Flask failure

2018-06-15 Thread T Berger
I’m trying to build a webapp with flask. I installed flask, created a webapp in 
IDLE, but when I tried testing it at my terminal, I got a huge error message. 
This is the app:

from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello() -> str:
    return 'Hello world from Flask!'
app.run()

This is my command and the resulting error message, containing a warning in red:

Last login: Thu Jun 14 23:54:55 on ttys000
192:~ TamaraB$ cd Desktop/Webapp/
192:Webapp TamaraB$ python3 hello_flask.py
 * Serving Flask app "hello_flask" (lazy loading)
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: off
Traceback (most recent call last):
  File "hello_flask.py", line 6, in 
    app.run()
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/app.py",
line 943, in run
    run_simple(host, port, self, **options)
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/werkzeug/serving.py",
line 814, in run_simple
    inner()
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/werkzeug/serving.py",
line 774, in inner
    fd=fd)
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/werkzeug/serving.py",
line 660, in make_server
    passthrough_errors, ssl_context, fd=fd)
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/werkzeug/serving.py",
line 577, in __init__
    self.address_family), handler)
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socketserver.py",
line 453, in __init__
    self.server_bind()
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/server.py",
line 136, in server_bind
    socketserver.TCPServer.server_bind(self)
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socketserver.py",
line 467, in server_bind
    self.socket.bind(self.server_address)
OSError: [Errno 48] Address already in use
192:Webapp TamaraB$

What went wrong?
-- 
https://mail.python.org/mailman/listinfo/python-list


Python list vs google group

2018-06-15 Thread T Berger
I'm suspecting that posting to python google groups (this site) gets more 
responses than mailing to the python list. Am I correct? Also, contrary to what 
I read on the python list information sheet, what shows up in this forum does 
not match what comes into my inbox. I started a post here and then replied to a 
post from my inbox. That reply does not show up in this forum. 

Tamara
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Alister via Python-list
On Fri, 15 Jun 2018 08:28:38 -0700, T Berger wrote:

> I'm suspecting that posting to python google groups (this site) gets
> more responses than mailing to the python list. Am I correct? Also,
> contrary to what I read on the python list information sheet, what shows
> up in this forum does not match what comes into my inbox. I started a
> post here and then replied to a post from my inbox. That reply does not
> show up in this forum.
> 
> Tamara

it certainly seems to be the source of most SPAM
as such some users of this list/newsgroup call it what you like block all 
posts from google groups



-- 
One day I'll be dead and THEN you'll all be sorry.
(alt.fan.pratchett)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread T Berger
On Friday, June 15, 2018 at 11:31:47 AM UTC-4, Alister wrote:

> it certainly seems to be the source of most SPAM
> as such some users of this list/newsgroup call it what you like block all 
> posts from google groups

But you don't think you get more replies to a question posted here than emailed 
to the list? The forum and the email list are supposed to be different access 
routes to the same content, but I don't find that to be the case. I replied to 
a post via email, but my reply did not show up on this forum.

Tamara
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Chris Angelico
On Sat, Jun 16, 2018 at 1:47 AM, T Berger  wrote:
> On Friday, June 15, 2018 at 11:31:47 AM UTC-4, Alister wrote:
>
>> it certainly seems to be the source of most SPAM
>> as such some users of this list/newsgroup call it what you like block all
>> posts from google groups
>
> But you don't think you get more replies to a question posted here than 
> emailed to the list? The forum and the email list are supposed to be 
> different access routes to the same content, but I don't find that to be the 
> case. I replied to a post via email, but my reply did not show up on this 
> forum.
>

Is "more replies" your best criterion? I posted something to a much
smaller mailing list and got several HUNDRED replies. In fact, that's
happened to me multiple times, with multiple different lists. Perhaps
quantity is not the important thing here.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Rich Shepard

On Fri, 15 Jun 2018, T Berger wrote:


I'm suspecting that posting to python google groups (this site) gets more
responses than mailing to the python list. Am I correct? Also, contrary to
what I read on the python list information sheet, what shows up in this
forum does not match what comes into my inbox. I started a post here and
then replied to a post from my inbox. That reply does not show up in this
forum.


Tamara,

  That's not been my experiences. I subscribe to a few mail lists that are
mirrored on googlegroups.com. My preference is to have messages pushed to me
by the mail list manager rather than my using the browser to go to
googlegroups and pull threads. YMMV.

  Anyway, I've not had any threads, including ones I start, not appear in my
mail reader. I've not had a response posted to google groups that did not
also appear in my mailbox. Perhaps your experience has something to do with
your MUA.

Regards,

Rich
--
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Mark Lawrence

On 15/06/18 16:47, T Berger wrote:

On Friday, June 15, 2018 at 11:31:47 AM UTC-4, Alister wrote:


it certainly seems to be the source of most SPAM
as such some users of this list/newsgroup call it what you like block all
posts from google groups


But you don't think you get more replies to a question posted here than emailed 
to the list? The forum and the email list are supposed to be different access 
routes to the same content, but I don't find that to be the case. I replied to 
a post via email, but my reply did not show up on this forum.

Tamara



For the third and final time, just get a (semi-)decent email client/news 
reader/whatever it's called, point it at news.gmane.org and read this 
forum, hundreds of other python forums and thousands of other technical 
forums with no problems at all.  No cluttered inbox so no need to filter 
anything.  I happen to use thunderbird, there are umpteen other choices.


--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread T Berger
On Friday, June 15, 2018 at 12:14:30 PM UTC-4, Mark Lawrence wrote:
> On 15/06/18 16:47, T Berger wrote:
> > On Friday, June 15, 2018 at 11:31:47 AM UTC-4, Alister wrote:
> > 
> >> it certainly seems to be the source of most SPAM
> >> as such some users of this list/newsgroup call it what you like block all
> >> posts from google groups
> > 
> > But you don't think you get more replies to a question posted here than 
> > emailed to the list? The forum and the email list are supposed to be 
> > different access routes to the same content, but I don't find that to be 
> > the case. I replied to a post via email, but my reply did not show up on 
> > this forum.
> > 
> > Tamara
> > 
> 
> For the third and final time, just get a (semi-)decent email client/news 
> reader/whatever it's called, point it at news.gmane.org and read this 
> forum, hundreds of other python forums and thousands of other technical 
> forums with no problems at all.  No cluttered inbox so no need to filter 
> anything.  I happen to use thunderbird, there are umpteen other choices.
> 
> -- 
> My fellow Pythonistas, ask not what our language can do for you, ask
> what you can do for our language.
> 
> Mark Lawrence

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread T Berger
On Friday, June 15, 2018 at 11:55:59 AM UTC-4, Chris Angelico wrote:
> Perhaps quantity is not the important thing here.

It is the important thing. I'm stuck with a problem and still waiting for 
replies to my email. I've decided to repost my problem here, so we'll see 
whether my hypothesis holds water.

Tamara
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread T Berger
On Friday, June 15, 2018 at 12:14:30 PM UTC-4, Mark Lawrence wrote:

> For the third and final time, just get a (semi-)decent email client/news 
> reader/whatever it's called, point it at news.gmane.org and read this 
> forum, hundreds of other python forums and thousands of other technical 
> forums with no problems at all.  No cluttered inbox so no need to filter 
> anything.  I happen to use thunderbird, there are umpteen other choices.

To do this, I will have to research what you mean by "a (semi-)decent email 
client/news reader," and "point it at news.gmane.org." I'm a little unused to 
web-related lingo. Then I'll have to root around in gmane.org to see how it 
works. This is not to say that I might not try this route, only that it will 
take a bit of time and effort. I just set some filters on the incoming python 
email, and will see how it works first. But thanks for your thrice-proffered 
suggestion.

Tamara
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread C W
I recently posted two questions, but never got any replies. I am still
wondering if it was ever posted, or maybe the question was too trivial?

I think someone would have at least shouted if it was too trivial or
off-topic, right?

On Fri, Jun 15, 2018 at 12:03 PM, Mark Lawrence 
wrote:

> On 15/06/18 16:47, T Berger wrote:
>
>> On Friday, June 15, 2018 at 11:31:47 AM UTC-4, Alister wrote:
>>
>> it certainly seems to be the source of most SPAM
>>> as such some users of this list/newsgroup call it what you like block all
>>> posts from google groups
>>>
>>
>> But you don't think you get more replies to a question posted here than
>> emailed to the list? The forum and the email list are supposed to be
>> different access routes to the same content, but I don't find that to be
>> the case. I replied to a post via email, but my reply did not show up on
>> this forum.
>>
>> Tamara
>>
>>
> For the third and final time, just get a (semi-)decent email client/news
> reader/whatever it's called, point it at news.gmane.org and read this
> forum, hundreds of other python forums and thousands of other technical
> forums with no problems at all.  No cluttered inbox so no need to filter
> anything.  I happen to use thunderbird, there are umpteen other choices.
>
> --
> My fellow Pythonistas, ask not what our language can do for you, ask
> what you can do for our language.
>
> Mark Lawrence
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread T Berger
Hi Rich,

Please define YMMV, MUA.

Thanks,

Tamara
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread T Berger
On Friday, June 15, 2018 at 12:32:17 PM UTC-4, T Berger wrote:
> On Friday, June 15, 2018 at 11:55:59 AM UTC-4, Chris Angelico wrote:
> > Perhaps quantity is not the important thing here.
> 
> It is the important thing. I'm stuck with a problem and still waiting for 
> replies to my email. I've decided to repost my problem here, so we'll see 
> whether my hypothesis holds water.
> 
> Tamara

If anyone wants to take a stab at my problem, its subject line is "Flask 
Failure."

Thanks,

Tamara 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Rich Shepard

On Fri, 15 Jun 2018, T Berger wrote:


If anyone wants to take a stab at my problem, its subject line is "Flask
Failure."


Tamara,

  I saw that earlier this morning -- on the mail list. As I know nothing
about flask I deleted it without reading.

Rich
--
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Rich Shepard

On Fri, 15 Jun 2018, T Berger wrote:


To do this, I will have to research what you mean by "a (semi-)decent
email client/news reader," and "point it at news.gmane.org." I'm a little
unused to web-related lingo. Then I'll have to root around in gmane.org to
see how it works. This is not to say that I might not try this route, only
that it will take a bit of time and effort. I just set some filters on the
incoming python email, and will see how it works first. But thanks for
your thrice-proffered suggestion.


  What OS do you run? I know folks with gmail accounts who follow newsgroups
using firefox, chromium, and thunderbird. I use alpine (which is text-based
since e-mail messages are text it's a perfect fit) on Slackware linux.

Rich
--
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Larry Martell
On Fri, Jun 15, 2018 at 12:49 PM T Berger  wrote:

> On Friday, June 15, 2018 at 12:32:17 PM UTC-4, T Berger wrote:
> > On Friday, June 15, 2018 at 11:55:59 AM UTC-4, Chris Angelico wrote:
> > > Perhaps quantity is not the important thing here.
> >
> > It is the important thing. I'm stuck with a problem and still waiting
> for replies to my email. I've decided to repost my problem here, so we'll
> see whether my hypothesis holds water.
> >
> > Tamara
>
> If anyone wants to take a stab at my problem, its subject line is "Flask
> Failure."


There is a flask ML

http://flask.pocoo.org/mailinglist/


>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Rich Shepard

On Fri, 15 Jun 2018, C W wrote:


I think someone would have at least shouted if it was too trivial or
off-topic, right?


  Nope. Most of us do not reply if we have insufficient knowledge to offer a
usable response. Saves bandwidth and electrons. When you get no replies it
usually indicates no one knows how to help. Happens quite a bit.

Rich
--
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Rich Shepard

On Fri, 15 Jun 2018, T Berger wrote:


Please define YMMV, MUA.


Tamara,

  Your Milage May Vary.

  Here's a list when you have the time and inclination:
.

Best regards,

Rich
--
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread MRAB

On 2018-06-15 17:40, T Berger wrote:

Hi Rich,

Please define YMMV, MUA.


YMMVYour Mileage May Vary
MUA Mail User Agent (email program)
--
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Rich Shepard

On Fri, 15 Jun 2018, T Berger wrote:


Please define YMMV, MUA.


  Oh, ... MUA == Mail User Agent. This is the client we use to read and
write e-mail messages. Other mail-related abbreviations are MTA (Mail
Transfer Agent, used to sort incoming messages to subject-related files),
MTA (Mail Transport Agent, such as postfix, exim, and qmail which sends and
receives messages).

Rich
--
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Larry Martell
On Fri, Jun 15, 2018 at 1:14 PM Rich Shepard 
wrote:

> On Fri, 15 Jun 2018, T Berger wrote:
>
> > Please define YMMV, MUA.
>
>Oh, ... MUA == Mail User Agent.


I thought it was Made Up Acronym

>
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Flask failure

2018-06-15 Thread Elismar Luz
 Address already in use!

On Fri, Jun 15, 2018 at 12:19 PM, T Berger  wrote:

> I’m trying to build a webapp with flask. I installed flask, created a
> webapp in IDLE, but when I tried testing it at my terminal, I got a huge
> error message. This is the app:
>
> from flask import Flask
> app = Flask(__name__)
> @app.route('/')
> def hello() -> str:
> return 'Hello world from Flask!'
> app.run()
>
> This is my command and the resulting error message, containing a warning
> in red:
>
> Last login: Thu Jun 14 23:54:55 on ttys000
> 192:~ TamaraB$ cd Desktop/Webapp/
> 192:Webapp TamaraB$ python3 hello_flask.py
>  * Serving Flask app "hello_flask" (lazy loading)
>  * Environment: production
>WARNING: Do not use the development server in a production environment.
>Use a production WSGI server instead.
>  * Debug mode: off
> Traceback (most recent call last):
>   File "hello_flask.py", line 6, in 
> app.run()
>   File "/Library/Frameworks/Python.framework/Versions/3.6/lib/
> python3.6/site-packages/flask/app.py",
> line 943, in run
> run_simple(host, port, self, **options)
>   File "/Library/Frameworks/Python.framework/Versions/3.6/lib/
> python3.6/site-packages/werkzeug/serving.py",
> line 814, in run_simple
> inner()
>   File "/Library/Frameworks/Python.framework/Versions/3.6/lib/
> python3.6/site-packages/werkzeug/serving.py",
> line 774, in inner
> fd=fd)
>   File "/Library/Frameworks/Python.framework/Versions/3.6/lib/
> python3.6/site-packages/werkzeug/serving.py",
> line 660, in make_server
> passthrough_errors, ssl_context, fd=fd)
>   File "/Library/Frameworks/Python.framework/Versions/3.6/lib/
> python3.6/site-packages/werkzeug/serving.py",
> line 577, in __init__
> self.address_family), handler)
>   File "/Library/Frameworks/Python.framework/Versions/3.6/lib/
> python3.6/socketserver.py",
> line 453, in __init__
> self.server_bind()
>   File "/Library/Frameworks/Python.framework/Versions/3.6/lib/
> python3.6/http/server.py",
> line 136, in server_bind
> socketserver.TCPServer.server_bind(self)
>   File "/Library/Frameworks/Python.framework/Versions/3.6/lib/
> python3.6/socketserver.py",
> line 467, in server_bind
> self.socket.bind(self.server_address)
> OSError: [Errno 48] Address already in use
> 192:Webapp TamaraB$
>
> What went wrong?
> --
> https://mail.python.org/mailman/listinfo/python-list
>



-- 
Elismar Luz
GNU/Linux Admin
(61) 99400-3376
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Rich Shepard

On Fri, 15 Jun 2018, Larry Martell wrote:


   Oh, ... MUA == Mail User Agent.

I thought it was Made Up Acronym


Larry,

  Could be; depends on the context.

Rich
--
https://mail.python.org/mailman/listinfo/python-list


Re: Flask failure

2018-06-15 Thread Colin McPhail


> On 15 Jun 2018, at 16:19, T Berger  wrote:
> 
> I’m trying to build a webapp with flask. I installed flask, created a webapp 
> in IDLE, but when I tried testing it at my terminal, I got a huge error 
> message. This is the app:
> 
> from flask import Flask
> app = Flask(__name__)
> @app.route('/')
> def hello() -> str:
> return 'Hello world from Flask!'
> app.run()
> 
> This is my command and the resulting error message, containing a warning in 
> red:
> 
> Last login: Thu Jun 14 23:54:55 on ttys000
> 192:~ TamaraB$ cd Desktop/Webapp/
> 192:Webapp TamaraB$ python3 hello_flask.py
>  * Serving Flask app "hello_flask" (lazy loading)
>  * Environment: production
>WARNING: Do not use the development server in a production environment.
>Use a production WSGI server instead.
>  * Debug mode: off
> Traceback (most recent call last):
>   File "hello_flask.py", line 6, in 
> app.run()
> 
[snip]

>  File 
> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socketserver.py",
> line 467, in server_bind
> self.socket.bind(self.server_address)
> OSError: [Errno 48] Address already in use
> 192:Webapp TamaraB$
> 
> What went wrong?

Did the instructions for running this Flask example mention anything about not 
using the standard HTTP port number (80)?  I don’t know much about Flask but I 
expect it runs an HTTP server in order to serve your HTML content to clients. 
If it tries to use the standard port then it will likely find it is already in 
use or that you do not have permission to use it.

— Colin

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Larry Martell
On Fri, Jun 15, 2018 at 2:08 PM, Rich Shepard  wrote:
> On Fri, 15 Jun 2018, Larry Martell wrote:
>
>>>Oh, ... MUA == Mail User Agent.
>>
>> I thought it was Made Up Acronym
>
>
> Larry,
>
>   Could be; depends on the context.

My favorite acronym of all time is TWAIN
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Rob Gaddi

On 06/15/2018 11:44 AM, Larry Martell wrote:

On Fri, Jun 15, 2018 at 2:08 PM, Rich Shepard  wrote:

On Fri, 15 Jun 2018, Larry Martell wrote:


Oh, ... MUA == Mail User Agent.


I thought it was Made Up Acronym



Larry,

   Could be; depends on the context.


My favorite acronym of all time is TWAIN



Really?  I always thought it didn't scan.

--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order.  See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list


Re: What data types does matplotlib pyplot take?

2018-06-15 Thread Peter Pearson
On Wed, 13 Jun 2018 12:53:57 -0400, C W  wrote:
> Hi everyone,
>
> I'm curious what data types pyplot takes. It seems that it can take numpy
> series, pandas series, and possibly pandas dataframe? How many people data
> types are out there? Is that true for all functions in like hist(), bar(),
> line(), etc?

I regret that this might seem less than helpful, but someone
should point out that an enumeration beginning "This package
works with the following data types" would be antithetical to
Python's "duck-typing" philosophy.  The important thing is not
an object's type, but whether the object has the attributes and
methods required.

-- 
To email me, substitute nowhere->runbox, invalid->com.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Larry Martell
On Fri, Jun 15, 2018 at 2:52 PM, Rob Gaddi
 wrote:
> On 06/15/2018 11:44 AM, Larry Martell wrote:
>>
>> On Fri, Jun 15, 2018 at 2:08 PM, Rich Shepard 
>> wrote:
>>>
>>> On Fri, 15 Jun 2018, Larry Martell wrote:
>>>
> Oh, ... MUA == Mail User Agent.


 I thought it was Made Up Acronym
>>>
>>>
>>>
>>> Larry,
>>>
>>>Could be; depends on the context.
>>
>>
>> My favorite acronym of all time is TWAIN
>>
>
> Really?  I always thought it didn't scan.

YAML is good too. As is YACC. But TWAIN is the best.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Chris Angelico
On Sat, Jun 16, 2018 at 4:52 AM, Rob Gaddi
 wrote:
> On 06/15/2018 11:44 AM, Larry Martell wrote:
>>
>> My favorite acronym of all time is TWAIN
>>
>
> Really?  I always thought it didn't scan.
>

Having spent way WAY too many hours trying to turn documents into
images (and text), I very much appreciate that laugh.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: text mining

2018-06-15 Thread Rick Johnson
On Friday, June 15, 2018 at 8:00:36 AM UTC-5, Steven D'Aprano wrote:
> Seriously, you are asking strangers to help you out of the goodness of 
> their heart. 

Stop lying Steven. 

Nobody here has a heart.

This is Usenet, dammit.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Jim Lee



On 06/15/2018 05:00 PM, Chris Angelico wrote:

On Sat, Jun 16, 2018 at 4:52 AM, Rob Gaddi
 wrote:

On 06/15/2018 11:44 AM, Larry Martell wrote:

My favorite acronym of all time is TWAIN


Really?  I always thought it didn't scan.


Having spent way WAY too many hours trying to turn documents into
images (and text), I very much appreciate that laugh.

ChrisA
I once had a Mustek color scanner that came with a TWAIN driver.  If the 
room temperature was above 80 degrees F, it would scan in color - 
otherwise, only black & white.  I was *sure* it was a hardware problem, 
but then someone released a native Linux driver for the scanner.  When I 
moved the scanner to my Linux box, it worked fine regardless of temperature.


-Jim
--
https://mail.python.org/mailman/listinfo/python-list


Re: text mining

2018-06-15 Thread Chris Angelico
On Sat, Jun 16, 2018 at 11:08 AM, Rick Johnson
 wrote:
> On Friday, June 15, 2018 at 8:00:36 AM UTC-5, Steven D'Aprano wrote:
>> Seriously, you are asking strangers to help you out of the goodness of
>> their heart.
>
> Stop lying Steven.
>
> Nobody here has a heart.
>
> This is Usenet, dammit.

I know what it is to have a complete apparatus for conducting the
circulation of blood through the veins and arteries of the human body.

But I have not a heart that up and gives me quarter-deck orders that
it is life-and-death to disobey. I have not a heart of that
description, nor a picture gallery that presumes to take that liberty.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Gregory Ewing

Rich Shepard wrote:
Most of us do not reply if we have insufficient knowledge to 
offer a usable response. Saves bandwidth and electrons.


Also avoids a lot of noise. Imagine if everyone who doesn't
know the answer to a question posted "I don't know" as a
response. It would drown out all the useful replies!

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Chris Angelico
On Sat, Jun 16, 2018 at 11:00 AM, Jim Lee  wrote:
>
>
> On 06/15/2018 05:00 PM, Chris Angelico wrote:
>>
>> On Sat, Jun 16, 2018 at 4:52 AM, Rob Gaddi
>>  wrote:
>>>
>>> On 06/15/2018 11:44 AM, Larry Martell wrote:

 My favorite acronym of all time is TWAIN

>>> Really?  I always thought it didn't scan.
>>>
>> Having spent way WAY too many hours trying to turn documents into
>> images (and text), I very much appreciate that laugh.
>>
>> ChrisA
>
> I once had a Mustek color scanner that came with a TWAIN driver.  If the
> room temperature was above 80 degrees F, it would scan in color - otherwise,
> only black & white.  I was *sure* it was a hardware problem, but then
> someone released a native Linux driver for the scanner.  When I moved the
> scanner to my Linux box, it worked fine regardless of temperature.
>

I would be mind-blown if I did not have the aforementioned too many
hours. Sadly, I am merely facepalming. Wow.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Richard Damon
On 6/15/18 9:00 PM, Jim Lee wrote:
>
>
> On 06/15/2018 05:00 PM, Chris Angelico wrote:
>> On Sat, Jun 16, 2018 at 4:52 AM, Rob Gaddi
>>  wrote:
>>> On 06/15/2018 11:44 AM, Larry Martell wrote:
 My favorite acronym of all time is TWAIN

>>> Really?  I always thought it didn't scan.
>>>
>> Having spent way WAY too many hours trying to turn documents into
>> images (and text), I very much appreciate that laugh.
>>
>> ChrisA
> I once had a Mustek color scanner that came with a TWAIN driver.  If
> the room temperature was above 80 degrees F, it would scan in color -
> otherwise, only black & white.  I was *sure* it was a hardware
> problem, but then someone released a native Linux driver for the
> scanner.  When I moved the scanner to my Linux box, it worked fine
> regardless of temperature.
>
> -Jim

There actually may still have been a hardware issue, likely something
marginal in the timing on the cable. (Timing changing with temperature).
It would take a detailed look, and a fine reading of specs, to see if
the Windows Driver was to spec, and the hardware is marginal (but the
Linux driver didn't push the unit to full speed and got around the
issue), of if the Windows driver broke some specification but still sort
of worked, especially if things were warm, while the Linux driver did it
right.

-- 
Richard Damon

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Michael Torrie
On 06/15/2018 09:28 AM, T Berger wrote:
> I'm suspecting that posting to python google groups (this site) gets
> more responses than mailing to the python list. Am I correct? Also,
> contrary to what I read on the python list information sheet, what
> shows up in this forum does not match what comes into my inbox. I
> started a post here and then replied to a post from my inbox. That
> reply does not show up in this forum.

Actually it does show up. The problem is that Gmail silently throws away
your own post when it gets emailed back to you by the listserv.  But
your messages still get through to the list.  The only way I've figure
out to get around this bug in Gmail is to post from a different SMTP
server than the normal GMail one.  But most people don't have a
different SMTP server to use, and also there are issues with DKIM and
other supposed anti-spam features.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Jim Lee



On 06/15/2018 07:08 PM, Richard Damon wrote:

On 6/15/18 9:00 PM, Jim Lee wrote:


On 06/15/2018 05:00 PM, Chris Angelico wrote:

On Sat, Jun 16, 2018 at 4:52 AM, Rob Gaddi
 wrote:

On 06/15/2018 11:44 AM, Larry Martell wrote:

My favorite acronym of all time is TWAIN


Really?  I always thought it didn't scan.


Having spent way WAY too many hours trying to turn documents into
images (and text), I very much appreciate that laugh.

ChrisA

I once had a Mustek color scanner that came with a TWAIN driver.  If
the room temperature was above 80 degrees F, it would scan in color -
otherwise, only black & white.  I was *sure* it was a hardware
problem, but then someone released a native Linux driver for the
scanner.  When I moved the scanner to my Linux box, it worked fine
regardless of temperature.

-Jim

There actually may still have been a hardware issue, likely something
marginal in the timing on the cable. (Timing changing with temperature).
It would take a detailed look, and a fine reading of specs, to see if
the Windows Driver was to spec, and the hardware is marginal (but the
Linux driver didn't push the unit to full speed and got around the
issue), of if the Windows driver broke some specification but still sort
of worked, especially if things were warm, while the Linux driver did it
right.

You are exactly right.  It was so long ago that I forgot some of the 
details, but it boiled down to the TWAIN driver pushing the SCSI bus out 
of spec.   I remember looking at the bus on a scope, measuring pulse 
widths, and playing with terminator values to try to optimize rise 
times.  I don't believe it used the Windows SCSI driver at all, but 
instead drove the scanner directly (I could be remembering wrong).


-Jim

--
https://mail.python.org/mailman/listinfo/python-list


Re: Python list vs google group

2018-06-15 Thread Gregory Ewing

Jim Lee wrote:
It was so long ago that I forgot some of the 
details, but it boiled down to the TWAIN driver pushing the SCSI bus out 
of spec.


Clearly you didn't sacrifice enough goats!

https://odetocode.com/blogs/scott/archive/2004/09/22/scsi-is-not-magic.aspx

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list


Server warning

2018-06-15 Thread Tamara Berger
I created a webapp with flask, but got a warning in terminal when I tested it.

Last login: Sat Jun 16 01:13:28 on ttys000
192:~ TamaraB$ cd Desktop/Webapp
192:Webapp TamaraB$ python3 hello_flask.py
 * Serving Flask app "hello_flask" (lazy loading)
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

Is this a serious issue, or can I ignore it? I was just following
instructions in a manual I consider trustworthy.

Thanks,

Tamara
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Server warning

2018-06-15 Thread Ben Finney
Tamara Berger  writes:

> Is this a serious issue, or can I ignore it? I was just following
> instructions in a manual I consider trustworthy.

(A word of advice: You have recently been asking here for many different
topics – Flask, Google Mail, etc. – that are not the focus of this
forum. That's not a problem for us, but you would be better to seek
specific help for those topics at their specific support forums.

This is not any kind of support forum, it is a discussion forum for the
Python community. You're part of that now, so welcome! But this is not a
forum for getting support when you're needing help.)


The message from Flask is, I believe, both serious *and* you may be able
to ignore it.

If you are not intending to make the server available on the internet,
you are free to ignore it for that case.

You should never expose the development server onto the live internet.
Use a proper WSGI server (its own topic, with more involved steps)
instead.

The development server is much easier to start (which is why it's there,
and why it is recommended when learning), but much less secure (which is
why, before deploying your application, you need to configure a
properly secure WSGI server).

-- 
 \ “[F]reedom of speech does not entail freedom to have your ideas |
  `\accepted by governments and incorporated into law and policy.” |
_o__)   —Russell Blackford, 2010-03-06 |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list