From psimon at sonic.net  Wed Nov  1 00:30:11 2017
From: psimon at sonic.net (Paul Simon)
Date: Tue, 31 Oct 2017 21:30:11 -0700
Subject: [Tutor] missing idlelib and pip
Message-ID: <otbika$c58$1@blaine.gmane.org>

The python distribution for the Mageia 6 update does not include idlelib 
or pip.  Please tell me where to find them to add.

This seems to be a constant issue with linux distributions of python.  I 
tried to have idlelib added to the Mageia 6 update and all I got was 
vague noise and nothing done.

Paul Simon


From hemantsain55 at gmail.com  Wed Nov  1 02:02:15 2017
From: hemantsain55 at gmail.com (Hemant Sain)
Date: Wed, 1 Nov 2017 11:32:15 +0530
Subject: [Tutor] Help regarding creating tags
Message-ID: <CAJL6Qs9zs5pnPii8GLrLS0zcmSUH4G=xKRybJ0G9-3AYdtFoaA@mail.gmail.com>

i want to tag categories to its menuname.
i have a csv containing menu item name and in other csv i have a column
containing some strings,
i want to pick that strings from categories and look into  menu items if
any menu item containing that string i want to create a new column next to
menu item name flagged as 1 otherwise 0
and the only condition is once a menu item flagged as 1 i don't need to
consider that menu item again to tag further in case of redundant strings
in categories only i want to search which are flagged as 0.
please help me with the python script.

*Menu Name*
9\ bobbie"
9\ chz steak"
9\ tuna"
provolone
20\ bobbie"
bottled soda 20oz
cran-slam ww
american
small chips
medium drink
9\ meatball"
capriotti's water
20'' chicken cheese steak
9\ veg turkey"
medium chips
9\ capastrami"
12\ bobbie"
12'' chicken cheese steak
cookie
12\ chz steak"
9\ cole turkey"
kid grilled cheese white
12\ italian"
12\ meatball"
12\ capastrami"
turkey sand w
20\ slaw be jo"
swiss
12\ cole turkey"
large drink
9\ ham&chz"
9'' chicken cheese steak
9\ slaw be jo"
turkey sand ww
stuffing
12\ turkey"
9\ italian"
12\ slaw be jo"
9\ grld italian"
12\ veg burger w/chz"
extra american
black&bleu salad
9\ turkey"
20\ turkey"
20\ capastrami"
ham sand w
12\ mushroom"
12\ grld italia"
italian salad
tuna sand ww
9\ roast beef"
20\ chz steak"
20\ mushroom"
9\ veg chzstk"
ham
genoa
12\ veg turkey"
12\ veggie cole turkey"
9\ mushroom"
cap's creation
mushrooms
salad chicken
20\ cole turkey"
1 pack chicken
kr  veg burger w/chz
12\ roast beef"
kid turkey n cheese white
20\ italian"
12\ ham&chz"
9\ employee sub"
roast beef kr
9\ veggie cole turkey"
12\ sausage"
tea
turkey sand kr
salad turkey
tuna sand kr
brownie
slice american cheese
1 oz pastrami
9\ cheese"
12\ italian up"
12\ capastrami up"
1 pack steak
delaware's finest small
the sampler sm
side ranch dressing
12\ veg turkey up"
20\ roast beef"
roast beef w
1oz turkey
12\ tuna"
20\ veg turkey"
12\ veg chzstk"
9\ sausage"
kid ham n cheese white
side italian dressing
salad provolone
20\ grld italia"
sample item 6
sample item 9
turkey
12\ slaw be jo up"
12\ meatball up"
1 oz roast beef
ham sand ww
delaware's finest large
side cole slaw large
large chips
20\ meatball"
12'' chick cheese stk up
12\ chz steak up"
12\ grld italia up"
cran-slam w
12\ bobbie up"
20\ cheese"
slice provolone
the sampler lg
meatball bar
slice ham
wise large chips
small side
sm soup
12\ tuna up"
12\ cole turkey up"
prosciutini
20\ veggie cole turkey"
soup
roast beef
20\ italian up"
20'' chick cheese stk up
20\ chz steak up"
20\ bobbie up"
20\ veg turkey up"
slice swiss
20\ capastrami up"
sample item 7
12\ ham&chz up"
salad swiss
12\ veggie cheese stk up"
california omelet
orange juice
exteme bac boy
dinner salad
chef salad
12\ turkey up"
the big cheese
combo it
fries cmb
sm pepsi
km cheese burger
#NAME?
#NAME?
kid grilled cheese wheat
kids ham cheese white box
calif. blt
bacon turkey melt
coffee
1-pc pancake
fries
tuna sand
biscuits & gravy
s-1/3 patty
x avocado
x chez
s-bacon
#NAME?
xtra egg
lg bev upcharge
sm ice tea
small soup
roast beef ww
salad tuna
med pepsi
20\ veg chzstk up"
day nm egg san
s-chkn brest
bell pepper
fruit
1 slice veggie turkey
s-toast
x sausage
1 pack sausage
chicken salad
lg pepsi
x dressing
large side
9\ firecracker turkey"
20\ sausage up"
20\ turkey up"
20\ veg chzstk"
lg ice tea
12\ roast beef up"
sample item 8
catering cap creation sal
the turkey lover sm
little italy sm
cookie tray
sd chk avo san
sm fry / 2 pc zucch
kid turkey n cheese wheat
junior chz burger
extra italian meat
chili chz fries
sm fry / 2 pc o ring
extra turkey



*CATEGORIES*
non-veg
chix
salmon
ch
chkn
brisket
brskt
bacon
bcn
chse
mahi
dog
shk
clam
parmesan
asiago
prosciutto
prosciutti
salami
Angus
hicken
chk
chick
wings
prk
pork
ham
bacon
ribs
fish
shrimp
tuna
beef
steak
stk
meatball
-------------- next part --------------
non-veg
chix
salmon
ch
chkn
brisket
brskt
bacon
bcn
chse
mahi
dog
shk
clam
parmesan 
asiago 
prosciutto 
prosciutti 
salami 
Angus
hicken 
chk 
chick 
wings
prk 
pork 
ham 
bacon 
ribs
fish 
shrimp
tuna
beef 
steak 
stk
meatball



























-------------- next part --------------
i want to tag categories to its menuname.
i have a csv containing menu item name and in other csv i have a colunmn containing some strings,
i want to pick that strings from categories and look into  menu items if any menu item containing that string i want to create a new column next to menu item name flagged as 1 otherwise 0
and the only condition is once a menu item flagged as 1 i dont need to consider that menu item again to tag further in case of redudant strings in categories only i want to search which are flagged as 0.
please help me with the r script.


Menu Name
9\ bobbie"
9\ chz steak"
9\ tuna"
provolone
20\ bobbie"
bottled soda 20oz
cran-slam ww
american
small chips
medium drink
9\ meatball"
capriotti's water
20'' chicken cheese steak
9\ veg turkey"
medium chips
9\ capastrami"
12\ bobbie"
12'' chicken cheese steak
cookie
12\ chz steak"
9\ cole turkey"
kid grilled cheese white
12\ italian"
12\ meatball"
12\ capastrami"
turkey sand w
20\ slaw be jo"
swiss
12\ cole turkey"
large drink
9\ ham&chz"
9'' chicken cheese steak
9\ slaw be jo"
turkey sand ww
stuffing
12\ turkey"
9\ italian"
12\ slaw be jo"
9\ grld italian"
12\ veg burger w/chz"
extra american
black&bleu salad
9\ turkey"
20\ turkey"
20\ capastrami"
ham sand w
12\ mushroom"
12\ grld italia"
italian salad
tuna sand ww
9\ roast beef"
20\ chz steak"
20\ mushroom"
9\ veg chzstk"
ham
genoa
12\ veg turkey"
12\ veggie cole turkey"
9\ mushroom"
cap's creation
mushrooms
salad chicken
20\ cole turkey"
1 pack chicken
kr  veg burger w/chz
12\ roast beef"
kid turkey n cheese white
20\ italian"
12\ ham&chz"
9\ employee sub"
roast beef kr
9\ veggie cole turkey"
12\ sausage"
tea
turkey sand kr
salad turkey
tuna sand kr
brownie
slice american cheese
1 oz pastrami
9\ cheese"
12\ italian up"
12\ capastrami up"
1 pack steak
delaware's finest small
the sampler sm
side ranch dressing
12\ veg turkey up"
20\ roast beef"
roast beef w
1oz turkey
12\ tuna"
20\ veg turkey"
12\ veg chzstk"
9\ sausage"
kid ham n cheese white
side italian dressing
salad provolone
20\ grld italia"
sample item 6
sample item 9
turkey
12\ slaw be jo up"
12\ meatball up"
1 oz roast beef
ham sand ww
delaware's finest large
side cole slaw large
large chips
20\ meatball"
12'' chick cheese stk up
12\ chz steak up"
12\ grld italia up"
cran-slam w
12\ bobbie up"
20\ cheese"
slice provolone
the sampler lg
meatball bar
slice ham
wise large chips
small side
sm soup
12\ tuna up"
12\ cole turkey up"
prosciutini
20\ veggie cole turkey"
soup
roast beef
20\ italian up"
20'' chick cheese stk up
20\ chz steak up"
20\ bobbie up"
20\ veg turkey up"
slice swiss
20\ capastrami up"
sample item 7
12\ ham&chz up"
salad swiss
12\ veggie cheese stk up"
california omelet
orange juice
exteme bac boy
dinner salad
chef salad
12\ turkey up"
the big cheese
combo it
fries cmb
sm pepsi
km cheese burger
#NAME?
#NAME?
kid grilled cheese wheat
kids ham cheese white box
calif. blt
bacon turkey melt
coffee
1-pc pancake
fries
tuna sand
biscuits & gravy
s-1/3 patty
x avocado
x chez
s-bacon
#NAME?
xtra egg
lg bev upcharge
sm ice tea
small soup
roast beef ww
salad tuna
med pepsi
20\ veg chzstk up"
day nm egg san
s-chkn brest
bell pepper
fruit
1 slice veggie turkey
s-toast
x sausage
1 pack sausage
chicken salad
lg pepsi
x dressing
large side
9\ firecracker turkey"
20\ sausage up"
20\ turkey up"
20\ veg chzstk"
lg ice tea
12\ roast beef up"
sample item 8
catering cap creation sal
the turkey lover sm
little italy sm
cookie tray
sd chk avo san
sm fry / 2 pc zucch
kid turkey n cheese wheat
junior chz burger
extra italian meat
chili chz fries
sm fry / 2 pc o ring
extra turkey

From alan.gauld at yahoo.co.uk  Wed Nov  1 06:39:50 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Wed, 1 Nov 2017 10:39:50 +0000
Subject: [Tutor] missing idlelib and pip
In-Reply-To: <otbika$c58$1@blaine.gmane.org>
References: <otbika$c58$1@blaine.gmane.org>
Message-ID: <otc89f$h2v$1@blaine.gmane.org>

On 01/11/17 04:30, Paul Simon wrote:
> The python distribution for the Mageia 6 update does not include idlelib 
> or pip.  Please tell me where to find them to add.

IDLE should be in your package manager - along with zillions of
other Python packages. You should just need to select it and
install it. The caveat is that I don't use Mageia but that's
how it works on every other Linux Python I've used.

On my Mint system I use Synaptic as a package manager and typing
idle into the search box brings up a long list in the form

idle-pythonX.Y

Where X.Y represent every version from 2.3 through to 3.6
Just select the version corresponding to your installed
Python.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos



From alan.gauld at yahoo.co.uk  Wed Nov  1 06:52:38 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Wed, 1 Nov 2017 10:52:38 +0000
Subject: [Tutor] Help regarding creating tags
In-Reply-To: <CAJL6Qs9zs5pnPii8GLrLS0zcmSUH4G=xKRybJ0G9-3AYdtFoaA@mail.gmail.com>
References: <CAJL6Qs9zs5pnPii8GLrLS0zcmSUH4G=xKRybJ0G9-3AYdtFoaA@mail.gmail.com>
Message-ID: <otc91f$4h6$1@blaine.gmane.org>

On 01/11/17 06:02, Hemant Sain wrote:
> i want to tag categories to its menuname.

Your description below does not explain how you will
tag them together, you simply identify which menu
items have a category, but no way to determine
which category goes with which menu item?

> i have a csv containing menu item name and in other 
> csv i have a column containing some strings,

> i want to pick that strings from categories and look into  menu items if
> any menu item containing that string i want to create a new column next to
> menu item name flagged as 1 otherwise 0
> and the only condition is once a menu item flagged
> as 1 i don't need to consider that menu item again
> to tag further in case of redundant strings

That sounds like what you think the solution
should be rather than your actual requirement.
I'd suggest it might be easier to create two
lists and move the found results into the
second list. this has the advantage of reducing
the number of items to be searched without having
to do any extra tests

But at the end you will simply have identified
which items have a category and which have not,
you will not have identified which category
each item belongs to. Maybe you need to store
the category alongside the items once you find
a match? Or better still use a dictionary keyed
by category?

In pseudo code it might look like:

results = {}
for category in categories:
    results[category] = [ item for item in menuitems
                          if category in item ]

But maybe a dictionary is not what you need
for your output format? And what to do with
menuitems that don't match any category?
That take us back to a dual list approach.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos



From mats at wichmann.us  Wed Nov  1 12:08:15 2017
From: mats at wichmann.us (Mats Wichmann)
Date: Wed, 1 Nov 2017 10:08:15 -0600
Subject: [Tutor] missing idlelib and pip
In-Reply-To: <otc89f$h2v$1@blaine.gmane.org>
References: <otbika$c58$1@blaine.gmane.org> <otc89f$h2v$1@blaine.gmane.org>
Message-ID: <d75782a8-79a2-932d-80ae-38ef290351c1@wichmann.us>

On 11/01/17 04:39, Alan Gauld via Tutor wrote:
> On 01/11/17 04:30, Paul Simon wrote:
>> The python distribution for the Mageia 6 update does not include idlelib 
>> or pip.  Please tell me where to find them to add.
> 
> IDLE should be in your package manager - along with zillions of
> other Python packages. You should just need to select it and
> install it. The caveat is that I don't use Mageia but that's
> how it works on every other Linux Python I've used.
> 
> On my Mint system I use Synaptic as a package manager and typing
> idle into the search box brings up a long list in the form
> 
> idle-pythonX.Y
> 
> Where X.Y represent every version from 2.3 through to 3.6
> Just select the version corresponding to your installed
> Python.
> 

Mageia is a descendant of Mandrake, which once upon a time (should be
over a decade ago by now) I used as my main system.  If they haven't
changed away, that means you would search using urpmi... but you've
indicated you have asked them for things and not gotten a satisfactory
answer.

You can _always_ just install your own Python environment.  I have used
this to simplify management/installation:

https://github.com/pyenv/pyenv

Once you are running in a Python you have installed and are not messing
up the system version, you should be able to install whatever you want,
however you want, outside of whatever you think the distribution isn't
doing right. Installing from source the way pyenv does means you have  a
full build, not one that's been segmented into sub-packages the way
Linux distributions do.

Note: IDLE would require a properly working tkinter, which requires a
working tk library, which should not actually be a problem, it's not a
tough thing to do, but has managed to trip up many people (for example,
the system-provided tk on MacOS is not functional for this use so a lot
of people have had IDLE problems there).  Don't feel you _have_ to use
IDLE as your interactive programming environment, there are tons of
other choices - the python.org website has a page of links.



From psimon at sonic.net  Wed Nov  1 13:51:35 2017
From: psimon at sonic.net (Paul Simon)
Date: Wed, 1 Nov 2017 10:51:35 -0700
Subject: [Tutor] missing idlelib and pip
In-Reply-To: <d75782a8-79a2-932d-80ae-38ef290351c1@wichmann.us>
References: <otbika$c58$1@blaine.gmane.org> <otc89f$h2v$1@blaine.gmane.org>
 <d75782a8-79a2-932d-80ae-38ef290351c1@wichmann.us>
Message-ID: <otd1iu$tjt$1@blaine.gmane.org>

On 11/1/2017 9:08 AM, Mats Wichmann wrote:
> On 11/01/17 04:39, Alan Gauld via Tutor wrote:
>> On 01/11/17 04:30, Paul Simon wrote:
>>> The python distribution for the Mageia 6 update does not include idlelib
>>> or pip.  Please tell me where to find them to add.
>>
>> IDLE should be in your package manager - along with zillions of
>> other Python packages. You should just need to select it and
>> install it. The caveat is that I don't use Mageia but that's
>> how it works on every other Linux Python I've used.
>>
>> On my Mint system I use Synaptic as a package manager and typing
>> idle into the search box brings up a long list in the form
>>
>> idle-pythonX.Y
>>
>> Where X.Y represent every version from 2.3 through to 3.6
>> Just select the version corresponding to your installed
>> Python.
>>
> 
> Mageia is a descendant of Mandrake, which once upon a time (should be
> over a decade ago by now) I used as my main system.  If they haven't
> changed away, that means you would search using urpmi... but you've
> indicated you have asked them for things and not gotten a satisfactory
> answer.
> 
> You can _always_ just install your own Python environment.  I have used
> this to simplify management/installation:
> 
> https://github.com/pyenv/pyenv
> 
> Once you are running in a Python you have installed and are not messing
> up the system version, you should be able to install whatever you want,
> however you want, outside of whatever you think the distribution isn't
> doing right. Installing from source the way pyenv does means you have  a
> full build, not one that's been segmented into sub-packages the way
> Linux distributions do.
> 
> Note: IDLE would require a properly working tkinter, which requires a
> working tk library, which should not actually be a problem, it's not a
> tough thing to do, but has managed to trip up many people (for example,
> the system-provided tk on MacOS is not functional for this use so a lot
> of people have had IDLE problems there).  Don't feel you _have_ to use
> IDLE as your interactive programming environment, there are tons of
> other choices - the python.org website has a page of links.
> 
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
> 
Thank you all very much.  I assumed it was always installed with the 
standard library, and every time I upgrade to a new version of Mageia, I 
have the same problem and can never remember what I have done before. 
Pat of the problem for me is that idle is automatically installed with 
the Windows version.
I got a lot of help from the Mageia group and now have all installed.

Paul Simon


From psimon at sonic.net  Wed Nov  1 13:57:42 2017
From: psimon at sonic.net (Paul Simon)
Date: Wed, 1 Nov 2017 10:57:42 -0700
Subject: [Tutor] missing idlelib and pip
In-Reply-To: <d75782a8-79a2-932d-80ae-38ef290351c1@wichmann.us>
References: <otbika$c58$1@blaine.gmane.org> <otc89f$h2v$1@blaine.gmane.org>
 <d75782a8-79a2-932d-80ae-38ef290351c1@wichmann.us>
Message-ID: <otd1ud$d19$1@blaine.gmane.org>

On 11/1/2017 9:08 AM, Mats Wichmann wrote:
> On 11/01/17 04:39, Alan Gauld via Tutor wrote:
>> On 01/11/17 04:30, Paul Simon wrote:
>>> The python distribution for the Mageia 6 update does not include idlelib
>>> or pip.  Please tell me where to find them to add.
>>
>> IDLE should be in your package manager - along with zillions of
>> other Python packages. You should just need to select it and
>> install it. The caveat is that I don't use Mageia but that's
>> how it works on every other Linux Python I've used.
>>
>> On my Mint system I use Synaptic as a package manager and typing
>> idle into the search box brings up a long list in the form
>>
>> idle-pythonX.Y
>>
>> Where X.Y represent every version from 2.3 through to 3.6
>> Just select the version corresponding to your installed
>> Python.
>>
> 
> Mageia is a descendant of Mandrake, which once upon a time (should be
> over a decade ago by now) I used as my main system.  If they haven't
> changed away, that means you would search using urpmi... but you've
> indicated you have asked them for things and not gotten a satisfactory
> answer.
> 
> You can _always_ just install your own Python environment.  I have used
> this to simplify management/installation:
> 
> https://github.com/pyenv/pyenv
> 
> Once you are running in a Python you have installed and are not messing
> up the system version, you should be able to install whatever you want,
> however you want, outside of whatever you think the distribution isn't
> doing right. Installing from source the way pyenv does means you have  a
> full build, not one that's been segmented into sub-packages the way
> Linux distributions do.
> 
> Note: IDLE would require a properly working tkinter, which requires a
> working tk library, which should not actually be a problem, it's not a
> tough thing to do, but has managed to trip up many people (for example,
> the system-provided tk on MacOS is not functional for this use so a lot
> of people have had IDLE problems there).  Don't feel you _have_ to use
> IDLE as your interactive programming environment, there are tons of
> other choices - the python.org website has a page of links.
> 
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
> 
Thank you all very much.  All is working fine now.  I had always assumed 
that Idle and pip were installed with the standard library and not have 
to be separately installed.  My experience is not much above novice and 
whenever I upgrade versions of Mageia I ask for help, sometimes in not 
the nicest way.  I'm a bit older andmy  memory is not always the best.

Paul Simon


From alan.gauld at yahoo.co.uk  Wed Nov  1 14:49:26 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Wed, 1 Nov 2017 18:49:26 +0000
Subject: [Tutor] missing idlelib and pip
In-Reply-To: <d75782a8-79a2-932d-80ae-38ef290351c1@wichmann.us>
References: <otbika$c58$1@blaine.gmane.org> <otc89f$h2v$1@blaine.gmane.org>
 <d75782a8-79a2-932d-80ae-38ef290351c1@wichmann.us>
Message-ID: <otd4vf$5ei$1@blaine.gmane.org>

On 01/11/17 16:08, Mats Wichmann wrote:

> changed away, that means you would search using urpmi... 

If it uses RPM packages then there should definitely
be Python and Tkinter packages available.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos



From alan.gauld at yahoo.co.uk  Wed Nov  1 14:56:07 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Wed, 1 Nov 2017 18:56:07 +0000
Subject: [Tutor] missing idlelib and pip
In-Reply-To: <otd1ud$d19$1@blaine.gmane.org>
References: <otbika$c58$1@blaine.gmane.org> <otc89f$h2v$1@blaine.gmane.org>
 <d75782a8-79a2-932d-80ae-38ef290351c1@wichmann.us>
 <otd1ud$d19$1@blaine.gmane.org>
Message-ID: <otd5c0$3rr$1@blaine.gmane.org>

On 01/11/17 17:57, Paul Simon wrote:

> Thank you all very much.  All is working fine now.  I had always assumed 
> that Idle and pip were installed with the standard library and not have 
> to be separately installed.  

The Linux philosophy is that the user gets to choose so there
should be no bloatware on your system. But if you choose to
use something it should be esy to install - via the package
manager.

Many Linux distros use Python internally so the most basic
Python installation is usually present but not necessarily
the latest version, just the one needed to ru  the tools.
And IDLE is not needed for that so is usually an extra.

By contrast the Windows philosophy is the user gets everything
whether they need it or not and if the PC can't handle
that then buy a new PC. Its easy but expensive.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos



From george at fischhof.hu  Thu Nov  2 09:26:29 2017
From: george at fischhof.hu (George Fischhof)
Date: Thu, 2 Nov 2017 14:26:29 +0100
Subject: [Tutor] How to schedule the SFTP folder sync using python
In-Reply-To: <CAM3x6GgPtbTwzS4VpLYCtjBx_VuJm4+MLktGywh7MHbOoheDqQ@mail.gmail.com>
References: <CAM3x6GgPtbTwzS4VpLYCtjBx_VuJm4+MLktGywh7MHbOoheDqQ@mail.gmail.com>
Message-ID: <CAFwcP0g4vxsrzvuv9TJEQKmz-D-r6wrbG0NFVo=Nf2CdGu3shg@mail.gmail.com>

Hi Pareshkumar,

I do not know what pysftp lib can do for you, but maybe you will need the
scheduler too:

https://pypi.python.org/pypi/schedule/


BR,
George

2017-10-31 20:30 GMT+01:00 Pareshkumar Panchal <pcpanchal123 at gmail.com>:

> Hi,
>
> can you help me about scheduling the folder sync between sftp and local
> directory?
>
> pysftp library is good or you recommend different library?
>
> thank you
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>

From atuxnull at gmail.com  Sat Nov  4 16:11:08 2017
From: atuxnull at gmail.com (Atux Atux)
Date: Sat, 4 Nov 2017 22:11:08 +0200
Subject: [Tutor] double ended queue
Message-ID: <CACoLBwUcjHqKPwM3hBOKAz0x=EAXmS_5NYoWaiJhEOA5TALoOQ@mail.gmail.com>

i am new to the area and i am struggling with a small project that i have.
i need some help please. i need to create a program that runs constantly
unless the user presses q to end it. the program asks the user for a number
and puts the number in a queue, then it prints the queue with the new
element at the end.if the number is with 01,02 then it will be added at the
left hand side without the 0 at the beginning, otherwise at the right hand
side. the user can remove an item from the end of the queue by typing r. if
the user types '0r' it will be removed from the beginning of the queue.

i got the starting point where it asks the user and goes until 'q' is
pressed.

while True:
    if input("\n\n\nType  a number to add it to the queue or q to
exit: ") == 'q':
        break

but i a stuck on how to continue asking and adding to the list

From alan.gauld at yahoo.co.uk  Sat Nov  4 19:46:00 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Sat, 4 Nov 2017 23:46:00 +0000
Subject: [Tutor] double ended queue
In-Reply-To: <CACoLBwUcjHqKPwM3hBOKAz0x=EAXmS_5NYoWaiJhEOA5TALoOQ@mail.gmail.com>
References: <CACoLBwUcjHqKPwM3hBOKAz0x=EAXmS_5NYoWaiJhEOA5TALoOQ@mail.gmail.com>
Message-ID: <otljfh$c22$1@blaine.gmane.org>

On 04/11/17 20:11, Atux Atux wrote:
> i am new to the area and i am struggling with a small project that i have.

You are on the right path.
When faced with any software project you have to keep breaking it down
till you get to something you can write.

You've made a start, lets see what else needs doing:


1) create a program that runs constantly unless the user presses q to
end it.

Done!

> the program asks the user for a number

Kind of there except its asking for a string not a number.
We need to do some work here.

> and puts the number in a queue, then it prints the queue with the new
> element at the end.

We still need to do this bit

> if the number is with 01,02 then it will be added at the
> left hand side

And this...

> without the 0 at the beginning,

>  otherwise at the right hand
> side. 

> the user can remove an item from the end of the queue by typing r. 

> if the user types '0r' it will be removed from the beginning of the queue.

And all those but lets ignore them for now and just
read a number, put it in the queue, print it out and
keep going till the user hits 'q'

while True:
     if input("\n\n\nType  a number to add it to the queue or q to exit:
") == 'q':
         break

So far so good but you want to do a few things to
the input value so you need to store it in a variable

response = input(....)
if response.lower() == 'q':   # allow user some latitude
   break
number = int(response)  # or do we need float???

Now you can add that to the list(aka quque) and print it.

queue.append(number)
print(queue)

Try putting that all together with your existing code
and see how it looks, then we can tackle the other more
complicated options...

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos



From steve at pearwood.info  Sat Nov  4 20:26:38 2017
From: steve at pearwood.info (Steven D'Aprano)
Date: Sun, 5 Nov 2017 11:26:38 +1100
Subject: [Tutor] double ended queue
In-Reply-To: <CACoLBwUcjHqKPwM3hBOKAz0x=EAXmS_5NYoWaiJhEOA5TALoOQ@mail.gmail.com>
References: <CACoLBwUcjHqKPwM3hBOKAz0x=EAXmS_5NYoWaiJhEOA5TALoOQ@mail.gmail.com>
Message-ID: <20171105002637.GA15990@ando.pearwood.info>

On Sat, Nov 04, 2017 at 10:11:08PM +0200, Atux Atux wrote:

[...]
> i got the starting point where it asks the user and goes until 'q' is
> pressed.
> 
> while True:
>     if input("\n\n\nType  a number to add it to the queue or q to
> exit: ") == 'q':
>         break
> 
> but i a stuck on how to continue asking and adding to the list

To start with, you have to actually have a list to add to.

queue = []

To add to the left of the queue, use:

queue.insert(0, value)

To add to the right of the queue, use:

queue.append(value)

To delete the first value:

del queue[0]

and to delete the last:

del queue[len(queue)-1]



-- 
Steve

From martin at linux-ip.net  Sat Nov  4 21:31:04 2017
From: martin at linux-ip.net (Martin A. Brown)
Date: Sat, 4 Nov 2017 18:31:04 -0700
Subject: [Tutor] double ended queue
In-Reply-To: <CACoLBwUcjHqKPwM3hBOKAz0x=EAXmS_5NYoWaiJhEOA5TALoOQ@mail.gmail.com>
References: <CACoLBwUcjHqKPwM3hBOKAz0x=EAXmS_5NYoWaiJhEOA5TALoOQ@mail.gmail.com>
Message-ID: <alpine.LSU.2.11.1711041630450.28108@qnttre.jbaqresebt.arg>


Hello and welcome duplicative Atux,

>i am new to the area and i am struggling with a small project that i have.
>i need some help please.

New to Python, perhaps.  New to programming, as well?

>i need to create a program that runs constantly unless the user 
>presses q to end it.

This is a good way to learn how to handle loops which can handle 
various conditions.  I mention below a module called cmd, which 
ships as a part of the Python library, but it may be good to 
understand first how to handle the looping constructs before you 
move on to the cmd module.

Consider a loop like you indicated:

>while True:
>    if input("\n\n\nType  a number to add it to the queue or q to exit: ") == 'q':
>        break

There are quite a few valuable lessons in this simple task.

  * consider the what kind of data you are asking for; is it an 
    integer, a string or a floating point value?  Alan mentioned 
    that in his message
  * be careful with the kind of data your user is entering, but it 
    also teaches you the value of knowing what the data type is (an 
    important lesson in most programming languages)
  * how do you loop successfully and how do you break out of the 
    loop; you'll want to know about 'break' and you might find 
    'continue' useful, as well

------------------------------- 
# -- Python3
queue = list()
status = ''
instructions = "\n\nAdd a number to the queue or q to exit: "

while True:

    # -- convert the string inputs to int(), float() or whatever type you want
    #    the program to operate on
    #
    response = input(status + instructions)
    response = response.lower()  # -- lower case the string
    if response == 'q':
        break

    #
    try:
        number = int(response)  # -- or float(response)
    except ValueError:
        status = "Ignoring non-integer input: " + response
        continue

    queue.append(response)
    status = "queue = " + str(queue)
------------------------------- 

>the program asks the user for a number and puts the number in a 
>queue, then it prints the queue with the new element at the end.if 
>the number is with 01,02 then it will be added at the left hand 
>side without the 0 at the beginning, otherwise at the right hand 
>side.

Steven has demonstrated how you could use the list() data structure 
to do what you describe.  Note that Python comes with additional 
data structures and what you describe is known in Python as a deque.  
It's a bit less common of a data structure, so you could benefit 
from learning how to perform the prepend and append operations like 
Steven has suggested.

If you haven't noticed that you can run the Python interpreter 
directly, you may find this helpful simply to play with the data 
structures.

You can use a list() as you can see in the core documentation (and 
as Stephen mentioned), however, even in the main documentation is a 
pointer to the collections.deque, which is a more specific sort of 
data structure geared for exactly the use case you present.

Important note;  If humans are interacting with this, though, it's 
unlikely that any of the efficiency gains of a deque over a list are 
necessary, but here are links to the documentation:

  https://docs.python.org/3/tutorial/datastructures.html#using-lists-as-queues
  https://docs.python.org/3/library/collections.html#collections.deque

>the user can remove an item from the end of the queue by typing r. 
>if the user types '0r' it will be removed from the beginning of the 
>queue.

Once you have the addition of items to the queue and the looping 
worked out to your satisfaction, maybe you could share your progress 
and there might be somebody to provide a bit more help on the next 
step of your learning

>but i a stuck on how to continue asking and adding to the list

Good luck,

-Martin

-- 
Martin A. Brown
http://linux-ip.net/

From atuxnull at gmail.com  Sun Nov  5 03:07:31 2017
From: atuxnull at gmail.com (Atux Atux)
Date: Sun, 5 Nov 2017 10:07:31 +0200
Subject: [Tutor] double ended queue
In-Reply-To: <alpine.LSU.2.11.1711041630450.28108@qnttre.jbaqresebt.arg>
References: <CACoLBwUcjHqKPwM3hBOKAz0x=EAXmS_5NYoWaiJhEOA5TALoOQ@mail.gmail.com>
 <alpine.LSU.2.11.1711041630450.28108@qnttre.jbaqresebt.arg>
Message-ID: <CACoLBwU_OgMkgY-5EzLHu3c0q7ZiFQKYd9JG4tSX3euB3o3ZcA@mail.gmail.com>

Hi. Thanks a lot for the replies. i am actually nw to programming as well.
your code keeps asking the user for a number and puts it to the end. how
can i make it to add a number at the beginning if the user adds 01, then
the program it will strip 0 and add 1 at ythe beginning, please?

John


On Sun, Nov 5, 2017 at 3:31 AM, Martin A. Brown <martin at linux-ip.net> wrote:

>
> Hello and welcome duplicative Atux,
>
> >i am new to the area and i am struggling with a small project that i have.
> >i need some help please.
>
> New to Python, perhaps.  New to programming, as well?
>
> >i need to create a program that runs constantly unless the user
> >presses q to end it.
>
> This is a good way to learn how to handle loops which can handle
> various conditions.  I mention below a module called cmd, which
> ships as a part of the Python library, but it may be good to
> understand first how to handle the looping constructs before you
> move on to the cmd module.
>
> Consider a loop like you indicated:
>
> >while True:
> >    if input("\n\n\nType  a number to add it to the queue or q to exit:
> ") == 'q':
> >        break
>
> There are quite a few valuable lessons in this simple task.
>
>   * consider the what kind of data you are asking for; is it an
>     integer, a string or a floating point value?  Alan mentioned
>     that in his message
>   * be careful with the kind of data your user is entering, but it
>     also teaches you the value of knowing what the data type is (an
>     important lesson in most programming languages)
>   * how do you loop successfully and how do you break out of the
>     loop; you'll want to know about 'break' and you might find
>     'continue' useful, as well
>
> -------------------------------
> # -- Python3
> queue = list()
> status = ''
> instructions = "\n\nAdd a number to the queue or q to exit: "
>
> while True:
>
>     # -- convert the string inputs to int(), float() or whatever type you
> want
>     #    the program to operate on
>     #
>     response = input(status + instructions)
>     response = response.lower()  # -- lower case the string
>     if response == 'q':
>         break
>
>     #
>     try:
>         number = int(response)  # -- or float(response)
>     except ValueError:
>         status = "Ignoring non-integer input: " + response
>         continue
>
>     queue.append(response)
>     status = "queue = " + str(queue)
> -------------------------------
>
> >the program asks the user for a number and puts the number in a
> >queue, then it prints the queue with the new element at the end.if
> >the number is with 01,02 then it will be added at the left hand
> >side without the 0 at the beginning, otherwise at the right hand
> >side.
>
> Steven has demonstrated how you could use the list() data structure
> to do what you describe.  Note that Python comes with additional
> data structures and what you describe is known in Python as a deque.
> It's a bit less common of a data structure, so you could benefit
> from learning how to perform the prepend and append operations like
> Steven has suggested.
>
> If you haven't noticed that you can run the Python interpreter
> directly, you may find this helpful simply to play with the data
> structures.
>
> You can use a list() as you can see in the core documentation (and
> as Stephen mentioned), however, even in the main documentation is a
> pointer to the collections.deque, which is a more specific sort of
> data structure geared for exactly the use case you present.
>
> Important note;  If humans are interacting with this, though, it's
> unlikely that any of the efficiency gains of a deque over a list are
> necessary, but here are links to the documentation:
>
>   https://docs.python.org/3/tutorial/datastructures.html#
> using-lists-as-queues
>   https://docs.python.org/3/library/collections.html#collections.deque
>
> >the user can remove an item from the end of the queue by typing r.
> >if the user types '0r' it will be removed from the beginning of the
> >queue.
>
> Once you have the addition of items to the queue and the looping
> worked out to your satisfaction, maybe you could share your progress
> and there might be somebody to provide a bit more help on the next
> step of your learning
>
> >but i a stuck on how to continue asking and adding to the list
>
> Good luck,
>
> -Martin
>
> --
> Martin A. Brown
> http://linux-ip.net/
>

From steve at pearwood.info  Sun Nov  5 04:27:01 2017
From: steve at pearwood.info (Steven D'Aprano)
Date: Sun, 5 Nov 2017 20:27:01 +1100
Subject: [Tutor] double ended queue
In-Reply-To: <CACoLBwU_OgMkgY-5EzLHu3c0q7ZiFQKYd9JG4tSX3euB3o3ZcA@mail.gmail.com>
References: <CACoLBwUcjHqKPwM3hBOKAz0x=EAXmS_5NYoWaiJhEOA5TALoOQ@mail.gmail.com>
 <alpine.LSU.2.11.1711041630450.28108@qnttre.jbaqresebt.arg>
 <CACoLBwU_OgMkgY-5EzLHu3c0q7ZiFQKYd9JG4tSX3euB3o3ZcA@mail.gmail.com>
Message-ID: <20171105092701.GB15990@ando.pearwood.info>

On Sun, Nov 05, 2017 at 10:07:31AM +0200, Atux Atux wrote:
> Hi. Thanks a lot for the replies. i am actually nw to programming as well.
> your code keeps asking the user for a number and puts it to the end. how
> can i make it to add a number at the beginning if the user adds 01, then
> the program it will strip 0 and add 1 at ythe beginning, please?

This sounds like homework. We don't do people's homework for them. What 
have you tried?

Hint: how to tell whether a string ends with "01" or not.

if the_string.endswith("01"):
    print("insert the_string at the beginning")
else:
    print("append the_string at the end")


Second hint. Try running this in the Python interpreter and see what it 
does:

the_string = "1234501"
the_string = the_string[:-2]
print(the_string)


Third hint: I already showed you how to insert at the beginning, or 
append at the end, of the queue.

We can provide you the pieces of the puzzle, but you have to put them 
together.



-- 
Steve


From atuxnull at gmail.com  Sun Nov  5 10:05:04 2017
From: atuxnull at gmail.com (Atux Atux)
Date: Sun, 5 Nov 2017 17:05:04 +0200
Subject: [Tutor] double ended queue
In-Reply-To: <20171105092701.GB15990@ando.pearwood.info>
References: <CACoLBwUcjHqKPwM3hBOKAz0x=EAXmS_5NYoWaiJhEOA5TALoOQ@mail.gmail.com>
 <alpine.LSU.2.11.1711041630450.28108@qnttre.jbaqresebt.arg>
 <CACoLBwU_OgMkgY-5EzLHu3c0q7ZiFQKYd9JG4tSX3euB3o3ZcA@mail.gmail.com>
 <20171105092701.GB15990@ando.pearwood.info>
Message-ID: <CACoLBwUD7HuAPCpD7tB8Zayk--MmsTN6ufzs+dZa_C+=1LnQnQ@mail.gmail.com>

ok then. how do i link 'r' to remove an item from right with mylist.pop(0)
and how can i remove an item from left with '0r'?

On Sun, Nov 5, 2017 at 11:27 AM, Steven D'Aprano <steve at pearwood.info>
wrote:

> On Sun, Nov 05, 2017 at 10:07:31AM +0200, Atux Atux wrote:
> > Hi. Thanks a lot for the replies. i am actually nw to programming as
> well.
> > your code keeps asking the user for a number and puts it to the end. how
> > can i make it to add a number at the beginning if the user adds 01, then
> > the program it will strip 0 and add 1 at ythe beginning, please?
>
> This sounds like homework. We don't do people's homework for them. What
> have you tried?
>
> Hint: how to tell whether a string ends with "01" or not.
>
> if the_string.endswith("01"):
>     print("insert the_string at the beginning")
> else:
>     print("append the_string at the end")
>
>
> Second hint. Try running this in the Python interpreter and see what it
> does:
>
> the_string = "1234501"
> the_string = the_string[:-2]
> print(the_string)
>
>
> Third hint: I already showed you how to insert at the beginning, or
> append at the end, of the queue.
>
> We can provide you the pieces of the puzzle, but you have to put them
> together.
>
>
>
> --
> Steve
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>

From alan.gauld at yahoo.co.uk  Sun Nov  5 13:44:27 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Sun, 5 Nov 2017 18:44:27 +0000
Subject: [Tutor] double ended queue
In-Reply-To: <CACoLBwUD7HuAPCpD7tB8Zayk--MmsTN6ufzs+dZa_C+=1LnQnQ@mail.gmail.com>
References: <CACoLBwUcjHqKPwM3hBOKAz0x=EAXmS_5NYoWaiJhEOA5TALoOQ@mail.gmail.com>
 <alpine.LSU.2.11.1711041630450.28108@qnttre.jbaqresebt.arg>
 <CACoLBwU_OgMkgY-5EzLHu3c0q7ZiFQKYd9JG4tSX3euB3o3ZcA@mail.gmail.com>
 <20171105092701.GB15990@ando.pearwood.info>
 <CACoLBwUD7HuAPCpD7tB8Zayk--MmsTN6ufzs+dZa_C+=1LnQnQ@mail.gmail.com>
Message-ID: <otnm64$q25$1@blaine.gmane.org>

On 05/11/17 15:05, Atux Atux wrote:
> ok then. how do i link 'r' to remove an item from right with mylist.pop(0)
> and how can i remove an item from left with '0r'?

Same way you detected the 'q' to quit.
Using a variation of the 'code' I sent earlier:

response = input(....).lower() # allow user some latitude
if response == 'q':
   break
elif response == 'r':
   # remove right
elif response == '0r':
   # remove left
else:
   number = int(response)  # or do we need float???


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos



From tkadm30 at yandex.com  Wed Nov  8 08:49:24 2017
From: tkadm30 at yandex.com (Etienne Robillard)
Date: Wed, 8 Nov 2017 08:49:24 -0500
Subject: [Tutor] asyncio and wsgiref problem
Message-ID: <53256a96-cf2a-2528-096c-fa938ab270fa@yandex.com>

Hi,

I'm trying to implement the asyncio.coroutine decorator in my wsgi app.

Here's my server code:

class AsyncIOController(WSGIController):
     def __init__(self, settings=None, executor=None, loop=None
         ):
         super(AsyncIOController, self).__init__(settings)
         # asyncio config.
         self._executor = executor
         self._loop = loop or get_event_loop()

     #@asyncio.coroutine
     def get_response(self, request=None, method='GET', data={}):
         response = super(AsyncIOController, self).get_response(request)
         return response

     @asyncio.coroutine
     def application(self, environ, start_response):
         with sessionmanager(environ):
             request.environ.update(environ)
             response = self.get_response(request=request)(environ, 
start_response)
         #assert isinstance(response, bytes), type(response)
         return response

     @asyncio.coroutine
     def __call__(self, environ, start_response, exc_info=None):
         result = self.application(environ, start_response)
         return result

My test script:


@asyncio.coroutine
def app(environ, start_response):
     try:
         result = (yield from AsyncIOController().application(environ, 
start_response))
         return result
     except:
         raise

if __name__ == '__main__':
     server = simple_server.make_server('127.0.0.1', 8000, app)
     server.serve_forever()

Should I attempt to decorate the AsyncIOController.get_response method 
with the asyncio.coroutine method ?

Any ideas how to fix this script ?

Thank you in advance,

Etienne


From mnickey at gmail.com  Wed Nov  8 15:59:38 2017
From: mnickey at gmail.com (Mike Nickey)
Date: Wed, 8 Nov 2017 12:59:38 -0800
Subject: [Tutor] Visual Studio issue when pip installing mysql-python
Message-ID: <CAEywD5BujrUajGerUakjA_9v011tXf7dS7L6tj7AfPMvNBSYNw@mail.gmail.com>

Hi all,

I understand that this might be out of the scope of this list but I am
hopeful that someone has some insight on it so I can move forward with this
project. This is a hail mary attempt to get this resolved.

The issue that I am seeing is that I have a script that works well locally.
I am trying to get this to work on a virtual machine (Windows Server
2012R).
I the goal of this is to have the virtual machine run this automatically
for us.

When I am installing the dependancies for this script I am running into an
issue with :
pip install mysql-python

The full Traceback is rather long but I can post it if needed.

    building '_mysql' extension
    creating build\temp.win-amd64-3.4
    creating build\temp.win-amd64-3.4\Release
    c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\cl.exe
/c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Dversion_info=(1,2,5,'final',1)
-D__version__=1.2.5 "-IC:\Program Files (x86)\MySQL\MySQL Connector C
6.0.2\include" -IC:\Python34\include -IC:\Python34\include /Tc_mysql.c
/Fobuild\temp.win-amd64-3.4\Release\_mysql.obj /Zl
    _mysql.c
    _mysql.c(42) : fatal error C1083: Cannot open include file:
'config-win.h': No such file or directory
    error: command '"c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\BIN\amd64\cl.exe"' failed with exit status 2

Any ideas on how to resolve this?
I've already asked to have a linux virtual machine spun up for us but I'd
love to hear what you think.

-- 
~MEN
Portfolio <http://portfolio.mnickey.com>
Schedule a meeting <https://calendly.com/mnickey> with me!

From mats at wichmann.us  Wed Nov  8 16:17:45 2017
From: mats at wichmann.us (Mats Wichmann)
Date: Wed, 8 Nov 2017 14:17:45 -0700
Subject: [Tutor] Visual Studio issue when pip installing mysql-python
In-Reply-To: <CAEywD5BujrUajGerUakjA_9v011tXf7dS7L6tj7AfPMvNBSYNw@mail.gmail.com>
References: <CAEywD5BujrUajGerUakjA_9v011tXf7dS7L6tj7AfPMvNBSYNw@mail.gmail.com>
Message-ID: <83be02ef-1445-82b8-25e2-4beb9a465312@wichmann.us>

On 11/08/2017 01:59 PM, Mike Nickey wrote:
> Hi all,
> 
> I understand that this might be out of the scope of this list but I am
> hopeful that someone has some insight on it so I can move forward with this
> project. This is a hail mary attempt to get this resolved.
> 
> The issue that I am seeing is that I have a script that works well locally.
> I am trying to get this to work on a virtual machine (Windows Server
> 2012R).
> I the goal of this is to have the virtual machine run this automatically
> for us.
> 
> When I am installing the dependancies for this script I am running into an
> issue with :
> pip install mysql-python
> 
> The full Traceback is rather long but I can post it if needed.
> 
>     building '_mysql' extension
>     creating build\temp.win-amd64-3.4
>     creating build\temp.win-amd64-3.4\Release
>     c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\cl.exe
> /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Dversion_info=(1,2,5,'final',1)
> -D__version__=1.2.5 "-IC:\Program Files (x86)\MySQL\MySQL Connector C
> 6.0.2\include" -IC:\Python34\include -IC:\Python34\include /Tc_mysql.c
> /Fobuild\temp.win-amd64-3.4\Release\_mysql.obj /Zl
>     _mysql.c
>     _mysql.c(42) : fatal error C1083: Cannot open include file:
> 'config-win.h': No such file or directory
>     error: command '"c:\Program Files (x86)\Microsoft Visual Studio
> 10.0\VC\BIN\amd64\cl.exe"' failed with exit status 2
> 
> Any ideas on how to resolve this?
> I've already asked to have a linux virtual machine spun up for us but I'd
> love to hear what you think.


Can't answer for you, not being a VS, or even Windows, guy, but a couple
of notes:
- people have been having problems with the mysql config-win.h for
years. I bet you'll have some fun if you search for this on Stack Exchange.
- VS 10.0 is _awfully_ old.  If you're intentionally trying to use this
version - don't.  If it's falling over because of the VS tendency to try
to support the whole world at once, I have no idea how to help you avoid
that. You probably only want to intentionally support roughly [12.0 (aka
VS 2013), 14.0 (aka VS 2015), 15.0 (aka CS 2017)]


From tkadm30 at yandex.com  Wed Nov  8 15:30:56 2017
From: tkadm30 at yandex.com (Etienne Robillard)
Date: Wed, 8 Nov 2017 15:30:56 -0500
Subject: [Tutor] asyncio and wsgiref problem
In-Reply-To: <53256a96-cf2a-2528-096c-fa938ab270fa@yandex.com>
References: <53256a96-cf2a-2528-096c-fa938ab270fa@yandex.com>
Message-ID: <67a2218a-f6e5-4eb8-97d1-3f1066518b51@yandex.com>

This code is compatible with PEP-3333 on Python 3.5.3:

@asyncio.coroutine
def app(environ, start_response):
     try:
         result = (yield from AsyncIOController().application(environ, 
start_response))
     except:
         raise
     else:

         #XXX result is a generator. this should not be needed?

         yield from result

I updated my server code like so:

class AsyncIOController(WSGIController):
     def __init__(self, settings=None, executor=None, loop=None
         ):
         super(AsyncIOController, self).__init__(settings)
         # asyncio config.
         self._executor = executor
         self._loop = loop or get_event_loop()

     #@asyncio.coroutine
     def get_response(self, request=None, method='GET', data={}):
         response = super(AsyncIOController, self).get_response(request)
         return response

     @asyncio.coroutine
     def application(self, environ, start_response):
         with sessionmanager(environ):
             request.environ.update(environ)
             response = self.get_response(request=request)
         #assert isinstance(response, bytes), type(response)
         return response(environ, start_response)

     @asyncio.coroutine
     def __call__(self, environ, start_response, exc_info=None):
         result = self.application(environ, start_response)
         return result

How can i avoid calling "yield" twice in my test script ?

Thank you,

Etienne


From tkadm30 at yandex.com  Thu Nov  9 13:29:17 2017
From: tkadm30 at yandex.com (Etienne Robillard)
Date: Thu, 9 Nov 2017 13:29:17 -0500
Subject: [Tutor] asyncio and wsgiref problem
In-Reply-To: <67a2218a-f6e5-4eb8-97d1-3f1066518b51@yandex.com>
References: <53256a96-cf2a-2528-096c-fa938ab270fa@yandex.com>
 <67a2218a-f6e5-4eb8-97d1-3f1066518b51@yandex.com>
Message-ID: <3dd03f59-f186-ae9d-be5c-5c80b400cdb8@yandex.com>

OK i figured that wsgiref (PEP-3333) is currently incompatible with 
asyncio. I'm not sure about the motivations of this incompatibility. 
Would it be so hard to make a "wsgiref.asyncio_server" extension for 
people wanting to use wsgiref for development without having to use a 
third-party extension?

Anyways, I'm now using uWSGI for development and testing.

Etienne



Le 2017-11-08 ? 15:30, Etienne Robillard a ?crit?:
> This code is compatible with PEP-3333 on Python 3.5.3:
>
> @asyncio.coroutine
> def app(environ, start_response):
> ??? try:
> ??????? result = (yield from AsyncIOController().application(environ, 
> start_response))
> ??? except:
> ??????? raise
> ??? else:
>
> ??????? #XXX result is a generator. this should not be needed?
>
> ??????? yield from result
>
> I updated my server code like so:
>
> class AsyncIOController(WSGIController):
> ??? def __init__(self, settings=None, executor=None, loop=None
> ??????? ):
> ??????? super(AsyncIOController, self).__init__(settings)
> ??????? # asyncio config.
> ??????? self._executor = executor
> ??????? self._loop = loop or get_event_loop()
>
> ??? #@asyncio.coroutine
> ??? def get_response(self, request=None, method='GET', data={}):
> ??????? response = super(AsyncIOController, self).get_response(request)
> ??????? return response
>
> ??? @asyncio.coroutine
> ??? def application(self, environ, start_response):
> ??????? with sessionmanager(environ):
> ??????????? request.environ.update(environ)
> ??????????? response = self.get_response(request=request)
> ??????? #assert isinstance(response, bytes), type(response)
> ??????? return response(environ, start_response)
>
> ??? @asyncio.coroutine
> ??? def __call__(self, environ, start_response, exc_info=None):
> ??????? result = self.application(environ, start_response)
> ??????? return result
>
> How can i avoid calling "yield" twice in my test script ?
>
> Thank you,
>
> Etienne
>
> _______________________________________________
> Tutor maillist? -? Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor

-- 
Etienne Robillard
tkadm30 at yandex.com
http://www.isotopesoftware.ca/


From anish198519851985 at gmail.com  Sun Nov 12 05:37:06 2017
From: anish198519851985 at gmail.com (anish singh)
Date: Sun, 12 Nov 2017 02:37:06 -0800
Subject: [Tutor] Python creating trie
Message-ID: <CAK7N6vqHdvh_jZkPUmSvWh9fpcRwGYLDELph_UhF7PAZyvkeHQ@mail.gmail.com>

Can someone explain me this code to create a trie
from words?

import collections
words = ["bad", "sad", "abyss"]

Trie = lambda: collections.defaultdict(Trie)
trie = Trie()
END = True

for i, word in enumerate(words):
    reduce(dict.__getitem__, word, trie)[END] = i
print(trie.values())


I am not able to understand lambda usage and reduce
function here.

Thanks,

From __peter__ at web.de  Sun Nov 12 06:40:59 2017
From: __peter__ at web.de (Peter Otten)
Date: Sun, 12 Nov 2017 12:40:59 +0100
Subject: [Tutor] Python creating trie
References: <CAK7N6vqHdvh_jZkPUmSvWh9fpcRwGYLDELph_UhF7PAZyvkeHQ@mail.gmail.com>
Message-ID: <ou9c04$nm6$1@blaine.gmane.org>

anish singh wrote:

> Can someone explain me this code to create a trie
> from words?
> 
> import collections
> words = ["bad", "sad", "abyss"]
> 
> Trie = lambda: collections.defaultdict(Trie)
> trie = Trie()
> END = True
> 
> for i, word in enumerate(words):
>     reduce(dict.__getitem__, word, trie)[END] = i
> print(trie.values())
> 
> 
> I am not able to understand lambda usage and reduce
> function here.

foo = lambda: expr

is just another way to write

def foo():
    return expr

In the example the function is

def Trie():
    return collections.defauldict(Trie)

This function creates a defaultdict whose values automatically spring into 
existence and are defaultdict themselves:


>>> Trie = lambda: collections.defaultdict(Trie)
>>> trie = Trie()
>>> trie["a"]["b"]["c"]
defaultdict(<function <lambda> at 0x7f220e21cae8>, {})
>>> trie
defaultdict(<function <lambda> at 0x7f220e21cae8>, {'a': 
defaultdict(<function <lambda> at 0x7f220e21cae8>, {'b': 
defaultdict(<function <lambda> at 0x7f220e21cae8>, {'c': 
defaultdict(<function <lambda> at 0x7f220e21cae8>, {})})})})

You can achieve the same with the standard dict by checking explicitly for 
the key:

>>> trie = {}
>>> t = trie
>>> for key in ["a", "b", "c"]:
...     if key not in t:
...         t[key] = {}
...     t = t[key]
... 
>>> trie
{'a': {'b': {'c': {}}}}

Can you rewrite this with the dict.setdefault() method?

The reduce() function is basically a single loop:

>>> def reduce(func, items, initial):
...     result = initial
...     for item in items:
...         result = func(result, item)
...     return result
... 
>>> reduce(lambda a, b: a + b, [1, 2, 3], 42)
48

Rewritten without reduce:

>>> result = 42
>>> for item in [1, 2, 3]:
...     result = result + item
... 
>>> result
48

If we rewrite your code following the examples above we get

trie = {}
END = True

for i, word in enumerate(words):
    t = trie
    for c in word:
        t = t.setdefault(c, {})
    t[END] = i
print(trie.values())

which you may find a bit easier to follow.

You are not alone.



From steve at pearwood.info  Sun Nov 12 06:48:33 2017
From: steve at pearwood.info (Steven D'Aprano)
Date: Sun, 12 Nov 2017 22:48:33 +1100
Subject: [Tutor] Python creating trie
In-Reply-To: <CAK7N6vqHdvh_jZkPUmSvWh9fpcRwGYLDELph_UhF7PAZyvkeHQ@mail.gmail.com>
References: <CAK7N6vqHdvh_jZkPUmSvWh9fpcRwGYLDELph_UhF7PAZyvkeHQ@mail.gmail.com>
Message-ID: <20171112114832.GH19802@ando.pearwood.info>

On Sun, Nov 12, 2017 at 02:37:06AM -0800, anish singh wrote:
> Can someone explain me this code to create a trie
> from words?

Not really. What makes this a trie? Where did you get this code from?


> import collections
> words = ["bad", "sad", "abyss"]
> 
> Trie = lambda: collections.defaultdict(Trie)
> trie = Trie()
> END = True
> 
> for i, word in enumerate(words):
>     reduce(dict.__getitem__, word, trie)[END] = i
> print(trie.values())
> 
> 
> I am not able to understand lambda usage and reduce
> function here.

The lambda is exactly equivalent to:

# Trie = lambda: collections.defaultdict(Trie)
def Trie():
    return collections.defaultdict(Trie)


Does that help?

The call to reduce (inside the loop) can be re-written as (untested):

# for i, word in enumerate(words):
#     reduce(dict.__getitem__, word, trie)[END] = i
for i, word in enumerate(words):
    value = trie
    for item in word:
        value = value[item]
    value[END] = i



-- 
Steve

From 01patrickliu at gmail.com  Sun Nov 12 10:54:52 2017
From: 01patrickliu at gmail.com (=?UTF-8?B?5YqJ5qyK6Zme?=)
Date: Sun, 12 Nov 2017 23:54:52 +0800
Subject: [Tutor] (no subject)
Message-ID: <CAB2Y5UyqZXDDOHoJfub_sr5eXd49N0BwowhCAQSZ595K7wEUew@mail.gmail.com>

????closure ??????????
??????????

def f1(a):
    def f2(b):
        return a+b
    return f2

f1=f1(10)

??f1????? ????????

From alan.gauld at yahoo.co.uk  Sun Nov 12 18:06:03 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Sun, 12 Nov 2017 23:06:03 +0000
Subject: [Tutor] (no subject)
In-Reply-To: <CAB2Y5UyqZXDDOHoJfub_sr5eXd49N0BwowhCAQSZ595K7wEUew@mail.gmail.com>
References: <CAB2Y5UyqZXDDOHoJfub_sr5eXd49N0BwowhCAQSZ595K7wEUew@mail.gmail.com>
Message-ID: <ouak4j$kk6$1@blaine.gmane.org>

On 12/11/17 15:54, ??? wrote:
> ????closure ??????????
> ??????????
> 
> def f1(a):
>     def f2(b):
>         return a+b
>     return f2
> 
> f1=f1(10)
> 
> ??f1????? ????????

Can you tell us what language this is?
Or better still post an English translation?
That's what most of us speak on this list...


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos



From steve at pearwood.info  Sun Nov 12 18:13:49 2017
From: steve at pearwood.info (Steven D'Aprano)
Date: Mon, 13 Nov 2017 10:13:49 +1100
Subject: [Tutor] (no subject)
In-Reply-To: <CAB2Y5UyqZXDDOHoJfub_sr5eXd49N0BwowhCAQSZ595K7wEUew@mail.gmail.com>
References: <CAB2Y5UyqZXDDOHoJfub_sr5eXd49N0BwowhCAQSZ595K7wEUew@mail.gmail.com>
Message-ID: <20171112231349.GI19802@ando.pearwood.info>

Sorry ??? <01patrickliu at gmail.com>, but this is an English-language 
mailing list. I do not understand what question you are asking.


On Sun, Nov 12, 2017 at 11:54:52PM +0800, ??? wrote:
> ????closure ??????????
> ??????????
> 
> def f1(a):
>     def f2(b):
>         return a+b
>     return f2
> 
> f1=f1(10)
> 
> ??f1????? ????????


-- 
Steve

From alan.gauld at yahoo.co.uk  Sun Nov 12 19:52:41 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Mon, 13 Nov 2017 00:52:41 +0000
Subject: [Tutor] Fwd: Re:  (no subject)
In-Reply-To: <1510530909.14476.1.camel@gmail.com>
References: <1510530909.14476.1.camel@gmail.com>
Message-ID: <82847cca-5978-155f-3d06-aeb7ba814f4c@yahoo.co.uk>

Forwarding to the list...



	

	
From: 	RRRoy BBBean <rrroybbbean at gmail.com>
Organisation: 	DDDead MMMail
To: 	Alan Gauld <alan.gauld at yahoo.co.uk>, tutor at python.org



On Sun, 2017-11-12 at 23:06 +0000, Alan Gauld via Tutor wrote:
> On 12/11/17 15:54, ??? wrote:
...
> Can you tell us what language this is?
> Or better still post an English translation?
> That's what most of us speak on this list...
...
It's Chinese. Google Translate does a decent job with Chinese, much
better than Korean at least.

> I encountered some problems when using closure.
> For example, a simple example,
>
> def f1 (a):
> def f2 (b):
> return a + b
> return f2
>
> f1 = f1 (10)
>
> This time f1 conflict, is this normal?

It appears to be a question about currying in Python?



From alan.gauld at yahoo.co.uk  Wed Nov 15 12:41:14 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Wed, 15 Nov 2017 17:41:14 +0000
Subject: [Tutor] Updates to web tutor
Message-ID: <cfed362f-03d8-4402-958a-e271a2f4960f@yahoo.co.uk>

Only just on topic but i'd like some help please...

I've been doing some much needed maintenance to my web tutor. In
particular I'm trying to move it from the (web)stone age of HTML3 and
Frames to HTML5/CSS and provide a responsive/reactive design.

Along the way I've also completely changed the styling to give it a more
modern appearance(*). I'm now at the stage where some independent
feedback would be useful so if anyone feels like trying out the new
design I'd appreciate any feedback - especially on how it works on
mobile devices of the Apple variety.

The test site is:

http://www.alan-g.me.uk/l2p2/

I've done the first 2 sections - up to the Error Handling topic.

PS: There is very little changed in the actual content so far - just a few
typos fixed and a couple of extra explanatory paragraphs I've been
meaning to add for a while. Its really the web design that I'm
working on just now.

(*)The TOC will eventually be restyled to a block menu look but is
just boring hyperlinks for now.

Any feedback is appreciated.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


From eddio0141 at gmail.com  Wed Nov 15 17:16:35 2017
From: eddio0141 at gmail.com (Eddio 0141)
Date: Wed, 15 Nov 2017 22:16:35 +0000
Subject: [Tutor] input string to own console stdin
Message-ID: <CAGvi=ougEoZ6ttT0Cqe5EQ2XH66dJgo9iDg=Zsjmd4O1Q33wGg@mail.gmail.com>

Hi.
I've been searching on google about inputting to own stdin and press enter
but so far i haven't found anything at all.

so what im trying to do is the chatterbot function i got on python doesn't
seem to accept string as an input and always wants a console input and
Enter
(the line -> response = bot.get_response(input string))
so instead, im finding a way to put the input to the stdin and
automatically press enter.

i have tried this
[
https://stackoverflow.com/questions/8475290/how-do-i-write-to-a-python-subprocess-stdin
]
but even it doesn't give me an syntax error, it did absolutely nothing.

Please help. Thanks

From alan.gauld at yahoo.co.uk  Wed Nov 15 19:47:13 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Thu, 16 Nov 2017 00:47:13 +0000
Subject: [Tutor] input string to own console stdin
In-Reply-To: <CAGvi=ougEoZ6ttT0Cqe5EQ2XH66dJgo9iDg=Zsjmd4O1Q33wGg@mail.gmail.com>
References: <CAGvi=ougEoZ6ttT0Cqe5EQ2XH66dJgo9iDg=Zsjmd4O1Q33wGg@mail.gmail.com>
Message-ID: <ouin69$7b1$1@blaine.gmane.org>

On 15/11/17 22:16, Eddio 0141 wrote:
> Hi.
> I've been searching on google about inputting to own stdin and press enter
> but so far i haven't found anything at all.

You need to give us a bit more context. This doesn't look like
standard library stuff so which package are you using? (Is that
what chatterbot is?)

Also without seeing the code that doesn't work we can only
make wild guesses about whats going wrong.

One thing to consider is that if (as I assume) you are trying
to talk to another process from Python you need to be sending
your data on stdout for it to be read on the other process'
stdin. You will also need to ensure that Pipes are switched
on in subprocess and that your execution environment is
piping your stdout to their stdin. eg you start chatterbot
with something like:

$ python myscript.py|chatterbot

or

$ chatterbot < python myscript.py

But show us your code, it will make life easier for all of us.

> i have tried this
> [
> https://stackoverflow.com/questions/8475290/how-do-i-write-to-a-python-subprocess-stdin
> ]
> but even it doesn't give me an syntax error, it did absolutely nothing.

See, even that question doesn't make sense, since you *read*
from stdin not write to it. It sounds like a fundamental
concepts kind of thing...

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos



From sudipta.mml at gmail.com  Thu Nov 16 11:55:47 2017
From: sudipta.mml at gmail.com (sudipta.mml)
Date: Thu, 16 Nov 2017 08:55:47 -0800
Subject: [Tutor] Fw(4): sudipta.mml@gmail.com
Message-ID: <cc0c0077acb6$f6c9acea$52d0d7fb$@gmail.com>

This message can only be viewed in a browser.
To view this message please click here



Thu, 16 Nov 2017 08:55:47 -0800
Yahoo error code: mptsm

From ghering at hotmail.com  Fri Nov 17 20:51:16 2017
From: ghering at hotmail.com (adam ghering)
Date: Sat, 18 Nov 2017 01:51:16 +0000
Subject: [Tutor] QT5 pyqt5 for python 2.7
Message-ID: <DM5PR14MB12759C4A91A9D5DB34D8F1F0B72C0@DM5PR14MB1275.namprd14.prod.outlook.com>

Hello,


I am trying to get up to speed on python; expand my skills etc.


I work in a VFX environment where most all the tools continue to run with python 2.7XX


I have seen that pyqt5 supports python 2.7 according to its documentation but it needs to be rebuilt to function.


I have done some homework on the subject and tried to download, tweak and install some things but nothing works.


Can someone point me in the right direction?


Also I see QT5 mentioned in addition to pyqt5 or like pyqt5 is just a binding of QT5 to python? can someone explain.


ideally i just need the holes filled in as I have searched and searched and there seems to be no clear path to getting this working even though people are using it and have rebuilt it already.


appreciate any help up front


Best,




From alan.gauld at yahoo.co.uk  Sat Nov 18 04:28:59 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Sat, 18 Nov 2017 09:28:59 +0000
Subject: [Tutor] QT5 pyqt5 for python 2.7
In-Reply-To: <DM5PR14MB12759C4A91A9D5DB34D8F1F0B72C0@DM5PR14MB1275.namprd14.prod.outlook.com>
References: <DM5PR14MB12759C4A91A9D5DB34D8F1F0B72C0@DM5PR14MB1275.namprd14.prod.outlook.com>
Message-ID: <ouougk$kk0$1@blaine.gmane.org>

On 18/11/17 01:51, adam ghering wrote:

> I have seen that pyqt5 supports python 2.7 according to its documentation  > but it needs to be rebuilt to function.

Thats unusual, usually you can find a binary by somebody.
But provided you have the dev tools building from source shoulkd not be 
too difficult.

> I have done some homework on the subject and tried to download, tweak and install some things but nothing works.

Define "othing works"
Can you download it?
What tweaks? What happened?
What kind of install, how did you do it?
What errors did you get?

We need specifics.

> Also I see QT5 mentioned in addition to pyqt5 or like > pyqt5 is just a binding of QT5 to python? can someone explain.

Thats correct. QT5 is the actual C/C++ UI Library and pyqt5
is a Python binding to that. (Similaar to the forked "side" project
which you might also explore since they might have a binary
ready built)

> ideally i just need the holes filled in as I have searched 
> and searched and there seems to be no clear path

There are side and pyqt support forums, your best
bet for detailed help is to ask there.

Alan G


From breamoreboy at gmail.com  Sat Nov 18 05:09:41 2017
From: breamoreboy at gmail.com (Mark Lawrence)
Date: Sat, 18 Nov 2017 10:09:41 +0000
Subject: [Tutor] QT5 pyqt5 for python 2.7
In-Reply-To: <DM5PR14MB12759C4A91A9D5DB34D8F1F0B72C0@DM5PR14MB1275.namprd14.prod.outlook.com>
References: <DM5PR14MB12759C4A91A9D5DB34D8F1F0B72C0@DM5PR14MB1275.namprd14.prod.outlook.com>
Message-ID: <oup0st$u3v$1@blaine.gmane.org>

On 18/11/17 01:51, adam ghering wrote:
> Hello,
> 
> I am trying to get up to speed on python; expand my skills etc.
>  
> I work in a VFX environment where most all the tools continue to run with python 2.7XX
> 
> I have seen that pyqt5 supports python 2.7 according to its documentation but it needs to be rebuilt to function.
> 
> I have done some homework on the subject and tried to download, tweak and install some things but nothing works.
> 
> Can someone point me in the right direction?
> 
> Also I see QT5 mentioned in addition to pyqt5 or like pyqt5 is just a binding of QT5 to python? can someone explain.
> 
> ideally i just need the holes filled in as I have searched and searched and there seems to be no clear path to getting this working even though people are using it and have rebuilt it already.
> 
> appreciate any help up front
> 
> Best,
> 

Just search for "pyqt5 python 2.7 your-os" without the quotes, there's 
loads of hits for linux and its variants, mac and windows.

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

Mark Lawrence


From ghering at hotmail.com  Sat Nov 18 13:03:02 2017
From: ghering at hotmail.com (adam ghering)
Date: Sat, 18 Nov 2017 18:03:02 +0000
Subject: [Tutor] QT5 pyqt5 for python 2.7
In-Reply-To: <oup0st$u3v$1@blaine.gmane.org>
References: <DM5PR14MB12759C4A91A9D5DB34D8F1F0B72C0@DM5PR14MB1275.namprd14.prod.outlook.com>,
 <oup0st$u3v$1@blaine.gmane.org>
Message-ID: <DM5PR14MB1275F613D6DBB552853C44D4B72C0@DM5PR14MB1275.namprd14.prod.outlook.com>

I have what seems like two responses but there are no text at all in the body of the messages.


Is there a way I am supposed to see these?


Best,



________________________________
From: Tutor <tutor-bounces+ghering=hotmail.com at python.org> on behalf of Mark Lawrence <breamoreboy at gmail.com>
Sent: Saturday, November 18, 2017 2:09:41 AM
To: tutor at python.org
Subject: Re: [Tutor] QT5 pyqt5 for python 2.7

On 18/11/17 01:51, adam ghering wrote:
> Hello,
>
> I am trying to get up to speed on python; expand my skills etc.
>
> I work in a VFX environment where most all the tools continue to run with python 2.7XX
>
> I have seen that pyqt5 supports python 2.7 according to its documentation but it needs to be rebuilt to function.
>
> I have done some homework on the subject and tried to download, tweak and install some things but nothing works.
>
> Can someone point me in the right direction?
>
> Also I see QT5 mentioned in addition to pyqt5 or like pyqt5 is just a binding of QT5 to python? can someone explain.
>
> ideally i just need the holes filled in as I have searched and searched and there seems to be no clear path to getting this working even though people are using it and have rebuilt it already.
>
> appreciate any help up front
>
> Best,
>

Just search for "pyqt5 python 2.7 your-os" without the quotes, there's
loads of hits for linux and its variants, mac and windows.

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

Mark Lawrence

_______________________________________________
Tutor maillist  -  Tutor at python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

From alan.gauld at yahoo.co.uk  Sun Nov 19 05:10:53 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Sun, 19 Nov 2017 10:10:53 +0000
Subject: [Tutor] Try the list archive Re: QT5 pyqt5 for python 2.7
In-Reply-To: <DM5PR14MB1275F613D6DBB552853C44D4B72C0@DM5PR14MB1275.namprd14.prod.outlook.com>
References: <DM5PR14MB12759C4A91A9D5DB34D8F1F0B72C0@DM5PR14MB1275.namprd14.prod.outlook.com>
 <oup0st$u3v$1@blaine.gmane.org>
 <DM5PR14MB1275F613D6DBB552853C44D4B72C0@DM5PR14MB1275.namprd14.prod.outlook.com>
Message-ID: <ourlb6$r2$1@blaine.gmane.org>

On 18/11/17 18:03, adam ghering wrote:
> I have what seems like two responses but there are no text at all in the body of the messages.
> 
> 
> Is there a way I am supposed to see these?

You should see the body but youcan try the list
archive via a browser...

Alan g


From breamoreboy at gmail.com  Sun Nov 19 08:58:14 2017
From: breamoreboy at gmail.com (Mark Lawrence)
Date: Sun, 19 Nov 2017 13:58:14 +0000
Subject: [Tutor] QT5 pyqt5 for python 2.7
In-Reply-To: <DM5PR14MB1275F613D6DBB552853C44D4B72C0@DM5PR14MB1275.namprd14.prod.outlook.com>
References: <DM5PR14MB12759C4A91A9D5DB34D8F1F0B72C0@DM5PR14MB1275.namprd14.prod.outlook.com>
 <oup0st$u3v$1@blaine.gmane.org>
 <DM5PR14MB1275F613D6DBB552853C44D4B72C0@DM5PR14MB1275.namprd14.prod.outlook.com>
Message-ID: <ous2le$f8h$1@blaine.gmane.org>

On 18/11/17 18:03, adam ghering wrote:
> I have what seems like two responses but there are no text at all in the body of the messages.
> 
> Is there a way I am supposed to see these?
> 
> Best,
> 
> ________________________________
> From: Tutor <tutor-bounces+ghering=hotmail.com at python.org> on behalf of Mark Lawrence <breamoreboy at gmail.com>
> Sent: Saturday, November 18, 2017 2:09:41 AM
> To: tutor at python.org
> Subject: Re: [Tutor] QT5 pyqt5 for python 2.7
> 
> On 18/11/17 01:51, adam ghering wrote:
>> Hello,
>>
>> I am trying to get up to speed on python; expand my skills etc.
>>
>> I work in a VFX environment where most all the tools continue to run with python 2.7XX
>>
>> I have seen that pyqt5 supports python 2.7 according to its documentation but it needs to be rebuilt to function.
>>
>> I have done some homework on the subject and tried to download, tweak and install some things but nothing works.
>>
>> Can someone point me in the right direction?
>>
>> Also I see QT5 mentioned in addition to pyqt5 or like pyqt5 is just a binding of QT5 to python? can someone explain.
>>
>> ideally i just need the holes filled in as I have searched and searched and there seems to be no clear path to getting this working even though people are using it and have rebuilt it already.
>>
>> appreciate any help up front
>>
>> Best,
>>
> 
> Just search for "pyqt5 python 2.7 your-os" without the quotes, there's
> loads of hits for linux and its variants, mac and windows.
> 
> --
> My fellow Pythonistas, ask not what our language can do for you, ask
> what you can do for our language.
> 
> Mark Lawrence
> 

One can only conclude that some subscribers are not aware of the 
preference for bottom posting on this list.

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

Mark Lawrence


From s.molnar at sbcglobal.net  Sun Nov 19 11:36:47 2017
From: s.molnar at sbcglobal.net (Stephen P. Molnar)
Date: Sun, 19 Nov 2017 11:36:47 -0500
Subject: [Tutor] AttributeError: 'BezierPath' object has no attribute
 '_draw_solid'
Message-ID: <5A11B31F.7060900@sbcglobal.net>

I have written a short Python 3 script to plot three curves (one plot) 
of data from a FORTRAN program.  Initially the code worked and produced 
the plot which is attached.  I have also attached the code and the input 
data,

In all candor, I don't have the faintest idea as to whst the problem (or 
problens) might be and would greatly appreciate a pointer towards the 
solution.

Thanks in advance.

-- 
Stephen P. Molnar, Ph.D.		Life is a fuzzy set
www.molecular-modeling.net		Stochastic and multivariate
(614)312-7528 (c)
Skype: smolnar1

-------------- next part --------------
       0.150000      1457.204006       998.233839        -0.018612
       0.300000      1344.817934       931.699910        -0.017571
       0.450000      1170.330414       827.700509        -0.015915
       0.600000       951.240195       695.702122        -0.013757
       0.750000       708.832611       547.341272        -0.011238
       0.900000       465.526861       395.074189        -0.008520
       1.050000       242.168335       250.776922        -0.005770
       1.200000        55.640011       124.478386        -0.003147
       1.350000       -82.889238        23.385404        -0.000790
       1.500000      -168.863907       -48.686568         0.001192
       1.650000      -204.304928       -91.423531         0.002725
       1.800000      -196.892849      -107.676083         0.003774
       1.950000      -158.353900      -102.749215         0.004342
       2.100000      -102.425393       -83.440486         0.004465
       2.250000       -42.724395       -56.976574         0.004210
       2.400000         9.160768       -30.003148         0.003659
       2.550000        45.090063        -7.765044         0.002907
       2.700000        61.128133         6.423416         0.002048
       2.850000        57.577347        11.367836         0.001171
       3.000000        38.344275         7.846857         0.000349
       3.150000         9.797326        -1.817135        -0.000359
       3.300000       -20.657232       -14.377418        -0.000917
       3.450000       -46.025084       -26.358616        -0.001307
       3.600000       -60.958617       -34.712347        -0.001528
       3.750000       -62.589086       -37.332393        -0.001596
       3.900000       -50.849425       -33.359410        -0.001536
       4.050000       -28.274206       -23.244463        -0.001380
       4.200000         0.647490        -8.581977        -0.001162
       4.350000        30.419924         8.240844        -0.000915
       4.500000        55.601812        24.504898        -0.000668
       4.650000        71.786890        37.644793        -0.000444
       4.800000        76.337446        45.676179        -0.000259
       4.950000        68.758579        47.497775        -0.000122
       5.100000        50.671170        43.026846        -0.000036
       5.250000        25.414468        33.157608         0.000001
       5.400000        -2.627852        19.562143        -0.000004
       5.550000       -28.841964         4.378077        -0.000039
       5.700000       -49.186470       -10.157324        -0.000095
       5.850000       -60.843330       -22.062653        -0.000159
       6.000000       -62.613119       -29.900128        -0.000219
       6.150000       -55.002707       -32.954002        -0.000264
       6.300000       -40.011347       -31.279440        -0.000284
       6.450000       -20.674231       -25.624738        -0.000272
       6.600000        -0.461617       -17.250484        -0.000223
       6.750000        17.349547        -7.684285        -0.000134
       6.900000        30.217978         1.543060        -0.000007
       7.050000        36.704572         9.135157         0.000153
       7.200000        36.611564        14.205163         0.000340
       7.350000        30.887904        16.366163         0.000542
       7.500000        21.337500        15.730856         0.000745
       7.650000        10.200327        12.830456         0.000931
       7.800000        -0.305538         8.475307         0.001083
       7.950000        -8.392428         3.587153         0.001184
       8.100000       -12.989800        -0.965458         0.001218
       8.250000       -13.865349        -4.501286         0.001173
       8.400000       -11.571637        -6.611087         0.001043
       8.550000        -7.243459        -7.184785         0.000828
       8.700000        -2.298165        -6.384063         0.000537
       8.850000         1.893836        -4.572551         0.000186
       9.000000         4.300063        -2.221752        -0.000202
       9.150000         4.422590         0.187190        -0.000598
       9.300000         2.366936         2.247742        -0.000969
       9.450000        -1.222319         3.685155        -0.001284
       9.600000        -5.337564         4.380342        -0.001511
       9.750000        -8.852834         4.361341        -0.001629
       9.900000       -10.782542         3.769297        -0.001621
      10.050000       -10.499667         2.809727        -0.001487
      10.200000        -7.869748         1.701068        -0.001234
      10.350000        -3.276223         0.631156        -0.000884
      10.500000         2.464059        -0.271036        -0.000469
      10.650000         8.273897        -0.945429        -0.000028
      10.800000        13.038886        -1.394038         0.000399
      10.950000        15.833457        -1.662153         0.000770
      11.100000        16.103771        -1.814211         0.001050
      11.250000        13.771794        -1.911156         0.001215
      11.400000         9.242103        -1.994565         0.001252
      11.550000         3.313230        -2.080285         0.001163
      11.700000        -2.985528        -2.161399         0.000962
      11.850000        -8.596642        -2.217844         0.000678
      12.000000       -12.634473        -2.228480         0.000348
      12.150000       -14.543259        -2.181162         0.000011
      12.300000       -14.183265        -2.077415        -0.000293
      12.450000       -11.831038        -1.930211        -0.000529
      12.600000        -8.097637        -1.755702        -0.000673
      12.750000        -3.785170        -1.561765        -0.000713
      12.900000         0.286255        -1.337475        -0.000649
      13.050000         3.444324        -1.047676        -0.000496
      13.200000         5.289172        -0.635686        -0.000280
      13.350000         5.752874        -0.035101        -0.000031
      13.500000         5.084229         0.810898         0.000214
      13.650000         3.765365         1.926706         0.000424
      13.800000         2.380864         3.283445         0.000570
      13.950000         1.469617         4.786014         0.000637
      14.100000         1.392498         6.272847         0.000617
      14.250000         2.244816         7.530844         0.000516
      14.400000         3.832308         8.324771         0.000351
      14.550000         5.715404         8.437061         0.000146
      14.700000         7.311696         7.711171        -0.000073
      14.850000         8.033953         6.090102        -0.000276
      15.000000         7.433384         3.641765        -0.000439
      15.150000         5.316604         0.564736        -0.000543
      15.300000         1.810210        -2.828748        -0.000580
      15.450000        -2.642187        -6.151479        -0.000548
      15.600000        -7.351504        -8.996319        -0.000458
      15.750000       -11.509884       -10.998722        -0.000323
      15.900000       -14.347438       -11.895943        -0.000165
      16.050000       -15.287336       -11.572105        -0.000005
      16.200000       -14.067416       -10.080444         0.000138
      16.350000       -10.802914        -7.637870         0.000248
      16.500000        -5.976553        -4.591918         0.000313
      16.650000        -0.356722        -1.365240         0.000331
      16.800000         5.141053         1.612947         0.000304
      16.950000         9.622693         3.976462         0.000240
      17.100000        12.381359         5.480370         0.000150
      17.250000        13.027990         6.037313         0.000047
      17.400000        11.560979         5.725370        -0.000056
      17.550000         8.361334         4.766082        -0.000148
      17.700000         4.114364         3.476794        -0.000220
      17.850000        -0.326569         2.206282        -0.000267
      18.000000        -4.107304         1.265785        -0.000287
      18.150000        -6.538177         0.868443        -0.000282
      18.300000        -7.224883         1.088608        -0.000252
      18.450000        -6.139379         1.848705        -0.000204
      18.600000        -3.617297         2.936154        -0.000139
      18.750000        -0.282930         4.047106        -0.000062
      18.900000         3.082729         4.848645         0.000024
      19.050000         5.704201         5.047554         0.000114
      19.200000         6.971360         4.452410         0.000206
      19.350000         6.564880         3.017031         0.000294
      19.500000         4.522214         0.856722         0.000374
      19.650000         1.230971        -1.766056         0.000438
      19.800000        -2.648913        -4.484225         0.000481
      19.950000        -6.318611        -6.889144         0.000496
      20.100000        -9.002726        -8.602539         0.000477
      20.250000       -10.107995        -9.344044         0.000422
      20.400000        -9.346550        -8.981821         0.000330
      20.550000        -6.798915        -7.556928         0.000205
      20.700000        -2.903834        -5.276963         0.000055
      20.850000         1.623478        -2.480263        -0.000108
      21.000000         5.928860         0.422670        -0.000271
      21.150000         9.185629         3.019640        -0.000419
      21.300000        10.757201         4.966197        -0.000537
      21.450000        10.323870         6.041463        -0.000612
      21.600000         7.948619         6.180453        -0.000637
      21.750000         4.068745         5.477529        -0.000608
      21.900000        -0.585430         4.161075        -0.000530
      22.050000        -5.129229         2.544839        -0.000409
      22.200000        -8.692916         0.965619        -0.000260
      22.350000       -10.588841        -0.280687        -0.000100
      22.500000       -10.444054        -0.992625         0.000055
      22.650000        -8.272710        -1.096543         0.000188
      22.800000        -4.474256        -0.654048         0.000287
      22.950000         0.242214         0.157064         0.000342
      23.100000         4.992771         1.083970         0.000352
      23.250000         8.886579         1.853469         0.000319
      23.400000        11.194571         2.229163         0.000253
      23.550000        11.486519         2.059953         0.000167
      23.700000         9.710378         1.310590         0.000074
      23.850000         6.199083         0.068697        -0.000010
      24.000000         1.604060        -1.472605        -0.000074
      24.150000        -3.231163        -3.052584        -0.000107
      24.300000        -7.432407        -4.393498        -0.000107
      24.450000       -10.259983        -5.253775        -0.000075
      24.600000       -11.245723        -5.473386        -0.000015
      24.750000       -10.275890        -5.002726         0.000061
      24.900000        -7.604690        -3.909790         0.000143
      25.050000        -3.796750        -2.364759         0.000217
      25.200000         0.389244        -0.605594         0.000273
      25.350000         4.152273         1.108109         0.000301
      25.500000         6.805936         2.543593         0.000298
      25.650000         7.909843         3.536125         0.000263
      25.800000         7.350003         4.014905         0.000199
      25.950000         5.353055         4.009026         0.000113
      26.100000         2.432371         3.632910         0.000015
      26.250000        -0.722508         3.054842        -0.000086
      26.400000        -3.390524         2.455632        -0.000178
      26.550000        -4.968693         1.986324        -0.000255
      26.700000        -5.096709         1.733989        -0.000310
      26.850000        -3.731726         1.702825        -0.000341
      27.000000        -1.158468         1.814569        -0.000347
      27.150000         2.067294         1.928147        -0.000331
      27.300000         5.230689         1.874430        -0.000297
      27.450000         7.602892         1.498788        -0.000250
      27.600000         8.590698         0.702348        -0.000195
      27.750000         7.860842        -0.526952        -0.000137
      27.900000         5.414273        -2.100526        -0.000078
      28.050000         1.595387        -3.836088        -0.000021
      28.200000        -2.966087        -5.484824         0.000033
      28.350000        -7.469726        -6.774045         0.000083
      28.500000       -11.093709        -7.457409         0.000130
      28.650000       -13.150129        -7.363012         0.000173
      28.800000       -13.216479        -6.429907         0.000210
      28.950000       -11.218047        -4.725585         0.000241
      29.100000        -7.445355        -2.440554         0.000261
      29.250000        -2.503302         0.139537         0.000267
      29.400000         2.798296         2.679474         0.000257
      29.550000         7.591889         4.849545         0.000229
      29.700000        11.109157         6.380035         0.000181
      29.850000        12.818104         7.105092         0.000116
      30.000000        12.514665         6.987915         0.000037
      30.150000        10.352073         6.122683        -0.000048

From wrw at mac.com  Sun Nov 19 15:10:40 2017
From: wrw at mac.com (William Ray Wing)
Date: Sun, 19 Nov 2017 15:10:40 -0500
Subject: [Tutor] AttributeError: 'BezierPath' object has no attribute
 '_draw_solid'
In-Reply-To: <5A11B31F.7060900@sbcglobal.net>
References: <5A11B31F.7060900@sbcglobal.net>
Message-ID: <248AF619-AE3B-409A-BB96-937089525B22@mac.com>


> On Nov 19, 2017, at 11:36 AM, Stephen P. Molnar <s.molnar at sbcglobal.net> wrote:
> 
> I have written a short Python 3 script to plot three curves (one plot) of data from a FORTRAN program.  Initially the code worked and produced the plot which is attached.  I have also attached the code and the input data,
> 

The data made it through, neither the script nor the plot did.  If the script really is short, perhaps you could just cut and paste it into a follow-up msg.  Absent that, no one here can help you.

Thanks,
Bill

> In all candor, I don't have the faintest idea as to whst the problem (or problens) might be and would greatly appreciate a pointer towards the solution.
> 
> Thanks in advance.
> 
> -- 
> Stephen P. Molnar, Ph.D.		Life is a fuzzy set
> www.molecular-modeling.net		Stochastic and multivariate
> (614)312-7528 (c)
> Skype: smolnar1
> 
> <A_poutput.txt>_______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor


From wrw at mac.com  Sun Nov 19 16:51:06 2017
From: wrw at mac.com (William Ray Wing)
Date: Sun, 19 Nov 2017 16:51:06 -0500
Subject: [Tutor] AttributeError: 'BezierPath' object has no attribute
 '_draw_solid'
In-Reply-To: <5A11E613.6050509@sbcglobal.net>
References: <5A11B31F.7060900@sbcglobal.net>
 <248AF619-AE3B-409A-BB96-937089525B22@mac.com>
 <5A11E613.6050509@sbcglobal.net>
Message-ID: <52996304-86B9-4037-8CCE-8CE943F1E199@mac.com>


> On Nov 19, 2017, at 3:14 PM, Stephen P. Molnar <s.molnar at sbcglobal.net> wrote:
> 
> 
> On 11/19/2017 03:10 PM, William Ray Wing wrote:
>>> On Nov 19, 2017, at 11:36 AM, Stephen P. Molnar <s.molnar at sbcglobal.net> wrote:
>>> 
>>> I have written a short Python 3 script to plot three curves (one plot) of data from a FORTRAN program.  Initially the code worked and produced the plot which is attached.  I have also attached the code and the input data,
>>> 
>> The data made it through, neither the script nor the plot did.  If the script really is short, perhaps you could just cut and paste it into a follow-up msg.  Absent that, no one here can help you.
>> 
>> Thanks,
>> Bill
>> 
>>> In all candor, I don't have the faintest idea as to whst the problem (or problens) might be and would greatly appreciate a pointer towards the solution.
>>> 
>>> Thanks in advance.
>>> 
>>> -- 
>>> Stephen P. Molnar, Ph.D.		Life is a fuzzy set
>>> www.molecular-modeling.net		Stochastic and multivariate
>>> (614)312-7528 (c)
>>> Skype: smolnar1
>>> 
>>> <A_poutput.txt>_______________________________________________
>>> Tutor maillist  -  Tutor at python.org
>>> To unsubscribe or change subscription options:
>>> https://mail.python.org/mailman/listinfo/tutor
>> 
> 

Unfortunately your mail reader/program has pasted it in as an RTF file and this makes it almost impossible to look at in a text editor or hand to the Python interpreter.  What we see looks like the following (I?ve pasted in the first few lines).
???????????????
Multiple_Plots_2_b.py\
\
Copyright (c) 2017 Stephen P. Molnar, Ph.D. \'a0All rights reserved.\
\
"""\
import numpy as np\
from mpl_toolkits.axes_grid1 import host_subplot\
import mpl_toolkits.axisartist as AA\
import matplotlib.pyplot as plt\
\
data = []\
name = input("Enter Molecule ID: ")\
\
name_in = name+'_poutput'\
data = np.genfromtxt(name_in)\
\
s = data[:,0]\
FTm = data[:,1] \'a0\'a0\'a0\'a0#atomic number\
FTe = data[:,2] \'a0\'a0\'a0\'a0#atomic mass\
FTc = data[:,3] \'a0\'a0\'a0\'a0#atom electron density\
\
\
fig = plt.figure(figsize=(7.6,4))\
\
host = host_subplot(111, axes_class=AA.Axes)\
plt.subplots_adjust(right=0.75)\
\
par1 = host.twinx()\
par2 = host.twinx()\
\
offset = 60\
new_fixed_axis = par2.get_grid_helper().new_fixed_axis\
par2.axis["right"] = new_fixed_axis(loc="right", axes=par2,\
\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0offset=(offset, 0))\
\

-------------------------------


> Here it is:
> 
> #!/usr/bin/env python3
> # -*- coding: utf-8 -*-
> """
> Multiple_Plots_2_b.py
> 
> Copyright (c) 2017 Stephen P. Molnar, Ph.D.  All rights reserved.
> 
> """
> import numpy as np
> from mpl_toolkits.axes_grid1 import host_subplot
> import mpl_toolkits.axisartist as AA
> import matplotlib.pyplot as plt
> 
> data = []
> name = input("Enter Molecule ID: ")
> 
> name_in = name+'_poutput'
> data = np.genfromtxt(name_in)
> 
> s = data[:,0]
> FTm = data[:,1]     #atomic number
> FTe = data[:,2]     #atomic mass
> FTc = data[:,3]     #atom electron density
> 
> 
> fig = plt.figure(figsize=(7.6,4))
> 
> host = host_subplot(111, axes_class=AA.Axes)
> plt.subplots_adjust(right=0.75)
> 
> par1 = host.twinx()
> par2 = host.twinx()
> 
> offset = 60
> new_fixed_axis = par2.get_grid_helper().new_fixed_axis
> par2.axis["right"] = new_fixed_axis(loc="right", axes=par2,
>                                        offset=(offset, 0))
> 
> par2.axis["right"].toggle(all=True)
> 
> host.set_xlim(0, 30)
> """
> host.set_ylim(min(FTm), max(FTm))
> """
> 
> host.set_xlabel("Distance ($\AA$)")
> host.set_ylabel("Atomic Number")
> par1.set_ylabel("Atom Mass")
> par2.set_ylabel("Atom Electron Density")
> 
> p1, = host.plot(data[:,0], data[:,1])#, label="Atomic Number")
> p2, = par1.plot(data[:,0], data[:,2])#, label="Atom Mass")
> p3, = par2.plot(data[:,0], data[:,3])#, label="Atom Electron Density")
> 
> """
> par1.set_ylim(min(FTe), max(FTe))
> par2.set_ylim(min(FTc),max(FTc))
> """
> 
> #host.legend()
> 
> host.axis["left"].label.set_color(p1.get_color())
> par1.axis["right"].label.set_color(p2.get_color())
> par2.axis["right"].label.set_color(p3.get_color())
> 
> host.title.set_text('Molecule {0} - Molecular Transforms'.format(name))
> plt.draw()
> plt.show()
> 
> name_plt = name+'-fig1.png'
> fig.savefig(name_plt,bbox_inches='tight')
> 
> 
> -- 
> Stephen P. Molnar, Ph.D.		Life is a fuzzy set
> www.molecular-modeling.net		Stochastic and multivariate
> (614)312-7528 (c)
> Skype: smolnar1
> 


From s.molnar at sbcglobal.net  Sun Nov 19 15:14:11 2017
From: s.molnar at sbcglobal.net (Stephen P. Molnar)
Date: Sun, 19 Nov 2017 15:14:11 -0500
Subject: [Tutor] AttributeError: 'BezierPath' object has no attribute
 '_draw_solid'
In-Reply-To: <248AF619-AE3B-409A-BB96-937089525B22@mac.com>
References: <5A11B31F.7060900@sbcglobal.net>
 <248AF619-AE3B-409A-BB96-937089525B22@mac.com>
Message-ID: <5A11E613.6050509@sbcglobal.net>


On 11/19/2017 03:10 PM, William Ray Wing wrote:
>> On Nov 19, 2017, at 11:36 AM, Stephen P. Molnar <s.molnar at sbcglobal.net> wrote:
>>
>> I have written a short Python 3 script to plot three curves (one plot) of data from a FORTRAN program.  Initially the code worked and produced the plot which is attached.  I have also attached the code and the input data,
>>
> The data made it through, neither the script nor the plot did.  If the script really is short, perhaps you could just cut and paste it into a follow-up msg.  Absent that, no one here can help you.
>
> Thanks,
> Bill
>
>> In all candor, I don't have the faintest idea as to whst the problem (or problens) might be and would greatly appreciate a pointer towards the solution.
>>
>> Thanks in advance.
>>
>> -- 
>> Stephen P. Molnar, Ph.D.		Life is a fuzzy set
>> www.molecular-modeling.net		Stochastic and multivariate
>> (614)312-7528 (c)
>> Skype: smolnar1
>>
>> <A_poutput.txt>_______________________________________________
>> Tutor maillist  -  Tutor at python.org
>> To unsubscribe or change subscription options:
>> https://mail.python.org/mailman/listinfo/tutor
>

Here it is:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Multiple_Plots_2_b.py

Copyright (c) 2017 Stephen P. Molnar, Ph.D.  All rights reserved.

"""
import numpy as np
from mpl_toolkits.axes_grid1 import host_subplot
import mpl_toolkits.axisartist as AA
import matplotlib.pyplot as plt

data = []
name = input("Enter Molecule ID: ")

name_in = name+'_poutput'
data = np.genfromtxt(name_in)

s = data[:,0]
FTm = data[:,1]     #atomic number
FTe = data[:,2]     #atomic mass
FTc = data[:,3]     #atom electron density


fig = plt.figure(figsize=(7.6,4))

host = host_subplot(111, axes_class=AA.Axes)
plt.subplots_adjust(right=0.75)

par1 = host.twinx()
par2 = host.twinx()

offset = 60
new_fixed_axis = par2.get_grid_helper().new_fixed_axis
par2.axis["right"] = new_fixed_axis(loc="right", axes=par2,
                                         offset=(offset, 0))

par2.axis["right"].toggle(all=True)

host.set_xlim(0, 30)
"""
host.set_ylim(min(FTm), max(FTm))
"""

host.set_xlabel("Distance ($\AA$)")
host.set_ylabel("Atomic Number")
par1.set_ylabel("Atom Mass")
par2.set_ylabel("Atom Electron Density")

p1, = host.plot(data[:,0], data[:,1])#, label="Atomic Number")
p2, = par1.plot(data[:,0], data[:,2])#, label="Atom Mass")
p3, = par2.plot(data[:,0], data[:,3])#, label="Atom Electron Density")

"""
par1.set_ylim(min(FTe), max(FTe))
par2.set_ylim(min(FTc),max(FTc))
"""

#host.legend()

host.axis["left"].label.set_color(p1.get_color())
par1.axis["right"].label.set_color(p2.get_color())
par2.axis["right"].label.set_color(p3.get_color())

host.title.set_text('Molecule {0} - Molecular Transforms'.format(name))
plt.draw()
plt.show()

name_plt = name+'-fig1.png'
fig.savefig(name_plt,bbox_inches='tight')


-- 
Stephen P. Molnar, Ph.D.		Life is a fuzzy set
www.molecular-modeling.net		Stochastic and multivariate
(614)312-7528 (c)
Skype: smolnar1


From alan.gauld at yahoo.co.uk  Sun Nov 19 18:23:24 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Sun, 19 Nov 2017 23:23:24 +0000
Subject: [Tutor] AttributeError: 'BezierPath' object has no attribute
 '_draw_solid'
In-Reply-To: <5A11E613.6050509@sbcglobal.net>
References: <5A11B31F.7060900@sbcglobal.net>
 <248AF619-AE3B-409A-BB96-937089525B22@mac.com>
 <5A11E613.6050509@sbcglobal.net>
Message-ID: <out3p4$tui$1@blaine.gmane.org>

On 19/11/17 20:14, Stephen P. Molnar wrote:

>>> In all candor, I don't have the faintest idea as to whst the problem 
>>> (or problens) might be and would greatly appreciate a pointer towards 
>>> the solution.

You really need to post the entire error message not just the summary line.

Especially since you don't appear to access  _draw_solid in your own 
code so we need to see where that arises.

> Here it is:
> 
> #!/usr/bin/env python3
> # -*- coding: utf-8 -*-
> """
> Multiple_Plots_2_b.py
> 
> Copyright (c) 2017 Stephen P. Molnar, Ph.D.? All rights reserved.
> 
> """
> import numpy as np
> from mpl_toolkits.axes_grid1 import host_subplot
> import mpl_toolkits.axisartist as AA
> import matplotlib.pyplot as plt
> 
> data = []
> name = input("Enter Molecule ID: ")
> 
> name_in = name+'_poutput'
> data = np.genfromtxt(name_in)
> 
> s = data[:,0]
> FTm = data[:,1]???? #atomic number
> FTe = data[:,2]???? #atomic mass
> FTc = data[:,3]???? #atom electron density
> 
> 
> fig = plt.figure(figsize=(7.6,4))
> 
> host = host_subplot(111, axes_class=AA.Axes)
> plt.subplots_adjust(right=0.75)
> 
> par1 = host.twinx()
> par2 = host.twinx()
> 
> offset = 60
> new_fixed_axis = par2.get_grid_helper().new_fixed_axis
> par2.axis["right"] = new_fixed_axis(loc="right", axes=par2,
>  ??????????????????????????????????????? offset=(offset, 0))
> 
> par2.axis["right"].toggle(all=True)
> 
> host.set_xlim(0, 30)
> """
> host.set_ylim(min(FTm), max(FTm))
> """
> 
> host.set_xlabel("Distance ($\AA$)")
> host.set_ylabel("Atomic Number")
> par1.set_ylabel("Atom Mass")
> par2.set_ylabel("Atom Electron Density")
> 
> p1, = host.plot(data[:,0], data[:,1])#, label="Atomic Number")
> p2, = par1.plot(data[:,0], data[:,2])#, label="Atom Mass")
> p3, = par2.plot(data[:,0], data[:,3])#, label="Atom Electron Density")
> 
> """
> par1.set_ylim(min(FTe), max(FTe))
> par2.set_ylim(min(FTc),max(FTc))
> """
> 
> #host.legend()
> 
> host.axis["left"].label.set_color(p1.get_color())
> par1.axis["right"].label.set_color(p2.get_color())
> par2.axis["right"].label.set_color(p3.get_color())
> 
> host.title.set_text('Molecule {0} - Molecular Transforms'.format(name))
> plt.draw()
> plt.show()
> 
> name_plt = name+'-fig1.png'
> fig.savefig(name_plt,bbox_inches='tight')
> 
> 



From mats at wichmann.us  Sun Nov 19 18:24:05 2017
From: mats at wichmann.us (Mats Wichmann)
Date: Sun, 19 Nov 2017 16:24:05 -0700
Subject: [Tutor] AttributeError: 'BezierPath' object has no attribute
 '_draw_solid'
In-Reply-To: <5A11B31F.7060900@sbcglobal.net>
References: <5A11B31F.7060900@sbcglobal.net>
Message-ID: <3323fee0-9636-e50a-f391-3aee859102c5@wichmann.us>

On 11/19/2017 09:36 AM, Stephen P. Molnar wrote:
> I have written a short Python 3 script to plot three curves (one plot)
> of data from a FORTRAN program.? Initially the code worked and produced
> the plot which is attached.? I have also attached the code and the input
> data,
> 
> In all candor, I don't have the faintest idea as to whst the problem (or
> problens) might be and would greatly appreciate a pointer towards the
> solution.


>From here, it's hard to tell... you have an error that indicates
misusing a class named BezierPath by referencing a method or attribute
which does not exist.  This usually is due to a version skew problem -
some code expects a newer version of something than you have (or, if the
developer has been really careless, something has gone away which is
horrid API stability behavior).  But your code doesn't seem to reference
BezierPath at all...  so it must be referenced by something you ARE
calling.  Have you tried an internet search on this?


From steve at pearwood.info  Sun Nov 19 19:02:36 2017
From: steve at pearwood.info (Steven D'Aprano)
Date: Mon, 20 Nov 2017 11:02:36 +1100
Subject: [Tutor] AttributeError: 'BezierPath' object has no attribute
 '_draw_solid'
In-Reply-To: <52996304-86B9-4037-8CCE-8CE943F1E199@mac.com>
References: <5A11B31F.7060900@sbcglobal.net>
 <248AF619-AE3B-409A-BB96-937089525B22@mac.com>
 <5A11E613.6050509@sbcglobal.net>
 <52996304-86B9-4037-8CCE-8CE943F1E199@mac.com>
Message-ID: <20171120000236.GX19802@ando.pearwood.info>

On Sun, Nov 19, 2017 at 04:51:06PM -0500, William Ray Wing wrote:

> Unfortunately your mail reader/program has pasted it in as an RTF file 
> and this makes it almost impossible to look at in a text editor or 
> hand to the Python interpreter.  What we see looks like the following 
> (I?ve pasted in the first few lines).

I don't think that's correct -- it looks like plain text to me. Perhaps 
it is your mail reader (not Stephen's) that has decided to convert it to 
a RTF file? Try the "View Source", if your mail reader provides such a 
thing.



-- 
Steve

From steve at pearwood.info  Sun Nov 19 19:23:53 2017
From: steve at pearwood.info (Steven D'Aprano)
Date: Mon, 20 Nov 2017 11:23:53 +1100
Subject: [Tutor] AttributeError: 'BezierPath' object has no attribute
 '_draw_solid'
In-Reply-To: <5A11E613.6050509@sbcglobal.net>
References: <5A11B31F.7060900@sbcglobal.net>
 <248AF619-AE3B-409A-BB96-937089525B22@mac.com>
 <5A11E613.6050509@sbcglobal.net>
Message-ID: <20171120002353.GY19802@ando.pearwood.info>


On Sun, Nov 19, 2017 at 03:14:11PM -0500, Stephen P. Molnar wrote:

[...]
> >>I have written a short Python 3 script to plot three curves (one plot) of 
> >>data from a FORTRAN program.
[...]

Stephen, please remember that we are volunteers offering services for 
free, not paid consultants. If you want our help, you maximise the 
chances that we will do so by making things as easy as possible for us, 
rather than just dropping a big ball of mud in our laps and expecting us 
to sort it all out.

If we were charging by the hour, and you had an unlimited budget, we'd 
be more than happy to do all the preparation for you. But since we 
aren't, you are relying on our good-will to get answers. If you make it 
hard for us, and your problem looks boring, then you are unlikely to get 
much, if any, help.

Please help us to help you:

- If you get an error, copy and paste the ENTIRE error message, 
  starting with the "Traceback" line, not just the final line.

- Provide a MINIMAL set of data that exposes the problem, the 
  smaller the better. We shouldn't have to wade through hundreds
  of data points looking for the one which causes the problem.

- Simplify your code to the MINIMUM required to demonstrate the
  problem.

- Make sure that the code you send us actually works, in the
  sense that it will run and show the error you claim it shows.
  If we cannot run your code, we cannot debug it.

- Ensure your code and data are ATTACHED to the email as separate 
  files, not copy and pasted into the body. We should be able to 
  save the files directly to our own computers without the risk
  of introducing formatting changes caused by going through an
  intermediate email format.

It may help if you read this:

http://sscce.org/

It is written for Java programmers, but the principles apply to everyone 
regardless of the language they are using.


Thank you.



-- 
Steve

From haziq2ros at gmail.com  Sun Nov 19 21:05:14 2017
From: haziq2ros at gmail.com (haziq roslan)
Date: Mon, 20 Nov 2017 10:05:14 +0800
Subject: [Tutor] Need assistance
Message-ID: <CABDQsXx7SKa_68qHCYd0xKjQ6d7W4rEELbmwZAq__oaUpdB2Mg@mail.gmail.com>

Hye guys, Im Haziq from Malaysia. Anyone can lend me a hand to do my
assignment? I have no idea how to do this task. Please reply me if you
interested.
Your kindness is really appreciated.

From alan.gauld at yahoo.co.uk  Mon Nov 20 05:26:50 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Mon, 20 Nov 2017 10:26:50 +0000
Subject: [Tutor] AttributeError: 'BezierPath' object has no attribute
 '_draw_solid'
In-Reply-To: <20171120002353.GY19802@ando.pearwood.info>
References: <5A11B31F.7060900@sbcglobal.net>
 <248AF619-AE3B-409A-BB96-937089525B22@mac.com>
 <5A11E613.6050509@sbcglobal.net> <20171120002353.GY19802@ando.pearwood.info>
Message-ID: <ouual2$1sd$1@blaine.gmane.org>


I'll echo everything Steve says except:

On 20/11/17 00:23, Steven D'Aprano wrote:
> - Ensure your code and data are ATTACHED to the email as separate
>    files, not copy and pasted into the body. We should be able to
>    save the files directly to our own computers without the risk
>    of introducing formatting changes caused by going through an
>    intermediate email format.

Actually, pasting code etc is safer since the server removes
attachments. And while it is supposed to preserve plain text
attachments it will throw them away if it sees *anything*
that it thinks looks like binary. Also some readers are on
corporate accounts that strip all attachments regardless
of type, so attachments are a bit of a gamble.

So provided it not too big (and it wont be if you followed
Steven's other advice) just paste it in the body.

Alan g.


From steve at pearwood.info  Mon Nov 20 06:24:50 2017
From: steve at pearwood.info (Steven D'Aprano)
Date: Mon, 20 Nov 2017 22:24:50 +1100
Subject: [Tutor] AttributeError: 'BezierPath' object has no attribute
 '_draw_solid'
In-Reply-To: <ouual2$1sd$1@blaine.gmane.org>
References: <5A11B31F.7060900@sbcglobal.net>
 <248AF619-AE3B-409A-BB96-937089525B22@mac.com>
 <5A11E613.6050509@sbcglobal.net> <20171120002353.GY19802@ando.pearwood.info>
 <ouual2$1sd$1@blaine.gmane.org>
Message-ID: <20171120112450.GD19802@ando.pearwood.info>

On Mon, Nov 20, 2017 at 10:26:50AM +0000, Alan Gauld via Tutor wrote:

> Actually, pasting code etc is safer since the server removes
> attachments. And while it is supposed to preserve plain text
> attachments it will throw them away if it sees *anything*
> that it thinks looks like binary.

Let's do a test and see what happens! Attached is a .py file in UTF-8. 
If that passes through, I think we're good :-)


> Also some readers are on
> corporate accounts that strip all attachments regardless
> of type

Given the popularity of HTML email, corporate logos attached as images, 
and the ubiquity of emailing PDF and DOC/DOCX files in the business 
world, I would be stunned to come across any corporation that stripped 
all attachements.

-- 
Steve
-------------- next part --------------
# Testing

if __name__ == '__main__':
    print("Hello World! ??? ? ? ?")


From breamoreboy at gmail.com  Mon Nov 20 06:39:13 2017
From: breamoreboy at gmail.com (Mark Lawrence)
Date: Mon, 20 Nov 2017 11:39:13 +0000
Subject: [Tutor] Need assistance
In-Reply-To: <CABDQsXx7SKa_68qHCYd0xKjQ6d7W4rEELbmwZAq__oaUpdB2Mg@mail.gmail.com>
References: <CABDQsXx7SKa_68qHCYd0xKjQ6d7W4rEELbmwZAq__oaUpdB2Mg@mail.gmail.com>
Message-ID: <ouuesq$vt0$1@blaine.gmane.org>

On 20/11/17 02:05, haziq roslan wrote:
> Hye guys, Im Haziq from Malaysia. Anyone can lend me a hand to do my
> assignment? I have no idea how to do this task. Please reply me if you
> interested.
> Your kindness is really appreciated.
> 

This list does not work like that.  You tell us what the assignment is 
and show us the code that you have written, then we give you hints on 
how to proceed.

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

Mark Lawrence


From steve at pearwood.info  Mon Nov 20 06:47:03 2017
From: steve at pearwood.info (Steven D'Aprano)
Date: Mon, 20 Nov 2017 22:47:03 +1100
Subject: [Tutor] Need assistance
In-Reply-To: <CABDQsXx7SKa_68qHCYd0xKjQ6d7W4rEELbmwZAq__oaUpdB2Mg@mail.gmail.com>
References: <CABDQsXx7SKa_68qHCYd0xKjQ6d7W4rEELbmwZAq__oaUpdB2Mg@mail.gmail.com>
Message-ID: <20171120114702.GE19802@ando.pearwood.info>

On Mon, Nov 20, 2017 at 10:05:14AM +0800, haziq roslan wrote:
> Hye guys, Im Haziq from Malaysia. Anyone can lend me a hand to do my
> assignment? I have no idea how to do this task.

Neither do we. What task?

If you want help, please tell us what the task is, show us the code you 
have written to solve it, and what results you get.


> Please reply me if you interested.

After this email, all my responses will go to the list. Please keep 
replies on the mailing list, so others can learn from your questions.



-- 
Steve

From s.molnar at sbcglobal.net  Mon Nov 20 08:18:41 2017
From: s.molnar at sbcglobal.net (Stephen P. Molnar)
Date: Mon, 20 Nov 2017 08:18:41 -0500
Subject: [Tutor] AttributeError: 'BezierPath' object has no attribute
 '_draw_solid'
In-Reply-To: <20171120112450.GD19802@ando.pearwood.info>
References: <5A11B31F.7060900@sbcglobal.net>
 <248AF619-AE3B-409A-BB96-937089525B22@mac.com>
 <5A11E613.6050509@sbcglobal.net> <20171120002353.GY19802@ando.pearwood.info>
 <ouual2$1sd$1@blaine.gmane.org> <20171120112450.GD19802@ando.pearwood.info>
Message-ID: <5A12D631.5010302@sbcglobal.net>


On 11/20/2017 06:24 AM, Steven D'Aprano wrote:
> On Mon, Nov 20, 2017 at 10:26:50AM +0000, Alan Gauld via Tutor wrote:
>
>> Actually, pasting code etc is safer since the server removes
>> attachments. And while it is supposed to preserve plain text
>> attachments it will throw them away if it sees *anything*
>> that it thinks looks like binary.
> Let's do a test and see what happens! Attached is a .py file in UTF-8.
> If that passes through, I think we're good :-)
>
>
>> Also some readers are on
>> corporate accounts that strip all attachments regardless
>> of type
> Given the popularity of HTML email, corporate logos attached as images,
> and the ubiquity of emailing PDF and DOC/DOCX files in the business
> world, I would be stunned to come across any corporation that stripped
> all attachements.
>
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor

Many thanks.  Indeed it worked!

I'm not really looking for someone to do the programming for me.  I know 
that the code works, because it did and produced the attached plot. I 
just don't know why it stopped working.  Actually, all of my programming 
experience has been with FORTRAN, starting with II in 1961 (yes, I am 
rather an old... an Organic Chemist.

Let's start over,

This is the code:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Multiple_Plots_2_b.py

Copyright (c) 2017 Stephen P. Molnar, Ph.D.  All rights reserved.

"""
import numpy as np
from mpl_toolkits.axes_grid1 import host_subplot
import mpl_toolkits.axisartist as AA
import matplotlib.pyplot as plt

data = []
name = input("Enter Molecule ID: ")

name_in = name+'_poutput'
data = np.genfromtxt(name_in)

s = data[:,0]
FTm = data[:,1]     #atomic number
FTe = data[:,2]     #atomic mass
FTc = data[:,3]     #atom electron density


fig = plt.figure(figsize=(7.6,4))

host = host_subplot(111, axes_class=AA.Axes)
plt.subplots_adjust(right=0.75)

par1 = host.twinx()
par2 = host.twinx()

offset = 60
new_fixed_axis = par2.get_grid_helper().new_fixed_axis
par2.axis["right"] = new_fixed_axis(loc="right", axes=par2,
                                         offset=(offset, 0))

par2.axis["right"].toggle(all=True)

host.set_xlim(0, 30)
"""
host.set_ylim(min(FTm), max(FTm))
"""

host.set_xlabel("Distance ($\AA$)")
host.set_ylabel("Atomic Number")
par1.set_ylabel("Atom Mass")
par2.set_ylabel("Atom Electron Density")

p1, = host.plot(data[:,0], data[:,1])#, label="Atomic Number")
p2, = par1.plot(data[:,0], data[:,2])#, label="Atom Mass")
p3, = par2.plot(data[:,0], data[:,3])#, label="Atom Electron Density")

"""
par1.set_ylim(min(FTe), max(FTe))
par2.set_ylim(min(FTc),max(FTc))
"""

#host.legend()

host.axis["left"].label.set_color(p1.get_color())
par1.axis["right"].label.set_color(p2.get_color())
par2.axis["right"].label.set_color(p3.get_color())

host.title.set_text('Molecule {0} - Molecular Transforms'.format(name))
plt.draw()
plt.show()

name_plt = name+'-fig1.png'
fig.savefig(name_plt,bbox_inches='tight')


And the input file A_poutput:

        0.150000      1457.204006       998.233839        -0.018612
        0.300000      1344.817934       931.699910        -0.017571
        0.450000      1170.330414       827.700509        -0.015915
        0.600000       951.240195       695.702122        -0.013757
        0.750000       708.832611       547.341272        -0.011238
        0.900000       465.526861       395.074189        -0.008520
        1.050000       242.168335       250.776922        -0.005770
        1.200000        55.640011       124.478386        -0.003147
        1.350000       -82.889238        23.385404        -0.000790
        1.500000      -168.863907       -48.686568         0.001192
        1.650000      -204.304928       -91.423531         0.002725
        1.800000      -196.892849      -107.676083         0.003774
        1.950000      -158.353900      -102.749215         0.004342
        2.100000      -102.425393       -83.440486         0.004465
        2.250000       -42.724395       -56.976574         0.004210
        2.400000         9.160768       -30.003148         0.003659
        2.550000        45.090063        -7.765044         0.002907
        2.700000        61.128133         6.423416         0.002048
        2.850000        57.577347        11.367836         0.001171
        3.000000        38.344275         7.846857         0.000349
        3.150000         9.797326        -1.817135        -0.000359
        3.300000       -20.657232       -14.377418        -0.000917
        3.450000       -46.025084       -26.358616        -0.001307
        3.600000       -60.958617       -34.712347        -0.001528
        3.750000       -62.589086       -37.332393        -0.001596
        3.900000       -50.849425       -33.359410        -0.001536
        4.050000       -28.274206       -23.244463        -0.001380
        4.200000         0.647490        -8.581977        -0.001162
        4.350000        30.419924         8.240844        -0.000915
        4.500000        55.601812        24.504898        -0.000668
        4.650000        71.786890        37.644793        -0.000444
        4.800000        76.337446        45.676179        -0.000259
        4.950000        68.758579        47.497775        -0.000122
        5.100000        50.671170        43.026846        -0.000036
        5.250000        25.414468        33.157608         0.000001
        5.400000        -2.627852        19.562143        -0.000004
        5.550000       -28.841964         4.378077        -0.000039
        5.700000       -49.186470       -10.157324        -0.000095
        5.850000       -60.843330       -22.062653        -0.000159
        6.000000       -62.613119       -29.900128        -0.000219
        6.150000       -55.002707       -32.954002        -0.000264
        6.300000       -40.011347       -31.279440        -0.000284
        6.450000       -20.674231       -25.624738        -0.000272
        6.600000        -0.461617       -17.250484        -0.000223
        6.750000        17.349547        -7.684285        -0.000134
        6.900000        30.217978         1.543060        -0.000007
        7.050000        36.704572         9.135157         0.000153
        7.200000        36.611564        14.205163         0.000340
        7.350000        30.887904        16.366163         0.000542
        7.500000        21.337500        15.730856         0.000745
        7.650000        10.200327        12.830456         0.000931
        7.800000        -0.305538         8.475307         0.001083
        7.950000        -8.392428         3.587153         0.001184
        8.100000       -12.989800        -0.965458         0.001218
        8.250000       -13.865349        -4.501286         0.001173
        8.400000       -11.571637        -6.611087         0.001043
        8.550000        -7.243459        -7.184785         0.000828
        8.700000        -2.298165        -6.384063         0.000537
        8.850000         1.893836        -4.572551         0.000186
        9.000000         4.300063        -2.221752        -0.000202
        9.150000         4.422590         0.187190        -0.000598
        9.300000         2.366936         2.247742        -0.000969
        9.450000        -1.222319         3.685155        -0.001284
        9.600000        -5.337564         4.380342        -0.001511
        9.750000        -8.852834         4.361341        -0.001629
        9.900000       -10.782542         3.769297        -0.001621
       10.050000       -10.499667         2.809727        -0.001487
       10.200000        -7.869748         1.701068        -0.001234
       10.350000        -3.276223         0.631156        -0.000884
       10.500000         2.464059        -0.271036        -0.000469
       10.650000         8.273897        -0.945429        -0.000028
       10.800000        13.038886        -1.394038         0.000399
       10.950000        15.833457        -1.662153         0.000770
       11.100000        16.103771        -1.814211         0.001050
       11.250000        13.771794        -1.911156         0.001215
       11.400000         9.242103        -1.994565         0.001252
       11.550000         3.313230        -2.080285         0.001163
       11.700000        -2.985528        -2.161399         0.000962
       11.850000        -8.596642        -2.217844         0.000678
       12.000000       -12.634473        -2.228480         0.000348
       12.150000       -14.543259        -2.181162         0.000011
       12.300000       -14.183265        -2.077415        -0.000293
       12.450000       -11.831038        -1.930211        -0.000529
       12.600000        -8.097637        -1.755702        -0.000673
       12.750000        -3.785170        -1.561765        -0.000713
       12.900000         0.286255        -1.337475        -0.000649
       13.050000         3.444324        -1.047676        -0.000496
       13.200000         5.289172        -0.635686        -0.000280
       13.350000         5.752874        -0.035101        -0.000031
       13.500000         5.084229         0.810898         0.000214
       13.650000         3.765365         1.926706         0.000424
       13.800000         2.380864         3.283445         0.000570
       13.950000         1.469617         4.786014         0.000637
       14.100000         1.392498         6.272847         0.000617
       14.250000         2.244816         7.530844         0.000516
       14.400000         3.832308         8.324771         0.000351
       14.550000         5.715404         8.437061         0.000146
       14.700000         7.311696         7.711171        -0.000073
       14.850000         8.033953         6.090102        -0.000276
       15.000000         7.433384         3.641765        -0.000439
       15.150000         5.316604         0.564736        -0.000543
       15.300000         1.810210        -2.828748        -0.000580
       15.450000        -2.642187        -6.151479        -0.000548
       15.600000        -7.351504        -8.996319        -0.000458
       15.750000       -11.509884       -10.998722        -0.000323
       15.900000       -14.347438       -11.895943        -0.000165
       16.050000       -15.287336       -11.572105        -0.000005
       16.200000       -14.067416       -10.080444         0.000138
       16.350000       -10.802914        -7.637870         0.000248
       16.500000        -5.976553        -4.591918         0.000313
       16.650000        -0.356722        -1.365240         0.000331
       16.800000         5.141053         1.612947         0.000304
       16.950000         9.622693         3.976462         0.000240
       17.100000        12.381359         5.480370         0.000150
       17.250000        13.027990         6.037313         0.000047
       17.400000        11.560979         5.725370        -0.000056
       17.550000         8.361334         4.766082        -0.000148
       17.700000         4.114364         3.476794        -0.000220
       17.850000        -0.326569         2.206282        -0.000267
       18.000000        -4.107304         1.265785        -0.000287
       18.150000        -6.538177         0.868443        -0.000282
       18.300000        -7.224883         1.088608        -0.000252
       18.450000        -6.139379         1.848705        -0.000204
       18.600000        -3.617297         2.936154        -0.000139
       18.750000        -0.282930         4.047106        -0.000062
       18.900000         3.082729         4.848645         0.000024
       19.050000         5.704201         5.047554         0.000114
       19.200000         6.971360         4.452410         0.000206
       19.350000         6.564880         3.017031         0.000294
       19.500000         4.522214         0.856722         0.000374
       19.650000         1.230971        -1.766056         0.000438
       19.800000        -2.648913        -4.484225         0.000481
       19.950000        -6.318611        -6.889144         0.000496
       20.100000        -9.002726        -8.602539         0.000477
       20.250000       -10.107995        -9.344044         0.000422
       20.400000        -9.346550        -8.981821         0.000330
       20.550000        -6.798915        -7.556928         0.000205
       20.700000        -2.903834        -5.276963         0.000055
       20.850000         1.623478        -2.480263        -0.000108
       21.000000         5.928860         0.422670        -0.000271
       21.150000         9.185629         3.019640        -0.000419
       21.300000        10.757201         4.966197        -0.000537
       21.450000        10.323870         6.041463        -0.000612
       21.600000         7.948619         6.180453        -0.000637
       21.750000         4.068745         5.477529        -0.000608
       21.900000        -0.585430         4.161075        -0.000530
       22.050000        -5.129229         2.544839        -0.000409
       22.200000        -8.692916         0.965619        -0.000260
       22.350000       -10.588841        -0.280687        -0.000100
       22.500000       -10.444054        -0.992625         0.000055
       22.650000        -8.272710        -1.096543         0.000188
       22.800000        -4.474256        -0.654048         0.000287
       22.950000         0.242214         0.157064         0.000342
       23.100000         4.992771         1.083970         0.000352
       23.250000         8.886579         1.853469         0.000319
       23.400000        11.194571         2.229163         0.000253
       23.550000        11.486519         2.059953         0.000167
       23.700000         9.710378         1.310590         0.000074
       23.850000         6.199083         0.068697        -0.000010
       24.000000         1.604060        -1.472605        -0.000074
       24.150000        -3.231163        -3.052584        -0.000107
       24.300000        -7.432407        -4.393498        -0.000107
       24.450000       -10.259983        -5.253775        -0.000075
       24.600000       -11.245723        -5.473386        -0.000015
       24.750000       -10.275890        -5.002726         0.000061
       24.900000        -7.604690        -3.909790         0.000143
       25.050000        -3.796750        -2.364759         0.000217
       25.200000         0.389244        -0.605594         0.000273
       25.350000         4.152273         1.108109         0.000301
       25.500000         6.805936         2.543593         0.000298
       25.650000         7.909843         3.536125         0.000263
       25.800000         7.350003         4.014905         0.000199
       25.950000         5.353055         4.009026         0.000113
       26.100000         2.432371         3.632910         0.000015
       26.250000        -0.722508         3.054842        -0.000086
       26.400000        -3.390524         2.455632        -0.000178
       26.550000        -4.968693         1.986324        -0.000255
       26.700000        -5.096709         1.733989        -0.000310
       26.850000        -3.731726         1.702825        -0.000341
       27.000000        -1.158468         1.814569        -0.000347
       27.150000         2.067294         1.928147        -0.000331
       27.300000         5.230689         1.874430        -0.000297
       27.450000         7.602892         1.498788        -0.000250
       27.600000         8.590698         0.702348        -0.000195
       27.750000         7.860842        -0.526952        -0.000137
       27.900000         5.414273        -2.100526        -0.000078
       28.050000         1.595387        -3.836088        -0.000021
       28.200000        -2.966087        -5.484824         0.000033
       28.350000        -7.469726        -6.774045         0.000083
       28.500000       -11.093709        -7.457409         0.000130
       28.650000       -13.150129        -7.363012         0.000173
       28.800000       -13.216479        -6.429907         0.000210
       28.950000       -11.218047        -4.725585         0.000241
       29.100000        -7.445355        -2.440554         0.000261
       29.250000        -2.503302         0.139537         0.000267
       29.400000         2.798296         2.679474         0.000257
       29.550000         7.591889         4.849545         0.000229
       29.700000        11.109157         6.380035         0.000181
       29.850000        12.818104         7.105092         0.000116
       30.000000        12.514665         6.987915         0.000037
       30.150000        10.352073         6.122683        -0.000048

Incidentally, my email client is FossaMail and I do not send html emails.

-- 
Stephen P. Molnar, Ph.D.		Life is a fuzzy set
www.molecular-modeling.net		Stochastic and multivariate
(614)312-7528 (c)
Skype: smolnar1

-------------- next part --------------

runfile('/home/comp/Apps/Python/Plot_T_Data/MultiplePlots_3.py', wdir='/home/comp/Apps/Python/Plot_T_Data')

Enter Molecule ID: A
Traceback (most recent call last):

  File "<ipython-input-22-d74ad7d779d0>", line 1, in <module>
    runfile('/home/comp/Apps/Python/Plot_T_Data/MultiplePlots_3.py', wdir='/home/comp/Apps/Python/Plot_T_Data')

  File "/usr/local/lib/python3.5/dist-packages/spyder/utils/site/sitecustomize.py", line 688, in runfile
    execfile(filename, namespace)

  File "/usr/local/lib/python3.5/dist-packages/spyder/utils/site/sitecustomize.py", line 101, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "/home/comp/Apps/Python/Plot_T_Data/MultiplePlots_3.py", line 67, in <module>
    plt.draw()

  File "/usr/local/lib/python3.5/dist-packages/matplotlib/pyplot.py", line 691, in draw
    get_current_fig_manager().canvas.draw_idle()

  File "/usr/local/lib/python3.5/dist-packages/matplotlib/backend_bases.py", line 2053, in draw_idle
    self.draw(*args, **kwargs)

  File "/usr/local/lib/python3.5/dist-packages/matplotlib/backends/backend_agg.py", line 430, in draw
    self.figure.draw(self.renderer)

  File "/usr/local/lib/python3.5/dist-packages/matplotlib/artist.py", line 55, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)

  File "/usr/local/lib/python3.5/dist-packages/matplotlib/figure.py", line 1295, in draw
    renderer, self, artists, self.suppressComposite)

  File "/usr/local/lib/python3.5/dist-packages/matplotlib/image.py", line 138, in _draw_list_compositing_images
    a.draw(renderer)

  File "/usr/lib/python3/dist-packages/mpl_toolkits/axes_grid1/parasite_axes.py", line 295, in draw
    self._get_base_axes_attr("draw")(self, renderer)

  File "/usr/lib/python3/dist-packages/mpl_toolkits/axisartist/axislines.py", line 778, in draw
    super(Axes, self).draw(renderer, inframe)

  File "/usr/local/lib/python3.5/dist-packages/matplotlib/artist.py", line 55, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)

  File "/usr/local/lib/python3.5/dist-packages/matplotlib/axes/_base.py", line 2399, in draw
    mimage._draw_list_compositing_images(renderer, self, artists)

  File "/usr/local/lib/python3.5/dist-packages/matplotlib/image.py", line 138, in _draw_list_compositing_images
    a.draw(renderer)

  File "/usr/local/lib/python3.5/dist-packages/matplotlib/artist.py", line 55, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)

  File "/usr/lib/python3/dist-packages/mpl_toolkits/axisartist/axis_artist.py", line 1572, in draw
    self._draw_line(renderer)

  File "/usr/lib/python3/dist-packages/mpl_toolkits/axisartist/axis_artist.py", line 1170, in _draw_line
    self.line.draw(renderer)

  File "/usr/lib/python3/dist-packages/mpl_toolkits/axisartist/axis_artist.py", line 163, in draw
    lineFunc = getattr(self, funcname)

AttributeError: 'BezierPath' object has no attribute '_draw_solid'

Traceback (most recent call last):

  File "/home/comp/.local/lib/python3.5/site-packages/IPython/core/formatters.py", line 332, in __call__
    return printer(obj)

  File "/home/comp/.local/lib/python3.5/site-packages/IPython/core/pylabtools.py", line 237, in <lambda>
    png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png', **kwargs))

  File "/home/comp/.local/lib/python3.5/site-packages/IPython/core/pylabtools.py", line 121, in print_figure
    fig.canvas.print_figure(bytes_io, **kw)

  File "/usr/local/lib/python3.5/dist-packages/matplotlib/backend_bases.py", line 2208, in print_figure
    **kwargs)

  File "/usr/local/lib/python3.5/dist-packages/matplotlib/backends/backend_agg.py", line 507, in print_png
    FigureCanvasAgg.draw(self)

  File "/usr/local/lib/python3.5/dist-packages/matplotlib/backends/backend_agg.py", line 430, in draw
    self.figure.draw(self.renderer)

  File "/usr/local/lib/python3.5/dist-packages/matplotlib/artist.py", line 55, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)

  File "/usr/local/lib/python3.5/dist-packages/matplotlib/figure.py", line 1295, in draw
    renderer, self, artists, self.suppressComposite)

  File "/usr/local/lib/python3.5/dist-packages/matplotlib/image.py", line 138, in _draw_list_compositing_images
    a.draw(renderer)

  File "/usr/lib/python3/dist-packages/mpl_toolkits/axes_grid1/parasite_axes.py", line 295, in draw
    self._get_base_axes_attr("draw")(self, renderer)

  File "/usr/lib/python3/dist-packages/mpl_toolkits/axisartist/axislines.py", line 778, in draw
    super(Axes, self).draw(renderer, inframe)

  File "/usr/local/lib/python3.5/dist-packages/matplotlib/artist.py", line 55, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)

  File "/usr/local/lib/python3.5/dist-packages/matplotlib/axes/_base.py", line 2399, in draw
    mimage._draw_list_compositing_images(renderer, self, artists)

  File "/usr/local/lib/python3.5/dist-packages/matplotlib/image.py", line 138, in _draw_list_compositing_images
    a.draw(renderer)

  File "/usr/local/lib/python3.5/dist-packages/matplotlib/artist.py", line 55, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)

  File "/usr/lib/python3/dist-packages/mpl_toolkits/axisartist/axis_artist.py", line 1572, in draw
    self._draw_line(renderer)

  File "/usr/lib/python3/dist-packages/mpl_toolkits/axisartist/axis_artist.py", line 1170, in _draw_line
    self.line.draw(renderer)

  File "/usr/lib/python3/dist-packages/mpl_toolkits/axisartist/axis_artist.py", line 163, in draw
    lineFunc = getattr(self, funcname)

AttributeError: 'BezierPath' object has no attribute '_draw_solid'

<matplotlib.figure.Figure at 0x7f92fc3f8be0>

-------------- next part --------------
       0.150000      1457.204006       998.233839        -0.018612
       0.300000      1344.817934       931.699910        -0.017571
       0.450000      1170.330414       827.700509        -0.015915
       0.600000       951.240195       695.702122        -0.013757
       0.750000       708.832611       547.341272        -0.011238
       0.900000       465.526861       395.074189        -0.008520
       1.050000       242.168335       250.776922        -0.005770
       1.200000        55.640011       124.478386        -0.003147
       1.350000       -82.889238        23.385404        -0.000790
       1.500000      -168.863907       -48.686568         0.001192
       1.650000      -204.304928       -91.423531         0.002725
       1.800000      -196.892849      -107.676083         0.003774
       1.950000      -158.353900      -102.749215         0.004342
       2.100000      -102.425393       -83.440486         0.004465
       2.250000       -42.724395       -56.976574         0.004210
       2.400000         9.160768       -30.003148         0.003659
       2.550000        45.090063        -7.765044         0.002907
       2.700000        61.128133         6.423416         0.002048
       2.850000        57.577347        11.367836         0.001171
       3.000000        38.344275         7.846857         0.000349
       3.150000         9.797326        -1.817135        -0.000359
       3.300000       -20.657232       -14.377418        -0.000917
       3.450000       -46.025084       -26.358616        -0.001307
       3.600000       -60.958617       -34.712347        -0.001528
       3.750000       -62.589086       -37.332393        -0.001596
       3.900000       -50.849425       -33.359410        -0.001536
       4.050000       -28.274206       -23.244463        -0.001380
       4.200000         0.647490        -8.581977        -0.001162
       4.350000        30.419924         8.240844        -0.000915
       4.500000        55.601812        24.504898        -0.000668
       4.650000        71.786890        37.644793        -0.000444
       4.800000        76.337446        45.676179        -0.000259
       4.950000        68.758579        47.497775        -0.000122
       5.100000        50.671170        43.026846        -0.000036
       5.250000        25.414468        33.157608         0.000001
       5.400000        -2.627852        19.562143        -0.000004
       5.550000       -28.841964         4.378077        -0.000039
       5.700000       -49.186470       -10.157324        -0.000095
       5.850000       -60.843330       -22.062653        -0.000159
       6.000000       -62.613119       -29.900128        -0.000219
       6.150000       -55.002707       -32.954002        -0.000264
       6.300000       -40.011347       -31.279440        -0.000284
       6.450000       -20.674231       -25.624738        -0.000272
       6.600000        -0.461617       -17.250484        -0.000223
       6.750000        17.349547        -7.684285        -0.000134
       6.900000        30.217978         1.543060        -0.000007
       7.050000        36.704572         9.135157         0.000153
       7.200000        36.611564        14.205163         0.000340
       7.350000        30.887904        16.366163         0.000542
       7.500000        21.337500        15.730856         0.000745
       7.650000        10.200327        12.830456         0.000931
       7.800000        -0.305538         8.475307         0.001083
       7.950000        -8.392428         3.587153         0.001184
       8.100000       -12.989800        -0.965458         0.001218
       8.250000       -13.865349        -4.501286         0.001173
       8.400000       -11.571637        -6.611087         0.001043
       8.550000        -7.243459        -7.184785         0.000828
       8.700000        -2.298165        -6.384063         0.000537
       8.850000         1.893836        -4.572551         0.000186
       9.000000         4.300063        -2.221752        -0.000202
       9.150000         4.422590         0.187190        -0.000598
       9.300000         2.366936         2.247742        -0.000969
       9.450000        -1.222319         3.685155        -0.001284
       9.600000        -5.337564         4.380342        -0.001511
       9.750000        -8.852834         4.361341        -0.001629
       9.900000       -10.782542         3.769297        -0.001621
      10.050000       -10.499667         2.809727        -0.001487
      10.200000        -7.869748         1.701068        -0.001234
      10.350000        -3.276223         0.631156        -0.000884
      10.500000         2.464059        -0.271036        -0.000469
      10.650000         8.273897        -0.945429        -0.000028
      10.800000        13.038886        -1.394038         0.000399
      10.950000        15.833457        -1.662153         0.000770
      11.100000        16.103771        -1.814211         0.001050
      11.250000        13.771794        -1.911156         0.001215
      11.400000         9.242103        -1.994565         0.001252
      11.550000         3.313230        -2.080285         0.001163
      11.700000        -2.985528        -2.161399         0.000962
      11.850000        -8.596642        -2.217844         0.000678
      12.000000       -12.634473        -2.228480         0.000348
      12.150000       -14.543259        -2.181162         0.000011
      12.300000       -14.183265        -2.077415        -0.000293
      12.450000       -11.831038        -1.930211        -0.000529
      12.600000        -8.097637        -1.755702        -0.000673
      12.750000        -3.785170        -1.561765        -0.000713
      12.900000         0.286255        -1.337475        -0.000649
      13.050000         3.444324        -1.047676        -0.000496
      13.200000         5.289172        -0.635686        -0.000280
      13.350000         5.752874        -0.035101        -0.000031
      13.500000         5.084229         0.810898         0.000214
      13.650000         3.765365         1.926706         0.000424
      13.800000         2.380864         3.283445         0.000570
      13.950000         1.469617         4.786014         0.000637
      14.100000         1.392498         6.272847         0.000617
      14.250000         2.244816         7.530844         0.000516
      14.400000         3.832308         8.324771         0.000351
      14.550000         5.715404         8.437061         0.000146
      14.700000         7.311696         7.711171        -0.000073
      14.850000         8.033953         6.090102        -0.000276
      15.000000         7.433384         3.641765        -0.000439
      15.150000         5.316604         0.564736        -0.000543
      15.300000         1.810210        -2.828748        -0.000580
      15.450000        -2.642187        -6.151479        -0.000548
      15.600000        -7.351504        -8.996319        -0.000458
      15.750000       -11.509884       -10.998722        -0.000323
      15.900000       -14.347438       -11.895943        -0.000165
      16.050000       -15.287336       -11.572105        -0.000005
      16.200000       -14.067416       -10.080444         0.000138
      16.350000       -10.802914        -7.637870         0.000248
      16.500000        -5.976553        -4.591918         0.000313
      16.650000        -0.356722        -1.365240         0.000331
      16.800000         5.141053         1.612947         0.000304
      16.950000         9.622693         3.976462         0.000240
      17.100000        12.381359         5.480370         0.000150
      17.250000        13.027990         6.037313         0.000047
      17.400000        11.560979         5.725370        -0.000056
      17.550000         8.361334         4.766082        -0.000148
      17.700000         4.114364         3.476794        -0.000220
      17.850000        -0.326569         2.206282        -0.000267
      18.000000        -4.107304         1.265785        -0.000287
      18.150000        -6.538177         0.868443        -0.000282
      18.300000        -7.224883         1.088608        -0.000252
      18.450000        -6.139379         1.848705        -0.000204
      18.600000        -3.617297         2.936154        -0.000139
      18.750000        -0.282930         4.047106        -0.000062
      18.900000         3.082729         4.848645         0.000024
      19.050000         5.704201         5.047554         0.000114
      19.200000         6.971360         4.452410         0.000206
      19.350000         6.564880         3.017031         0.000294
      19.500000         4.522214         0.856722         0.000374
      19.650000         1.230971        -1.766056         0.000438
      19.800000        -2.648913        -4.484225         0.000481
      19.950000        -6.318611        -6.889144         0.000496
      20.100000        -9.002726        -8.602539         0.000477
      20.250000       -10.107995        -9.344044         0.000422
      20.400000        -9.346550        -8.981821         0.000330
      20.550000        -6.798915        -7.556928         0.000205
      20.700000        -2.903834        -5.276963         0.000055
      20.850000         1.623478        -2.480263        -0.000108
      21.000000         5.928860         0.422670        -0.000271
      21.150000         9.185629         3.019640        -0.000419
      21.300000        10.757201         4.966197        -0.000537
      21.450000        10.323870         6.041463        -0.000612
      21.600000         7.948619         6.180453        -0.000637
      21.750000         4.068745         5.477529        -0.000608
      21.900000        -0.585430         4.161075        -0.000530
      22.050000        -5.129229         2.544839        -0.000409
      22.200000        -8.692916         0.965619        -0.000260
      22.350000       -10.588841        -0.280687        -0.000100
      22.500000       -10.444054        -0.992625         0.000055
      22.650000        -8.272710        -1.096543         0.000188
      22.800000        -4.474256        -0.654048         0.000287
      22.950000         0.242214         0.157064         0.000342
      23.100000         4.992771         1.083970         0.000352
      23.250000         8.886579         1.853469         0.000319
      23.400000        11.194571         2.229163         0.000253
      23.550000        11.486519         2.059953         0.000167
      23.700000         9.710378         1.310590         0.000074
      23.850000         6.199083         0.068697        -0.000010
      24.000000         1.604060        -1.472605        -0.000074
      24.150000        -3.231163        -3.052584        -0.000107
      24.300000        -7.432407        -4.393498        -0.000107
      24.450000       -10.259983        -5.253775        -0.000075
      24.600000       -11.245723        -5.473386        -0.000015
      24.750000       -10.275890        -5.002726         0.000061
      24.900000        -7.604690        -3.909790         0.000143
      25.050000        -3.796750        -2.364759         0.000217
      25.200000         0.389244        -0.605594         0.000273
      25.350000         4.152273         1.108109         0.000301
      25.500000         6.805936         2.543593         0.000298
      25.650000         7.909843         3.536125         0.000263
      25.800000         7.350003         4.014905         0.000199
      25.950000         5.353055         4.009026         0.000113
      26.100000         2.432371         3.632910         0.000015
      26.250000        -0.722508         3.054842        -0.000086
      26.400000        -3.390524         2.455632        -0.000178
      26.550000        -4.968693         1.986324        -0.000255
      26.700000        -5.096709         1.733989        -0.000310
      26.850000        -3.731726         1.702825        -0.000341
      27.000000        -1.158468         1.814569        -0.000347
      27.150000         2.067294         1.928147        -0.000331
      27.300000         5.230689         1.874430        -0.000297
      27.450000         7.602892         1.498788        -0.000250
      27.600000         8.590698         0.702348        -0.000195
      27.750000         7.860842        -0.526952        -0.000137
      27.900000         5.414273        -2.100526        -0.000078
      28.050000         1.595387        -3.836088        -0.000021
      28.200000        -2.966087        -5.484824         0.000033
      28.350000        -7.469726        -6.774045         0.000083
      28.500000       -11.093709        -7.457409         0.000130
      28.650000       -13.150129        -7.363012         0.000173
      28.800000       -13.216479        -6.429907         0.000210
      28.950000       -11.218047        -4.725585         0.000241
      29.100000        -7.445355        -2.440554         0.000261
      29.250000        -2.503302         0.139537         0.000267
      29.400000         2.798296         2.679474         0.000257
      29.550000         7.591889         4.849545         0.000229
      29.700000        11.109157         6.380035         0.000181
      29.850000        12.818104         7.105092         0.000116
      30.000000        12.514665         6.987915         0.000037
      30.150000        10.352073         6.122683        -0.000048

From steve at pearwood.info  Mon Nov 20 10:18:29 2017
From: steve at pearwood.info (Steven D'Aprano)
Date: Tue, 21 Nov 2017 02:18:29 +1100
Subject: [Tutor] AttributeError: 'BezierPath' object has no attribute
 '_draw_solid'
In-Reply-To: <5A12D631.5010302@sbcglobal.net>
References: <5A11B31F.7060900@sbcglobal.net>
 <248AF619-AE3B-409A-BB96-937089525B22@mac.com>
 <5A11E613.6050509@sbcglobal.net> <20171120002353.GY19802@ando.pearwood.info>
 <ouual2$1sd$1@blaine.gmane.org> <20171120112450.GD19802@ando.pearwood.info>
 <5A12D631.5010302@sbcglobal.net>
Message-ID: <20171120151829.GG19802@ando.pearwood.info>

On Mon, Nov 20, 2017 at 08:18:41AM -0500, Stephen P. Molnar wrote:

> I'm not really looking for someone to do the programming for me.  I know 
> that the code works, because it did and produced the attached plot. I 
> just don't know why it stopped working.  Actually, all of my programming 
> experience has been with FORTRAN, starting with II in 1961 (yes, I am 
> rather an old... an Organic Chemist.
> 
> Let's start over,
> 
> This is the code:

You seem to have completely ignored my advice about cutting the code 
down to the minimum amount that demonstrates the error. Okay, that's 
your perogative, but as a volunteer it is my perogative to choose how 
much or how little effort I put into solving your problem for you.

I have neither the time nor the inclination to spend a lot of time on 
this, so I'll just offer one suggestion. According to the error 
traceback, you appear to be running the script from inside either the 
Spyder IDE, or possibly an iPython/Jupyter notebook.

This appears to be the command you are running (inside iPython?):

> runfile('/home/comp/Apps/Python/Plot_T_Data/MultiplePlots_3.py', wdir='/home/comp/Apps/Python/Plot_T_Data')

and the traceback shows a failure relating to iPython and/or Spyder:

>   File "<ipython-input-22-d74ad7d779d0>", line 1, in <module>
>     runfile('/home/comp/Apps/Python/Plot_T_Data/MultiplePlots_3.py', wdir='/home/comp/Apps/Python/Plot_T_Data')
> 
>   File "/usr/local/lib/python3.5/dist-packages/spyder/utils/site/sitecustomize.py", line 688, in runfile
>     execfile(filename, namespace)


It is possible that you have recently updated iPython or installed 
Spyder, and that has broken your script. I recommend that you eliminate 
them from contention, by running your script from the old-fashioned 
Linux commandline. From bash, or some other terminal shell, run:


cd /home/comp/Apps/Python/Plot_T_Data
python3.5 MultiplePlots_3.py


and see if the error persists. If the error goes away, then the problem 
lies in iPython or Spyder.

In a nutshell, based on a cursory look at the traceback, this seems to 
be a problem with your environment rather than your code.

Good luck!


-- 
Steve

From wrw at mac.com  Mon Nov 20 09:34:35 2017
From: wrw at mac.com (William Ray Wing)
Date: Mon, 20 Nov 2017 09:34:35 -0500
Subject: [Tutor] AttributeError: 'BezierPath' object has no attribute
 '_draw_solid'
In-Reply-To: <5A11E613.6050509@sbcglobal.net>
References: <5A11B31F.7060900@sbcglobal.net>
 <248AF619-AE3B-409A-BB96-937089525B22@mac.com>
 <5A11E613.6050509@sbcglobal.net>
Message-ID: <78432708-C58D-4E0F-BD57-4B8DF29B90F7@mac.com>


> On Nov 19, 2017, at 3:14 PM, Stephen P. Molnar <s.molnar at sbcglobal.net> wrote:
> 
> 
> On 11/19/2017 03:10 PM, William Ray Wing wrote:
>>> On Nov 19, 2017, at 11:36 AM, Stephen P. Molnar <s.molnar at sbcglobal.net> wrote:
>>> 
>>> I have written a short Python 3 script to plot three curves (one plot) of data from a FORTRAN program.  Initially the code worked and produced the plot which is attached.  I have also attached the code and the input data,
>>> 
>> The data made it through, neither the script nor the plot did.  If the script really is short, perhaps you could just cut and paste it into a follow-up msg.  Absent that, no one here can help you.
>> 
>> Thanks,
>> Bill
>> 

As an experiment, I took the code and moved it to my laptop (MacOS, running 10.12.6 where there is a complete Anaconda installation that contains self-consistent versions of everything Dr. Molnar imports (Python 3.6.1 incidentally).  There the code runs perfectly.  I?m appending a copy of the .png file it produced, and although I expect it to be scraped off by the gateway list-server, it should show up in Dr. Molnar?s e-mail.

Bill



>>> In all candor, I don't have the faintest idea as to whst the problem (or problens) might be and would greatly appreciate a pointer towards the solution.
>>> 
>>> Thanks in advance.
>>> 
>>> -- 
>>> Stephen P. Molnar, Ph.D.		Life is a fuzzy set
>>> www.molecular-modeling.net		Stochastic and multivariate
>>> (614)312-7528 (c)
>>> Skype: smolnar1
>>> 
>>> <A_poutput.txt>_______________________________________________
>>> Tutor maillist  -  Tutor at python.org
>>> To unsubscribe or change subscription options:
>>> https://mail.python.org/mailman/listinfo/tutor
>> 
> 
> Here it is:
> 
> #!/usr/bin/env python3
> # -*- coding: utf-8 -*-
> """
> Multiple_Plots_2_b.py
> 
> Copyright (c) 2017 Stephen P. Molnar, Ph.D.  All rights reserved.
> 
> """
> import numpy as np
> from mpl_toolkits.axes_grid1 import host_subplot
> import mpl_toolkits.axisartist as AA
> import matplotlib.pyplot as plt
> 
> data = []
> name = input("Enter Molecule ID: ")
> 
> name_in = name+'_poutput'
> data = np.genfromtxt(name_in)
> 
> s = data[:,0]
> FTm = data[:,1]     #atomic number
> FTe = data[:,2]     #atomic mass
> FTc = data[:,3]     #atom electron density
> 
> 
> fig = plt.figure(figsize=(7.6,4))
> 
> host = host_subplot(111, axes_class=AA.Axes)
> plt.subplots_adjust(right=0.75)
> 
> par1 = host.twinx()
> par2 = host.twinx()
> 
> offset = 60
> new_fixed_axis = par2.get_grid_helper().new_fixed_axis
> par2.axis["right"] = new_fixed_axis(loc="right", axes=par2,
>                                        offset=(offset, 0))
> 
> par2.axis["right"].toggle(all=True)
> 
> host.set_xlim(0, 30)
> """
> host.set_ylim(min(FTm), max(FTm))
> """
> 
> host.set_xlabel("Distance ($\AA$)")
> host.set_ylabel("Atomic Number")
> par1.set_ylabel("Atom Mass")
> par2.set_ylabel("Atom Electron Density")
> 
> p1, = host.plot(data[:,0], data[:,1])#, label="Atomic Number")
> p2, = par1.plot(data[:,0], data[:,2])#, label="Atom Mass")
> p3, = par2.plot(data[:,0], data[:,3])#, label="Atom Electron Density")
> 
> """
> par1.set_ylim(min(FTe), max(FTe))
> par2.set_ylim(min(FTc),max(FTc))
> """
> 
> #host.legend()
> 
> host.axis["left"].label.set_color(p1.get_color())
> par1.axis["right"].label.set_color(p2.get_color())
> par2.axis["right"].label.set_color(p3.get_color())
> 
> host.title.set_text('Molecule {0} - Molecular Transforms'.format(name))
> plt.draw()
> plt.show()
> 
> name_plt = name+'-fig1.png'
> fig.savefig(name_plt,bbox_inches='tight')
> 
> 
> -- 
> Stephen P. Molnar, Ph.D.		Life is a fuzzy set
> www.molecular-modeling.net		Stochastic and multivariate
> (614)312-7528 (c)
> Skype: smolnar1
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor


From wrw at mac.com  Mon Nov 20 11:28:53 2017
From: wrw at mac.com (William Ray Wing)
Date: Mon, 20 Nov 2017 11:28:53 -0500
Subject: [Tutor] AttributeError: 'BezierPath' object has no attribute
 '_draw_solid'
In-Reply-To: <5A12ECED.6000108@sbcglobal.net>
References: <5A11B31F.7060900@sbcglobal.net>
 <248AF619-AE3B-409A-BB96-937089525B22@mac.com>
 <5A11E613.6050509@sbcglobal.net>
 <78432708-C58D-4E0F-BD57-4B8DF29B90F7@mac.com>
 <5A12ECED.6000108@sbcglobal.net>
Message-ID: <9754AD35-D4AE-4C50-99C8-8033EB914DEC@mac.com>


> On Nov 20, 2017, at 9:55 AM, Stephen P. Molnar <s.molnar at sbcglobal.net> wrote:
> 
> 
> On 11/20/2017 09:34 AM, William Ray Wing wrote:


[byte]

>> As an experiment, I took the code and moved it to my laptop (MacOS, running 10.12.6 where there is a complete Anaconda installation that contains self-consistent versions of everything Dr. Molnar imports (Python 3.6.1 incidentally).  There the code runs perfectly.  I?m appending a copy of the .png file it produced, and although I expect it to be scraped off by the gateway list-server, it should show up in Dr. Molnar?s e-mail.
>> 
>> Bill<Mail Attachment.png>
>> 
>> 
>> 


[big byte]


> Hmmmmmmmmmmmmmm!  I'm relieved that the code works!
> 
> I've just encountered something strange.
> 
> I haven't been using Python very long, only about six months or so.  When I started I  look at a number of different IDE, and settled on     Spyder, although not in Anaconda.  I just installed Canopy in order to use the ipython notebook, and the code ran perfectly in the Canopy editor!!!!  Perhaps I should switch IDE's, but I rather like the Variable Explorer feature in Spyder.
> -- 
There are lots of IDEs.  Some of them have more trouble than others dealing with graphics from within a GUI window.  I happen to use (and like WingIDE - the name collision is purely an accident).  It supports multiple sub-windows, including ones for examining variables, and also running short snippets of code independently of the main code (thus, and very handy in science, plot an array as it exists at a break point to see what it ?looks? like, and not just look at numbers).  I would highly recommend you explore alternative IDEs.

Bill


> Stephen P. Molnar, Ph.D.		Life is a fuzzy set
> www.molecular-modeling.net <http://www.molecular-modeling.net/>		Stochastic and multivariate
> (614)312-7528 (c)
> Skype: smolnar1


From alan.gauld at yahoo.co.uk  Mon Nov 20 11:32:46 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Mon, 20 Nov 2017 16:32:46 +0000
Subject: [Tutor] AttributeError: 'BezierPath' object has no attribute
 '_draw_solid'
In-Reply-To: <20171120112450.GD19802@ando.pearwood.info>
References: <5A11B31F.7060900@sbcglobal.net>
 <248AF619-AE3B-409A-BB96-937089525B22@mac.com>
 <5A11E613.6050509@sbcglobal.net> <20171120002353.GY19802@ando.pearwood.info>
 <ouual2$1sd$1@blaine.gmane.org> <20171120112450.GD19802@ando.pearwood.info>
Message-ID: <ouv036$ggp$1@blaine.gmane.org>

On 20/11/17 11:24, Steven D'Aprano wrote:
> On Mon, Nov 20, 2017 at 10:26:50AM +0000, Alan Gauld via Tutor wrote:
> 
>> Actually, pasting code etc is safer since the server removes
>> attachments. And while it is supposed to preserve plain text
>> attachments it will throw them away if it sees *anything*
>> that it thinks looks like binary.
> 
> Let's do a test and see what happens! Attached is a .py file in UTF-8.
> If that passes through, I think we're good :-)
> 

I think code will normally work unless thee are some odd
characters in strings etc.

But we have had a couple of cases of py files getting lost.
(As in, I could see them in the moderation queue but
they were not in the final posted message)

But my main concern would be data files where anything
that looks like binary will almost certainly go awol.


>> corporate accounts that strip all attachments regardless

> Given the popularity of HTML email, corporate logos attached as images,
> and the ubiquity of emailing PDF and DOC/DOCX files in the business
> world, I would be stunned to come across any corporation that stripped
> all attachements.

I know of at least 3 large corporations that do that.
Security is paramount for these guys.

It will not apply internally but their firewalls just totally
strip any incoming attachments regardless of source or type.
At least one will even block mails that look like they contain
code in the body text- so even pasting code wouldn't work there.

Alan G.


From s.molnar at sbcglobal.net  Mon Nov 20 09:55:41 2017
From: s.molnar at sbcglobal.net (Stephen P. Molnar)
Date: Mon, 20 Nov 2017 09:55:41 -0500
Subject: [Tutor] AttributeError: 'BezierPath' object has no attribute
 '_draw_solid'
In-Reply-To: <78432708-C58D-4E0F-BD57-4B8DF29B90F7@mac.com>
References: <5A11B31F.7060900@sbcglobal.net>
 <248AF619-AE3B-409A-BB96-937089525B22@mac.com>
 <5A11E613.6050509@sbcglobal.net>
 <78432708-C58D-4E0F-BD57-4B8DF29B90F7@mac.com>
Message-ID: <5A12ECED.6000108@sbcglobal.net>


On 11/20/2017 09:34 AM, William Ray Wing wrote:
>
>> On Nov 19, 2017, at 3:14 PM, Stephen P. Molnar 
>> <s.molnar at sbcglobal.net <mailto:s.molnar at sbcglobal.net>> wrote:
>>
>>
>> On 11/19/2017 03:10 PM, William Ray Wing wrote:
>>>> On Nov 19, 2017, at 11:36 AM, Stephen P. Molnar 
>>>> <s.molnar at sbcglobal.net <mailto:s.molnar at sbcglobal.net>> wrote:
>>>>
>>>> I have written a short Python 3 script to plot three curves (one 
>>>> plot) of data from a FORTRAN program.  Initially the code worked 
>>>> and produced the plot which is attached.  I have also attached the 
>>>> code and the input data,
>>>>
>>> The data made it through, neither the script nor the plot did.  If 
>>> the script really is short, perhaps you could just cut and paste 
>>> it into a follow-up msg.  Absent that, no one here can help you.
>>>
>>> Thanks,
>>> Bill
>>>
>
> As an experiment, I took the code and moved it to my laptop (MacOS, 
> running 10.12.6 where there is a complete Anaconda installation that 
> contains self-consistent versions of everything Dr. Molnar imports 
> (Python 3.6.1 incidentally).  There the code runs perfectly.  I?m 
> appending a copy of the .png file it produced, and although I expect 
> it to be scraped off by the gateway list-server, it should show up in 
> Dr. Molnar?s e-mail.
>
> Bill
>
>
>
>>>> In all candor, I don't have the faintest idea as to whst the 
>>>> problem (or problens) might be and would greatly appreciate a 
>>>> pointer towards the solution.
>>>>
>>>> Thanks in advance.
>>>>
>>>> -- 
>>>> Stephen P. Molnar, Ph.D.Life is a fuzzy set
>>>> www.molecular-modeling.net 
>>>> <http://www.molecular-modeling.net>Stochastic and multivariate
>>>> (614)312-7528 (c)
>>>> Skype: smolnar1
>>>>
>>>> <A_poutput.txt>_______________________________________________
>>>> Tutor maillist  -  Tutor at python.org
>>>> To unsubscribe or change subscription options:
>>>> https://mail.python.org/mailman/listinfo/tutor
>>>
>>
>> Here it is:
>>
>> #!/usr/bin/env python3
>> # -*- coding: utf-8 -*-
>> """
>> Multiple_Plots_2_b.py
>>
>> Copyright (c) 2017 Stephen P. Molnar, Ph.D.  All rights reserved.
>>
>> """
>> import numpy as np
>> from mpl_toolkits.axes_grid1 import host_subplot
>> import mpl_toolkits.axisartist as AA
>> import matplotlib.pyplot as plt
>>
>> data = []
>> name = input("Enter Molecule ID: ")
>>
>> name_in = name+'_poutput'
>> data = np.genfromtxt(name_in)
>>
>> s = data[:,0]
>> FTm = data[:,1]     #atomic number
>> FTe = data[:,2]     #atomic mass
>> FTc = data[:,3]     #atom electron density
>>
>>
>> fig = plt.figure(figsize=(7.6,4))
>>
>> host = host_subplot(111, axes_class=AA.Axes)
>> plt.subplots_adjust(right=0.75)
>>
>> par1 = host.twinx()
>> par2 = host.twinx()
>>
>> offset = 60
>> new_fixed_axis = par2.get_grid_helper().new_fixed_axis
>> par2.axis["right"] = new_fixed_axis(loc="right", axes=par2,
>>                                        offset=(offset, 0))
>>
>> par2.axis["right"].toggle(all=True)
>>
>> host.set_xlim(0, 30)
>> """
>> host.set_ylim(min(FTm), max(FTm))
>> """
>>
>> host.set_xlabel("Distance ($\AA$)")
>> host.set_ylabel("Atomic Number")
>> par1.set_ylabel("Atom Mass")
>> par2.set_ylabel("Atom Electron Density")
>>
>> p1, = host.plot(data[:,0], data[:,1])#, label="Atomic Number")
>> p2, = par1.plot(data[:,0], data[:,2])#, label="Atom Mass")
>> p3, = par2.plot(data[:,0], data[:,3])#, label="Atom Electron Density")
>>
>> """
>> par1.set_ylim(min(FTe), max(FTe))
>> par2.set_ylim(min(FTc),max(FTc))
>> """
>>
>> #host.legend()
>>
>> host.axis["left"].label.set_color(p1.get_color())
>> par1.axis["right"].label.set_color(p2.get_color())
>> par2.axis["right"].label.set_color(p3.get_color())
>>
>> host.title.set_text('Molecule {0} - Molecular Transforms'.format(name))
>> plt.draw()
>> plt.show()
>>
>> name_plt = name+'-fig1.png'
>> fig.savefig(name_plt,bbox_inches='tight')
>>
>>
>> -- 
>> Stephen P. Molnar, Ph.D.Life is a fuzzy set
>> www.molecular-modeling.net 
>> <http://www.molecular-modeling.net>Stochastic and multivariate
>> (614)312-7528 (c)
>> Skype: smolnar1
>>
>> _______________________________________________
>> Tutor maillist  -  Tutor at python.org
>> To unsubscribe or change subscription options:
>> https://mail.python.org/mailman/listinfo/tutor
>
Hmmmmmmmmmmmmmm!  I'm relieved that the code works!

I've just encountered something strange.

I haven't been using Python very long, only about six months or so. When 
I started I  look at a number of different IDE, and settled on Spyder, 
although not in Anaconda.  I just installed Canopy in order to use the 
ipython notebook, and the code ran perfectly in the Canopy editor!!!!  
Perhaps I should switch IDE's, but I rather like the Variable Explorer 
feature in Spyder.

-- 
Stephen P. Molnar, Ph.D.		Life is a fuzzy set
www.molecular-modeling.net		Stochastic and multivariate
(614)312-7528 (c)
Skype: smolnar1


From s.molnar at sbcglobal.net  Mon Nov 20 10:51:02 2017
From: s.molnar at sbcglobal.net (Stephen P. Molnar)
Date: Mon, 20 Nov 2017 10:51:02 -0500
Subject: [Tutor] AttributeError: 'BezierPath' object has no attribute
 '_draw_solid'
In-Reply-To: <20171120151829.GG19802@ando.pearwood.info>
References: <5A11B31F.7060900@sbcglobal.net>
 <248AF619-AE3B-409A-BB96-937089525B22@mac.com>
 <5A11E613.6050509@sbcglobal.net> <20171120002353.GY19802@ando.pearwood.info>
 <ouual2$1sd$1@blaine.gmane.org> <20171120112450.GD19802@ando.pearwood.info>
 <5A12D631.5010302@sbcglobal.net> <20171120151829.GG19802@ando.pearwood.info>
Message-ID: <5A12F9E6.60806@sbcglobal.net>


On 11/20/2017 10:18 AM, Steven D'Aprano wrote:
> On Mon, Nov 20, 2017 at 08:18:41AM -0500, Stephen P. Molnar wrote:
>
>> I'm not really looking for someone to do the programming for me.  I know
>> that the code works, because it did and produced the attached plot. I
>> just don't know why it stopped working.  Actually, all of my programming
>> experience has been with FORTRAN, starting with II in 1961 (yes, I am
>> rather an old... an Organic Chemist.
>>
>> Let's start over,
>>
>> This is the code:
> You seem to have completely ignored my advice about cutting the code
> down to the minimum amount that demonstrates the error. Okay, that's
> your perogative, but as a volunteer it is my perogative to choose how
> much or how little effort I put into solving your problem for you.
>
> I have neither the time nor the inclination to spend a lot of time on
> this, so I'll just offer one suggestion. According to the error
> traceback, you appear to be running the script from inside either the
> Spyder IDE, or possibly an iPython/Jupyter notebook.
>
> This appears to be the command you are running (inside iPython?):
>
>> runfile('/home/comp/Apps/Python/Plot_T_Data/MultiplePlots_3.py', wdir='/home/comp/Apps/Python/Plot_T_Data')
> and the traceback shows a failure relating to iPython and/or Spyder:
>
>>    File "<ipython-input-22-d74ad7d779d0>", line 1, in <module>
>>      runfile('/home/comp/Apps/Python/Plot_T_Data/MultiplePlots_3.py', wdir='/home/comp/Apps/Python/Plot_T_Data')
>>
>>    File "/usr/local/lib/python3.5/dist-packages/spyder/utils/site/sitecustomize.py", line 688, in runfile
>>      execfile(filename, namespace)
>
> It is possible that you have recently updated iPython or installed
> Spyder, and that has broken your script. I recommend that you eliminate
> them from contention, by running your script from the old-fashioned
> Linux commandline. From bash, or some other terminal shell, run:
>
>
> cd /home/comp/Apps/Python/Plot_T_Data
> python3.5 MultiplePlots_3.py
>
>
> and see if the error persists. If the error goes away, then the problem
> lies in iPython or Spyder.
>
> In a nutshell, based on a cursory look at the traceback, this seems to
> be a problem with your environment rather than your code.
>
> Good luck!
>
>
Followed your advice;

comp at AbNormal:~/Apps/Models/Fluoranthene/ReferenceMolecules/Output/Transforms_1$ 
python3.5 MultiplePlots_3.py
Enter Molecule ID: Chrysene
Exception in Tkinter callback
Traceback (most recent call last):
   File "/usr/lib/python3.5/tkinter/__init__.py", line 1562, in __call__
     return self.func(*args)
   File "/usr/lib/python3.5/tkinter/__init__.py", line 608, in callit
     func(*args)
   File 
"/usr/local/lib/python3.5/dist-packages/matplotlib/backends/backend_tkagg.py", 
line 323, in idle_draw
     self.draw()
   File 
"/usr/local/lib/python3.5/dist-packages/matplotlib/backends/backend_tkagg.py", 
line 304, in draw
     FigureCanvasAgg.draw(self)
   File 
"/usr/local/lib/python3.5/dist-packages/matplotlib/backends/backend_agg.py", 
line 430, in draw
     self.figure.draw(self.renderer)
   File "/usr/local/lib/python3.5/dist-packages/matplotlib/artist.py", 
line 55, in draw_wrapper
     return draw(artist, renderer, *args, **kwargs)
   File "/usr/local/lib/python3.5/dist-packages/matplotlib/figure.py", 
line 1295, in draw
     renderer, self, artists, self.suppressComposite)
   File "/usr/local/lib/python3.5/dist-packages/matplotlib/image.py", 
line 138, in _draw_list_compositing_images
     a.draw(renderer)
   File 
"/usr/lib/python3/dist-packages/mpl_toolkits/axes_grid1/parasite_axes.py", 
line 295, in draw
     self._get_base_axes_attr("draw")(self, renderer)
   File 
"/usr/lib/python3/dist-packages/mpl_toolkits/axisartist/axislines.py", 
line 778, in draw
     super(Axes, self).draw(renderer, inframe)
   File "/usr/local/lib/python3.5/dist-packages/matplotlib/artist.py", 
line 55, in draw_wrapper
     return draw(artist, renderer, *args, **kwargs)
   File 
"/usr/local/lib/python3.5/dist-packages/matplotlib/axes/_base.py", line 
2399, in draw
     mimage._draw_list_compositing_images(renderer, self, artists)
   File "/usr/local/lib/python3.5/dist-packages/matplotlib/image.py", 
line 138, in _draw_list_compositing_images
     a.draw(renderer)
   File "/usr/local/lib/python3.5/dist-packages/matplotlib/artist.py", 
line 55, in draw_wrapper
     return draw(artist, renderer, *args, **kwargs)
   File 
"/usr/lib/python3/dist-packages/mpl_toolkits/axisartist/axis_artist.py", 
line 1572, in draw
     self._draw_line(renderer)
   File 
"/usr/lib/python3/dist-packages/mpl_toolkits/axisartist/axis_artist.py", 
line 1170, in _draw_line
     self.line.draw(renderer)
   File 
"/usr/lib/python3/dist-packages/mpl_toolkits/axisartist/axis_artist.py", 
line 163, in draw
     lineFunc = getattr(self, funcname)
AttributeError: 'BezierPath' object has no attribute '_draw_solid'
Exception in Tkinter callback
Traceback (most recent call last):
   File "/usr/lib/python3.5/tkinter/__init__.py", line 1562, in __call__
     return self.func(*args)
   File "/usr/lib/python3.5/tkinter/__init__.py", line 608, in callit
     func(*args)
   File 
"/usr/local/lib/python3.5/dist-packages/matplotlib/backends/backend_tkagg.py", 
line 323, in idle_draw
     self.draw()
   File 
"/usr/local/lib/python3.5/dist-packages/matplotlib/backends/backend_tkagg.py", 
line 304, in draw
     FigureCanvasAgg.draw(self)
   File 
"/usr/local/lib/python3.5/dist-packages/matplotlib/backends/backend_agg.py", 
line 430, in draw
     self.figure.draw(self.renderer)
   File "/usr/local/lib/python3.5/dist-packages/matplotlib/artist.py", 
line 55, in draw_wrapper
     return draw(artist, renderer, *args, **kwargs)
   File "/usr/local/lib/python3.5/dist-packages/matplotlib/figure.py", 
line 1295, in draw
     renderer, self, artists, self.suppressComposite)
   File "/usr/local/lib/python3.5/dist-packages/matplotlib/image.py", 
line 138, in _draw_list_compositing_images
     a.draw(renderer)
   File 
"/usr/lib/python3/dist-packages/mpl_toolkits/axes_grid1/parasite_axes.py", 
line 295, in draw
     self._get_base_axes_attr("draw")(self, renderer)
   File 
"/usr/lib/python3/dist-packages/mpl_toolkits/axisartist/axislines.py", 
line 778, in draw
     super(Axes, self).draw(renderer, inframe)
   File "/usr/local/lib/python3.5/dist-packages/matplotlib/artist.py", 
line 55, in draw_wrapper
     return draw(artist, renderer, *args, **kwargs)
   File 
"/usr/local/lib/python3.5/dist-packages/matplotlib/axes/_base.py", line 
2399, in draw
     mimage._draw_list_compositing_images(renderer, self, artists)
   File "/usr/local/lib/python3.5/dist-packages/matplotlib/image.py", 
line 138, in _draw_list_compositing_images
     a.draw(renderer)
   File "/usr/local/lib/python3.5/dist-packages/matplotlib/artist.py", 
line 55, in draw_wrapper
     return draw(artist, renderer, *args, **kwargs)
   File 
"/usr/lib/python3/dist-packages/mpl_toolkits/axisartist/axis_artist.py", 
line 1572, in draw
     self._draw_line(renderer)
   File 
"/usr/lib/python3/dist-packages/mpl_toolkits/axisartist/axis_artist.py", 
line 1170, in _draw_line
     self.line.draw(renderer)
   File 
"/usr/lib/python3/dist-packages/mpl_toolkits/axisartist/axis_artist.py", 
line 163, in draw
     lineFunc = getattr(self, funcname)
AttributeError: 'BezierPath' object has no attribute '_draw_solid'
Exception in Tkinter callback
Traceback (most recent call last):
   File "/usr/lib/python3.5/tkinter/__init__.py", line 1562, in __call__
     return self.func(*args)
   File 
"/usr/local/lib/python3.5/dist-packages/matplotlib/backends/backend_tkagg.py", 
line 233, in resize
     self.show()
   File 
"/usr/local/lib/python3.5/dist-packages/matplotlib/backends/backend_tkagg.py", 
line 304, in draw
     FigureCanvasAgg.draw(self)
   File 
"/usr/local/lib/python3.5/dist-packages/matplotlib/backends/backend_agg.py", 
line 430, in draw
     self.figure.draw(self.renderer)
   File "/usr/local/lib/python3.5/dist-packages/matplotlib/artist.py", 
line 55, in draw_wrapper
     return draw(artist, renderer, *args, **kwargs)
   File "/usr/local/lib/python3.5/dist-packages/matplotlib/figure.py", 
line 1295, in draw
     renderer, self, artists, self.suppressComposite)
   File "/usr/local/lib/python3.5/dist-packages/matplotlib/image.py", 
line 138, in _draw_list_compositing_images
     a.draw(renderer)
   File 
"/usr/lib/python3/dist-packages/mpl_toolkits/axes_grid1/parasite_axes.py", 
line 295, in draw
     self._get_base_axes_attr("draw")(self, renderer)
   File 
"/usr/lib/python3/dist-packages/mpl_toolkits/axisartist/axislines.py", 
line 778, in draw
     super(Axes, self).draw(renderer, inframe)
   File "/usr/local/lib/python3.5/dist-packages/matplotlib/artist.py", 
line 55, in draw_wrapper
     return draw(artist, renderer, *args, **kwargs)
   File 
"/usr/local/lib/python3.5/dist-packages/matplotlib/axes/_base.py", line 
2399, in draw
     mimage._draw_list_compositing_images(renderer, self, artists)
   File "/usr/local/lib/python3.5/dist-packages/matplotlib/image.py", 
line 138, in _draw_list_compositing_images
     a.draw(renderer)
   File "/usr/local/lib/python3.5/dist-packages/matplotlib/artist.py", 
line 55, in draw_wrapper
     return draw(artist, renderer, *args, **kwargs)
   File 
"/usr/lib/python3/dist-packages/mpl_toolkits/axisartist/axis_artist.py", 
line 1572, in draw
     self._draw_line(renderer)
   File 
"/usr/lib/python3/dist-packages/mpl_toolkits/axisartist/axis_artist.py", 
line 1170, in _draw_line
     self.line.draw(renderer)
   File 
"/usr/lib/python3/dist-packages/mpl_toolkits/axisartist/axis_artist.py", 
line 163, in draw
     lineFunc = getattr(self, funcname)
AttributeError: 'BezierPath' object has no attribute '_draw_solid'


-- 
Stephen P. Molnar, Ph.D.		Life is a fuzzy set
www.molecular-modeling.net		Stochastic and multivariate
(614)312-7528 (c)
Skype: smolnar1


From marcus.luetolf at bluewin.ch  Sun Nov 26 07:29:49 2017
From: marcus.luetolf at bluewin.ch (=?iso-8859-1?Q?marcus_l=FCtolf?=)
Date: Sun, 26 Nov 2017 13:29:49 +0100
Subject: [Tutor] failed installation of Python 2.7
Message-ID: <000801d366b2$40bf0a30$c23d1e90$@bluewin.ch>

dear experts,

cleaning up my computer I removed all my different Python versions, 

saving all .py and .txt files.

I could reinstall Python 3.6 but not Python 2.7, getting an error mesage:

?a program required for this insatll could not be found?.

Searching different websites I could not solve this problem.
Might you be able to offre a solution?



Marcus Luetolf

 



---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren gepr?ft.
https://www.avast.com/antivirus

From steve at pearwood.info  Sun Nov 26 18:12:09 2017
From: steve at pearwood.info (Steven D'Aprano)
Date: Mon, 27 Nov 2017 10:12:09 +1100
Subject: [Tutor] failed installation of Python 2.7
In-Reply-To: <000801d366b2$40bf0a30$c23d1e90$@bluewin.ch>
References: <000801d366b2$40bf0a30$c23d1e90$@bluewin.ch>
Message-ID: <20171126231209.GE22248@ando.pearwood.info>

On Sun, Nov 26, 2017 at 01:29:49PM +0100, marcus l?tolf wrote:
> dear experts,
> 
> cleaning up my computer I removed all my different Python versions, 

Its sounds more like "breaking" than "cleaning up" :-(

You should never delete programs unless you know what they are for and 
what will be affected by it.


> saving all .py and .txt files.
> 
> I could reinstall Python 3.6 but not Python 2.7, getting an error mesage:
> 
> a program required for this insatll could not be found.

"insatll"? I doubt that was what the error message actually said. When 
reporting error messages, it is critically important to get them 
word-for-word exactly right. Please don't paraphrase them or type from 
memory.

Please start by explaining:

- What operating system you are using (Windows, Linux, Mac OS, something 
else?)

- If Linux, which distro you are running (Red Hat, Debian, Ubuntu, etc)?

- If Windows or Mac OS, what version?

- Please try to COPY AND PASTE the FULL error message. I am pretty sure 
that even on Windows you can use the mouse to select the error message 
and copy it.

- Does the error message say *which* program is missing? That is the 
most important information you need.



-- 
Steve

From alan.gauld at yahoo.co.uk  Sun Nov 26 19:21:48 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Mon, 27 Nov 2017 00:21:48 +0000
Subject: [Tutor] failed installation of Python 2.7
In-Reply-To: <20171126231209.GE22248@ando.pearwood.info>
References: <000801d366b2$40bf0a30$c23d1e90$@bluewin.ch>
 <20171126231209.GE22248@ando.pearwood.info>
Message-ID: <ovflqk$ina$1@blaine.gmane.org>

On 26/11/17 23:12, Steven D'Aprano wrote:

> Please start by explaining:
> 
> ...

Also tell us how you are installing this version.
If it is a binary installer where did you download it from?
And what was it called?

If you are using a package manager say so.

If you are trying to build from source (why?) tell us
exactly what steps you took.

There are lots of options when it comes to "installing python"
and we need to know exactly what you are doing before we can help.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos



From johncocksbusiness at gmail.com  Sun Nov 26 20:57:37 2017
From: johncocksbusiness at gmail.com (John Cocks)
Date: Sun, 26 Nov 2017 19:57:37 -0600
Subject: [Tutor] Need help fixing some code for a project
Message-ID: <CADLcjZB7_E8DZDgVhw5y2d8GWKhykBxf1=ow-NNrkty4wP7SZQ@mail.gmail.com>

The task is broken down into three sections.
Section 1 - User Input
Section 2 - loop through the grocery list
Section 3 - provide output to the console
'''

#Task: Create the empty data structure
grocery_item = {}

grocery_history = []

#Variable used to check if the while loop condition is met
stop = 'go'

while stop == 'go' :

    #Accept input of the name of the grocery item purchased.
    item_name = "Item name:\n"
    #Accept input of the quantitiy of the grocery item purchased.
    quantity = "Quantity purchased:\n"
    #Accept input of the cost of the grocery item input (this is a per-item
cost).
    cost = "Price per item:\n"
    #Create a dictionary entry which contains the name, number and price
entered by the user.
    grocery_item = {'name': item_name, 'number': int(quantity), 'price':
float(cost)}  -- errors usually occur here because of "quantity
purchased:\n line
    #Add the grocery_item to the grocery_history list using the append
function
    grocery_history.append(grocery_item)
    #Accept input from the user asking if they have finished entering
grocery items.
    print("Would you like to enter another item?\n Type 'c' for continue or
'q' to quit:\n")

# Define variable to hold grand total called 'grand_total'
grand_total = 0
#Define a 'for' loop.

for grocery_item in grocery_history:

  #Calculate the total cost for the grocery_item.
  item_total = number * price
  #Add the item_total to the grand_total
  item_total = grand_total
  #Output the information for the grocery item to match this example:
  #2 apple @ $1.49 ea $2.98
  print('number', 'name', 'price', 'cost')
  #print(name)
  #print(price: %6.2f) -- errors happen here
  #print(item_total: %6.2f) -- errors happen here too

  #Set the item_total equal to 0
  item_total = 0
#Print the grand total
print(grand_total)

From alan.gauld at yahoo.co.uk  Mon Nov 27 04:48:10 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Mon, 27 Nov 2017 09:48:10 +0000
Subject: [Tutor] Need help fixing some code for a project
In-Reply-To: <CADLcjZB7_E8DZDgVhw5y2d8GWKhykBxf1=ow-NNrkty4wP7SZQ@mail.gmail.com>
References: <CADLcjZB7_E8DZDgVhw5y2d8GWKhykBxf1=ow-NNrkty4wP7SZQ@mail.gmail.com>
Message-ID: <ovgn0i$ub7$1@blaine.gmane.org>

On 27/11/17 01:57, John Cocks wrote:
> The task is broken down into three sections.

What exactly do you want help with?
Do you not understand part of the problem?
Do you not know how to code some part?
Are you getting an error? If so show us the full error text.

WE are not mind readers, you need to tell us what
you want to know.

As for the code below, I've added a few remarks...

> #Task: Create the empty data structure
> grocery_item = {}
> 
> grocery_history = []
> 
> #Variable used to check if the while loop condition is met
> stop = 'go'
> 
> while stop == 'go' :

This would read better if stop were a boolean variable

stop = False
while not stop:
    ...


>     #Accept input of the name of the grocery item purchased.
>     item_name = "Item name:\n"

Your comment says "accept input" but you are not accepting
input, you are just assigning a string to a variable.
Do you know how to read input from a user?


>     #Accept input of the quantitiy of the grocery item purchased.
>     quantity = "Quantity purchased:\n"
>     #Accept input of the cost of the grocery item input (this is a per-item
> cost).
>     cost = "Price per item:\n"
>     #Create a dictionary entry which contains the name, number and price
> entered by the user.
>     grocery_item = {'name': item_name, 'number': int(quantity), 'price':
> float(cost)}  -- errors usually occur here because of "quantity
> purchased:\n line
>     #Add the grocery_item to the grocery_history list using the append
> function
>     grocery_history.append(grocery_item)
>     #Accept input from the user asking if they have finished entering
> grocery items.
>     print("Would you like to enter another item?\n Type 'c' for continue or
> 'q' to quit:\n")

If you were reading input how would you exit the while loop above?
You need to test for that situation and take the appropriate action.

> # Define variable to hold grand total called 'grand_total'
> grand_total = 0

Its traditional to put ALL the variable definitions at the top
of your code so you know where to find them easily.

> #Define a 'for' loop.
> for grocery_item in grocery_history:

Its probbablyt not a good idea to use the same variable
name for the loop as you did in the input code above.
In this case it won't bite you but it could get
confusing. I'd suggest maybe just use 'item' instead?


>   #Calculate the total cost for the grocery_item.
>   item_total = number * price

You don't have variables called 'number' or 'price'
but you do have dictionary keys in grocery_item.
So you really need:

item_total = grocery_item['number'] * grocery_item['price']

>   #Add the item_total to the grand_total
>   item_total = grand_total

You are not adding you are assigning. And in fact
you are wiping out your total by replacing it with 0!

>   #Output the information for the grocery item to match this example:
>   #2 apple @ $1.49 ea $2.98
>   print('number', 'name', 'price', 'cost')

Her you just print the key strings not the actuial values.
Again you need to use the keys to access the item.

>   #Set the item_total equal to 0
>   item_total = 0
> #Print the grand total
> print(grand_total)


HTH, but, if you have more specific queries, come back to
us with more detail.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos



From 1019shaun at gmail.com  Mon Nov 27 15:47:05 2017
From: 1019shaun at gmail.com (Howard Lawrence)
Date: Mon, 27 Nov 2017 12:47:05 -0800
Subject: [Tutor] calling function
Message-ID: <CAG0JesjQKBnNTgCg8JBeji05_uu2D8saYvGFd7wX-r7nfihEuw@mail.gmail.com>

import turtle
# this part draws a square
def square():

    my_turtle = turtle.Turtle()
    my_turtle.forward(100)
    my_turtle.left(90)
    my_turtle.forward(100)
    my_turtle.left(90)
    my_turtle.forward(100)
    my_turtle.left(90)
    my_turtle.forward(100)
square()

my_turtle.forward(100)

# this is a second square
square()

   # my_turtle.forward(100)
   # my_turtle.left(90)
   # my_turtle.forward(100)
   # my_turtle.left(90)
   # my_turtle.forward(100)
   # my_turtle.left(90)
   # my_turtle.forward(100)



what is wrong with this, and how to fix it
the code is suppose to make two box but only make one
using python 3.5 idle on windows 7

From DerekSmith at racksquared.com  Mon Nov 27 16:24:34 2017
From: DerekSmith at racksquared.com (Derek Smith)
Date: Mon, 27 Nov 2017 21:24:34 +0000
Subject: [Tutor] get javascript output data from ssi file
Message-ID: <BN6PR1201MB2483FD03741451050247FE89DD250@BN6PR1201MB2483.namprd12.prod.outlook.com>

I have not found a way into my tape library from the manufacture IBM, there's no command-line or api I am aware of nor is google. I need to get what this library thinks is its tape volumes inventory.  I have used chrome to view the code and its using adobe's SSI files which then calls a jscript.  Does python provide any way into this tricky application?  I tried cURL but from my understanding it will not provide such data since its pulls markup.  Below is the code in a file called move_element_operations.ssi according to chromes inspect command via right-click.  The volume listing and volumes are highlighted.

Thx in advance!!


<HTML>
                <HEAD>
                                <META HTTP-EQUIV="Refresh" CONTENT="9999">
                                <TITLE></TITLE>
                                <LINK href="style.css" rel="stylesheet" type="text/css">
                                <LINK href="ibm.css" rel="stylesheet" type="text/css">
                                <SCRIPT LANGUAGE="javascript">
                                                function actionConfirm()
                                                {
                                                                return confirm('Are you sure?');
                                                }

                                                function actionSamePartitionConfirm(source,destination)
                                                {
                                                                /* different logocal libraries, no mailslot to mailslot move */
                                                                if( (source[3] != destination[3])
                                                                                && !((source[1].toUpperCase() == "M") && (destination[1].toUpperCase() == "M"))
                                                                                && !(destination[1].toUpperCase() == "M") && (source[3] != 9))
                                                                {
                                                                                return confirm( "Movement between Partitions, are you sure?" );
                                                                }
                                                                else return true;
                                                }

                                                function preMoveCheck()
                                                {
                                                                //get currently selected items
                                                                destIndex = -1;
                                                                sourceIndex = -1;
                                                                while( document.getElementsByName("unique_table_radio1")[++sourceIndex].checked == false )
                                                                {
                                                                                if( document.getElementsByName("unique_table_radio1")[sourceIndex + 1] == null )
                                                                                {
                                                                                                sourceIndex = -1;
                                                                                                break;
                                                                                }
                                                                }
                                                                while( document.getElementsByName("unique_table_radio0")[++destIndex].checked == false )
                                                                {
                                                                                if( document.getElementsByName("unique_table_radio0")[destIndex + 1] == null )
                                                                                {
                                                                                                destIndex = -1;
                                                                                                break;
                                                                                }
                                                                }

                                                                if( (sourceIndex > -1) && (destIndex > -1) )
                                                                {
                                                                                //extract data
                                                                                var searchString = /([A-Z])(\d+)_(\d)_(\d)/;
                                                                                source = searchString.exec( document.getElementsByName("unique_table_radio1")[sourceIndex].value );
                                                                                destination = searchString.exec( document.getElementsByName("unique_table_radio0")[destIndex].value );

                                                                                if( (source != null) && (destination != null) )
                                                                                {
                                                                                                //alert( source[0] + " " + source[1] + " " + source[2] + " " + source[3] + " " + source[4] );
                                                                                                //alert( destination[0] + " " + destination[1] + " " + destination[2] + " " + destination[3] + " " + destination[4] );
                                                                                                if( actionSamePartitionConfirm(source,destination) )
                                                                                                {
                                                                                                                return true;
                                                                                                }
                                                                                                else
                                                                                                {
                                                                                                                return false;
                                                                                                }

                                                                                }
                                                                                else
                                                                                {
                                                                                                return true;
                                                                                }
                                                                }
                                                                else
                                                                {
                                                                                return true;
                                                                }
                                                }

                                </SCRIPT>
                </HEAD>

                <BODY class="main">

                                <FORM name="device_form" action="/RMUMoveElements" method="POST">
<INPUT type="hidden" id="CSRFToken" name="CSRFToken" value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" >
<TABLE border="0" align="center">
              <TR>
                  <TD valign="top" align="center" width="45%">
<div style="font-size:small; font-weight:bold">Source</div>
<div class="headerOuter" id="uniqueTableId1_headerDiv" style="height: 23px;width:220px;"><div class="headerInner">
<div style="width:40px; height: 23px;" class="columnHeader"><div class="spacerPad"></div></div>
<div style="width:78px; height: 23px;" class="columnHeader"><div class="spacerPad">Element</div></div>
<div style="width:98px; height: 23px; border-right:0px;" class="columnHeader"><div class="spacerPad">Volume Serial</div></div>
                      </div></div>
<div class="scrollingTable" id="uniqueTableId1_scrollingTableDiv" style="height: 300px;width:220px;">
<table id="uniqueTableId1" class="tableScrollable tableWithCheckbox" border="1" cellpadding="0" cellspacing="0" align="center"  width="100%">
                              <thead>
<tr class="rowWithReaderCaption">
<th class="cellWithCheckbox" width="40px"><input tableid="uniqueTableId1" type="checkbox"></th>
                                      <th width="78px"> Element</th>
                                      <th width="98px">Volume Serial</th>
                                  </tr>
                              </thead>
                              <tbody>
<tr id="uniqueTableId1_dummyRow" class="rowEmpty">
                                      <td width="40px"><div> </div></td>
                                      <td width="78px"><div></div></td>
                                      <td width="98px"><div></div></td>
                                  </tr>

<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="D0_0_5"></TD>
         <TD width="78px">Drive 1 (1)</TD>
           <TD width="98px">R20122L5</TD>
      </TR>
       <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="D1_0_5"></TD>
         <TD width="78px">Drive 2 (1)</TD>
           <TD width="98px">R20277L5</TD>
      </TR>

<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="D2_0_5"></TD>
         <TD width="78px">Drive 3 (1)</TD>
           <TD width="98px">R20265L5</TD>
      </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S1_0_5"></TD>
<TD width="78px">Slot 1 (1)</TD>
          <TD width="98px">R20435L5</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S2_0_5"></TD>
<TD width="78px">Slot 2 (1)</TD>
          <TD width="98px">R20061L5</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S3_0_5"></TD>
<TD width="78px">Slot 3 (1)</TD>
          <TD width="98px">R20408L5</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S5_0_5"></TD>
<TD width="78px">Slot 4 (1)</TD>
          <TD width="98px">R20063L5</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S6_0_5"></TD>
<TD width="78px">Slot 5 (1)</TD>
          <TD width="98px">R20218L5</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S7_0_5"></TD>
<TD width="78px">Slot 6 (1)</TD>
          <TD width="98px">R20465L5</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S9_0_5"></TD>
<TD width="78px">Slot 7 (1)</TD>
          <TD width="98px">R20261L5</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S10_0_5"></TD>
<TD width="78px">Slot 8 (1)</TD>
          <TD width="98px">R20561L5</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S12_0_5"></TD>
<TD width="78px">Slot 10 (1)</TD>
          <TD width="98px">R20378L5</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S13_0_5"></TD>
<TD width="78px">Slot 11 (1)</TD>
          <TD width="98px">R20255L5</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S14_0_5"></TD>
<TD width="78px">Slot 12 (1)</TD>
          <TD width="98px">R20445L5</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S15_0_5"></TD>
<TD width="78px">Slot 13 (1)</TD>
          <TD width="98px">R20052L5</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S16_0_5"></TD>
<TD width="78px">Slot 14 (1)</TD>
          <TD width="98px">R20498L5</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S17_0_5"></TD>
<TD width="78px">Slot 15 (1)</TD>
          <TD width="98px">R20345L5</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S18_0_5"></TD>
<TD width="78px">Slot 16 (1)</TD>
          <TD width="98px">R20325L5</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S19_0_5"></TD>
<TD width="78px">Slot 17 (1)</TD>
          <TD width="98px">R20037L5</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S20_0_5"></TD>
<TD width="78px">Slot 18 (1)</TD>
          <TD width="98px">R20272L5</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S21_0_5"></TD>
<TD width="78px">Slot 19 (1)</TD>
          <TD width="98px">R20446L5</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S23_0_5"></TD>
<TD width="78px">Slot 21 (1)</TD>
          <TD width="98px">R20372L5</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S24_0_5"></TD>
<TD width="78px">Slot 22 (1)</TD>
          <TD width="98px">R20121L5</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S26_0_5"></TD>
<TD width="78px">Slot 24 (1)</TD>
          <TD width="98px">R20027L5</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S27_0_5"></TD>
<TD width="78px">Slot 25 (1)</TD>
          <TD width="98px">R20082L5</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S28_0_5"></TD>
<TD width="78px">Slot 26 (1)</TD>
          <TD width="98px">R20347L5</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S29_0_5"></TD>
<TD width="78px">Slot 27 (1)</TD>
          <TD width="98px">R20065L5</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S30_0_5"></TD>
<TD width="78px">Slot 28 (1)</TD>
          <TD width="98px">R20331L5</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S31_0_5"></TD>
<TD width="78px">Slot 29 (1)</TD>
          <TD width="98px">R20296L5</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S35_0_5"></TD>
<TD width="78px">Slot 33 (1)</TD>
          <TD width="98px">R20494L5</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S36_0_5"></TD>
<TD width="78px">Slot 34 (1)</TD>
          <TD width="98px">R20030L5</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S40_0_5"></TD>
<TD width="78px">Slot 38 (1)</TD>
          <TD width="98px">R20373L5</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S41_0_5"></TD>
<TD width="78px">Slot 39 (1)</TD>
          <TD width="98px">R20292L5</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S44_0_5"></TD>
<TD width="78px">Slot 42 (1)</TD>
          <TD width="98px">R20158L5</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S45_0_5"></TD>
<TD width="78px">Slot 43 (1)</TD>
          <TD width="98px">R20578L5</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio1" value="S47_0_1"></TD>
<TD width="78px">Slot 45 *Res* </TD>
          <TD width="98px">CLNU76L1</TD>
     </TR>
                              </tbody>
                          </table>
                      </div>
                      <br>
                  </TD>
                  <TD align="center" width="10%">
<DIV class="setOfButtons">
<DIV class="buttonEnclosure">
<INPUT type="submit" name="move" value="Move &gt;" class="" onclick="return preMoveCheck()" >
<BR><INPUT type="submit" name="Refresh" value="Refresh" class="">
</DIV>
</DIV>
</TD>
                 <TD valign="top" align="center" width="45%">
<div style="font-size:small; font-weight:bold">Destination</div>
<div class="headerOuter" id="uniqueTableId0_headerDiv" style="height: 23px;width:220px;"><div class="headerInner">
<div style="width:40px; height: 23px;" class="columnHeader"><div class="spacerPad"></div></div>
<div style="width:78px; height: 23px;" class="columnHeader"><div class="spacerPad">Element</div></div>
<div style="width:98px; height: 23px; border-right:0px;" class="columnHeader"><div class="spacerPad">Volume Serial</div></div>
                      </div></div>
<div class="scrollingTable" id="uniqueTableId0_scrollingTableDiv" style="height: 300px;width:220px;">
<table id="uniqueTableId0" class="tableScrollable tableWithCheckbox" border="1" cellpadding="0" cellspacing="0" align="center"  width="100%">
                              <thead>
<tr class="rowWithReaderCaption">
<th class="cellWithCheckbox" width="40px"><input tableid="uniqueTableId0" type="checkbox"></th>
                                      <th width="78px"> Element</th>
                                      <th width="98px">Volume Serial</th>
                                  </tr>
                              </thead>
                              <tbody>
<tr id="uniqueTableId0_dummyRow" class="rowEmpty">
                                      <td width="40px"><div> </div></td>
                                      <td width="78px"><div></div></td>
                                      <td width="98px"><div></div></td>
                                  </tr>

<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio0" value="D3_0_5"></TD>
         <TD width="78px">Drive 4 (1)</TD>
           <TD width="98px">&nbsp;</TD>
      </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio0"value="M0_9_0"></TD>
<TD width="78px">I/O Station 1</TD>
          <TD width="98px">&nbsp;</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio0"value="M4_9_0"></TD>
<TD width="78px">I/O Station 2</TD>
          <TD width="98px">&nbsp;</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio0"value="M8_9_0"></TD>
<TD width="78px">I/O Station 3</TD>
          <TD width="98px">&nbsp;</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio0" value="S11_0_0"></TD>
<TD width="78px">Slot 9 (1)</TD>
          <TD width="98px">&nbsp;</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio0" value="S22_0_0"></TD>
<TD width="78px">Slot 20 (1)</TD>
          <TD width="98px">&nbsp;</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio0" value="S25_0_0"></TD>
<TD width="78px">Slot 23 (1)</TD>
          <TD width="98px">&nbsp;</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio0" value="S32_0_0"></TD>
<TD width="78px">Slot 30 (1)</TD>
          <TD width="98px">&nbsp;</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio0" value="S33_0_0"></TD>
<TD width="78px">Slot 31 (1)</TD>
          <TD width="98px">&nbsp;</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio0" value="S34_0_0"></TD>
<TD width="78px">Slot 32 (1)</TD>
          <TD width="98px">&nbsp;</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio0" value="S37_0_0"></TD>
<TD width="78px">Slot 35 (1)</TD>
          <TD width="98px">&nbsp;</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio0" value="S38_0_0"></TD>
<TD width="78px">Slot 36 (1)</TD>
          <TD width="98px">&nbsp;</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio0" value="S39_0_0"></TD>
<TD width="78px">Slot 37 (1)</TD>
          <TD width="98px">&nbsp;</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio0" value="S42_0_0"></TD>
<TD width="78px">Slot 40 (1)</TD>
          <TD width="98px">&nbsp;</TD>
     </TR>
<TR class="rowAlternatingColor" >
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio0" value="S43_0_0"></TD>
<TD width="78px">Slot 41 (1)</TD>
          <TD width="98px">&nbsp;</TD>
     </TR>
      <TR class="">
<TD class="cellWithCheckbox" width="40px"><input rowselector="yes" type="radio" name="unique_table_radio0" value="S46_0_0"></TD>
<TD width="78px">Slot 44 (1)</TD>
          <TD width="98px">&nbsp;</TD>
     </TR>
                              </tbody>
                          </table>
                      </div>
                      <br>
</TD></TR></TABLE></FORM>
                </BODY>
</HTML>

Derek Smith  |  Unix/TSM Administrator  | Racksquared Data Centers
':  614-437-4983 * 325 East Spring Street, Columbus, OH 43215
::  dereksmith at racksquared.com  *: www.racksquared.com<http://www.racksquared.com/> |  www.racksquared.jobs<http://www.racksquared.jobs/>

[cid:image003.png at 01D2E9AA.1B9CF8F0]


From marcus.luetolf at bluewin.ch  Mon Nov 27 15:39:37 2017
From: marcus.luetolf at bluewin.ch (=?utf-8?Q?marcus_l=C3=BCtolf?=)
Date: Mon, 27 Nov 2017 21:39:37 +0100
Subject: [Tutor] failed installation of Python 2.7
In-Reply-To: <f51d351b-a6e6-2c1d-32b9-b59930d840eb@gmail.com>
References: <000801d366b2$40bf0a30$c23d1e90$@bluewin.ch>
 <f51d351b-a6e6-2c1d-32b9-b59930d840eb@gmail.com>
Message-ID: <002901d367bf$d98c6e70$8ca54b50$@bluewin.ch>

many thanks, Peter
I could install the newest version of python 3.6 without
any problems but I need python 2.7 for tutorial purposes.
Marcus.

 

-----Urspr?ngliche Nachricht-----
Von: peter [mailto:peterrisley47 at gmail.com] 
Gesendet: Montag, 27. November 2017 20:20
An: marcus l?tolf <marcus.luetolf at bluewin.ch>
Betreff: Re: [Tutor] failed installation of Python 2.7

I had that problem and ended up using install python3 instead of 3.6 . I do not think that was the best answer as now python3 defaults to 3.5.4 and not 3.6! frustrating. Its suppose to install and default to the newest version you have! but it works. also I remember that it did install 2.7 which for backward compatible issues is necessary I guess?

I think your problem is baked in the cake and we will have to wait till newer versions come out. And as they say "Waiting is the hardest part!" 
Tom petty.


On 11/26/2017 02:29 AM, marcus l?tolf wrote:
> dear experts,
>
> cleaning up my computer I removed all my different Python versions,
>
> saving all .py and .txt files.
>
> I could reinstall Python 3.6 but not Python 2.7, getting an error mesage:
>
> ?a program required for this insatll could not be found?.
>
> Searching different websites I could not solve this problem.
> Might you be able to offre a solution?
>
>
>
> Marcus Luetolf
>
>   
>
>
>
> ---
> Diese E-Mail wurde von Avast Antivirus-Software auf Viren gepr?ft.
> https://www.avast.com/antivirus
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor



From alan.gauld at yahoo.co.uk  Mon Nov 27 19:19:50 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Tue, 28 Nov 2017 00:19:50 +0000
Subject: [Tutor] calling function
In-Reply-To: <CAG0JesjQKBnNTgCg8JBeji05_uu2D8saYvGFd7wX-r7nfihEuw@mail.gmail.com>
References: <CAG0JesjQKBnNTgCg8JBeji05_uu2D8saYvGFd7wX-r7nfihEuw@mail.gmail.com>
Message-ID: <ovia2u$9su$1@blaine.gmane.org>

On 27/11/17 20:47, Howard Lawrence wrote:
> import turtle
> # this part draws a square
> def square():
> 
>     my_turtle = turtle.Turtle()

Note that this creates my_turtle as a local
variable inside the function. It will not
be visible outside the function.

>     my_turtle.forward(100)
>     my_turtle.left(90)
>     my_turtle.forward(100)
>     my_turtle.left(90)
>     my_turtle.forward(100)
>     my_turtle.left(90)
>     my_turtle.forward(100)
> square()
> 
> my_turtle.forward(100)

So this should fail; with an error message
 - a name error most likely.

> # this is a second square
> square()

And this creates a new square directly on top of
the earlier one, so they look like one.

You need to create the turtle outside the function
and then refer to it from inside the function,
ideally by passing it in as an argument:


def square(aTurtle):
    aTurtle.forward(100)
etc...

my_turtle = turtle.Turtle()
square(my_turtle)
my_turtle.forward(100)
square(my_turtle)

HTH
-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos



From alan.gauld at yahoo.co.uk  Tue Nov 28 03:33:18 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Tue, 28 Nov 2017 08:33:18 +0000
Subject: [Tutor] failed installation of Python 2.7
In-Reply-To: <002901d367bf$d98c6e70$8ca54b50$@bluewin.ch>
References: <000801d366b2$40bf0a30$c23d1e90$@bluewin.ch>
 <f51d351b-a6e6-2c1d-32b9-b59930d840eb@gmail.com>
 <002901d367bf$d98c6e70$8ca54b50$@bluewin.ch>
Message-ID: <ovj706$sgh$1@blaine.gmane.org>

On 27/11/17 20:39, marcus l?tolf wrote:

> I could install the newest version of python 3.6 without
> any problems but I need python 2.7 for tutorial purposes.

Please provide the extra information previously requested
and we should be able to help.

What you want to do is easily possible we just need
more details to help.


> I think your problem is baked in the cake and we will 
> have to wait till newer versions come out. 

This is most certainly not true, many of us are running
multiple versions of Python, including 3.6 and 2.7
We just need to get to the root of your issue.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos



From alan.gauld at yahoo.co.uk  Tue Nov 28 03:42:23 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Tue, 28 Nov 2017 08:42:23 +0000
Subject: [Tutor] get javascript output data from ssi file
In-Reply-To: <BN6PR1201MB2483FD03741451050247FE89DD250@BN6PR1201MB2483.namprd12.prod.outlook.com>
References: <BN6PR1201MB2483FD03741451050247FE89DD250@BN6PR1201MB2483.namprd12.prod.outlook.com>
Message-ID: <ovj7h7$3t3$1@blaine.gmane.org>

On 27/11/17 21:24, Derek Smith wrote:
> I have not found a way into my tape library from the manufacture IBM, 
> there's no command-line or api I am aware of nor is google. 

I suspect you are asking the wrong questions. Have you tried
contacting IBM directly - if they make/sell it they should
support it! And it's almost inconceivable that there is no API.

>  I have used chrome to view the code 

I assume you mean that there is some kind of web application
and you are looking at the browser code? Not the actual code
of the tape management system?

Also, what tape library is it? Which OS are you using?
That would help a lot. It may be that the OS provides
a generic tape API that your product conforms too.

> and its using adobe's SSI files 

Sorry I've never heard of these before.

> <HTML>
>                 <HEAD>
>                                 <META HTTP-EQUIV="Refresh" CONTENT="9999">
>                                 <TITLE></TITLE>
>                                 <LINK href="style.css" rel="stylesheet" type="text/css">
>                                 <LINK href="ibm.css" rel="stylesheet" type="text/css">
>                                 <SCRIPT LANGUAGE="javascript">
>                                                 function actionConfirm()
>                                                 {
>                                                                 return confirm('Are you sure?');
>                                                 }

<snip />

Sending a long, unedited, badly formatted Javascript/html listing
to a Python mailing list is unlikely to win you support or favor.
Try extracting the salient functions and posting them.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos



From jeroen.vandeven at zwijsencollege.org  Thu Nov 30 03:20:32 2017
From: jeroen.vandeven at zwijsencollege.org (Jeroen van de Ven)
Date: Thu, 30 Nov 2017 09:20:32 +0100
Subject: [Tutor] Python
Message-ID: <CANTVSAhN+K41dySO=5kcR2AQ5bGip3709ucemq-GkPXszPup4Q@mail.gmail.com>

Hello,
Can you build these 4 programms for me?
1:
Input: 5 7 (rows and colloms)
Output:
*******
*******
*******
*******
*******

2:
Move all of the letters 23 places to the right. All capital letters.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (boodschap)
X Y Z A B C D E F G H I J K L M N O P Q R S T U V W (code)

N=23

Example
Input:   COMPUTER
Output: ZLJMRQBO

3: Bitcoin:
Make as much as possible money.
-You start with no bitcoin.
-You stop with no bitcoinJ
-Never have more then 1 bitcoin at a time.
-You can sell and buy a bitcoin whenever you want to.
First input = N, the amount of days. Then the input is the course of the
bitcoin of every day.
Output is 1 line with maximum of profit. It can be 0.
Example:
Input: 10 5 11 4 2 8 10 7 4 3 6
Output: 17

Kind Regards Jeroen van de Ven (beginner)

From michael.dowell297 at gmail.com  Thu Nov 30 11:26:20 2017
From: michael.dowell297 at gmail.com (Michael Dowell)
Date: Thu, 30 Nov 2017 10:26:20 -0600
Subject: [Tutor] Counting iterations of a function
Message-ID: <CACKZzpjvNTogLGPu=e44QtyoHJfnAAuAFTUSZfFCDz2jtxjzog@mail.gmail.com>

Hello, I'm trying to code a magic 8-ball program and it needs to include a
counter for the number of questions asked. I'm having a hard time
implementing a count, and need a little help. I had tried to implement it
in the main() function, but that (naturally) led it to only counting '1'
for each question, for each question asked. Is there a way to count how
many times a give line of code is executed? For instance, every time the
oracle() function is run, a counter goes up. Thanks for any help.

Program:


#Michael Dowell
#11-26-27
#Capstone: Magic 8-ball

#import modules
import random
import turtle


#Give welcome message
def print1():

    print("Hello!")
    print("Thank you for using this Magic 8-Ball Simulator.")
    print("We understand that you have a choice in magic 8-ball
experiences,\n and that you have no choice in viewing mine.")
    print("Thank you")

#Define main function

def main():
    #Set local variables
    count=0          #Tried to intergrate count into main() function
    query=''

#Get question
    query=str(input("Please type in your question(press 'Enter' to exit):"))

    while query!='':
        oracle()
        main()
        break

#Determine fate (the error "Variable 'fate' is not defined" was quite
existential)
def oracle():

    fateList=["It is certain","It is decidedly so","Without a doubt","Yes ?
definitely","You may rely on it","As I see it, yes","Most likely","Outlook
is good","Yes","Signs point to yes","Reply hazy, try again","Ask again
later","Better not tell you now","Cannot predict now","Concentrate and ask
again","Don?t count on it","My reply is no","My sources say no","Outlook
not so good","Very doubtful"]
    fate=fateList[random.randint(0,len(fateList))-1]

#Draw 8 ball/Refresh fate
    turtle.pensize(10)
    turtle.speed(7)
    turtle.hideturtle()
    turtle.goto(0,-200)
    turtle.fillcolor('black')
    turtle.begin_fill()
    turtle.circle(250)
    turtle.end_fill()
    turtle.goto(0,-50)
    turtle.fillcolor('blue')
    turtle.begin_fill()
    turtle.circle(150)
    turtle.end_fill()
    turtle.fillcolor('white')
    turtle.begin_fill()
    turtle.pendown()
    turtle.goto(130,150)
    turtle.goto(-130,150)
    turtle.goto(0,-50)
    turtle.end_fill()
    turtle.penup()
    turtle.goto(-75,125)
    x=turtle.pos()

    #Helvetica is the one true font
    turtle.write(fate,font=("Helvetica",12,"normal"))

#call functions
print1()
main()

#exit message

for count in range(20):
    print("Thanks for playing!")

From zachary.ware+pytut at gmail.com  Thu Nov 30 13:08:10 2017
From: zachary.ware+pytut at gmail.com (Zachary Ware)
Date: Thu, 30 Nov 2017 12:08:10 -0600
Subject: [Tutor] Python
In-Reply-To: <CANTVSAhN+K41dySO=5kcR2AQ5bGip3709ucemq-GkPXszPup4Q@mail.gmail.com>
References: <CANTVSAhN+K41dySO=5kcR2AQ5bGip3709ucemq-GkPXszPup4Q@mail.gmail.com>
Message-ID: <CAKJDb-OanCPD8cW-39Y6+kk9Bfu7w-Vk_iSV0nzbXTayWYqh+w@mail.gmail.com>

On Thu, Nov 30, 2017 at 2:20 AM, Jeroen van de Ven
<jeroen.vandeven at zwijsencollege.org> wrote:
> Hello,
> Can you build these 4 programms for me?

No, we will not do your homework for you.  However, you can show us
the code you've written, describe the problem you're having with it
(including the full text of all error messages), and we can help you
figure out where you've gone wrong.

Regards,
-- 
Zach

From breamoreboy at gmail.com  Thu Nov 30 13:10:26 2017
From: breamoreboy at gmail.com (Mark Lawrence)
Date: Thu, 30 Nov 2017 18:10:26 +0000
Subject: [Tutor] Python
In-Reply-To: <CANTVSAhN+K41dySO=5kcR2AQ5bGip3709ucemq-GkPXszPup4Q@mail.gmail.com>
References: <CANTVSAhN+K41dySO=5kcR2AQ5bGip3709ucemq-GkPXszPup4Q@mail.gmail.com>
Message-ID: <ovphia$5oa$1@blaine.gmane.org>

On 30/11/17 08:20, Jeroen van de Ven wrote:
> Hello,
> Can you build these 4 programms for me?

This list doesn't work like that.  We will not write code for you.  You 
make an attempt at the problems, we will then assist.

> 1:
> Input: 5 7 (rows and colloms)
> Output:
> *******
> *******
> *******
> *******
> *******
> 
> 2:
> Move all of the letters 23 places to the right. All capital letters.
> A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (boodschap)
> X Y Z A B C D E F G H I J K L M N O P Q R S T U V W (code)
> 
> N=23
> 
> Example
> Input:   COMPUTER
> Output: ZLJMRQBO
> 
> 3: Bitcoin:
> Make as much as possible money.
> -You start with no bitcoin.
> -You stop with no bitcoinJ
> -Never have more then 1 bitcoin at a time.
> -You can sell and buy a bitcoin whenever you want to.
> First input = N, the amount of days. Then the input is the course of the
> bitcoin of every day.
> Output is 1 line with maximum of profit. It can be 0.
> Example:
> Input: 10 5 11 4 2 8 10 7 4 3 6
> Output: 17
> 
> Kind Regards Jeroen van de Ven (beginner)

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

Mark Lawrence


From alan.gauld at yahoo.co.uk  Thu Nov 30 13:10:39 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Thu, 30 Nov 2017 18:10:39 +0000
Subject: [Tutor] Python
In-Reply-To: <CANTVSAhN+K41dySO=5kcR2AQ5bGip3709ucemq-GkPXszPup4Q@mail.gmail.com>
References: <CANTVSAhN+K41dySO=5kcR2AQ5bGip3709ucemq-GkPXszPup4Q@mail.gmail.com>
Message-ID: <ovphio$m4q$1@blaine.gmane.org>

On 30/11/17 08:20, Jeroen van de Ven wrote:
> Hello,
> Can you build these 4 programms for me?

Nice try.
The answer is yes we can, but no we won't.
You wouldn't learn anything if we did and
this list is here to teach.

That means you need to write the code and
we will offer help and suggestions.

> 1:
> Input: 5 7 (rows and colloms)
> Output:
> *******
> *******
> *******
> *******
> *******

Can you read a line of input and extract 2 numbers?
Can you write a loop that repeats as often as one
of the numbers you read?
Can you write a print statement that outputs as many '*'s as the other
number?
If so, put it together and jobs done.
If not do what you can and show us the result.

> 2:
> Move all of the letters 23 places to the right. All capital letters.
> A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (boodschap)
> X Y Z A B C D E F G H I J K L M N O P Q R S T U V W (code)
> 
> N=23
> 
> Example
> Input:   COMPUTER
> Output: ZLJMRQBO

Read a number.
Shift the letters - this is probably easiest with slicing
and a wee bit of slightly tricky arithmetic
Read the input word
Now use the two lists of letters to map each letter (hint Python has
some string functions that do precisely this.)


> 3: Bitcoin:
> Make as much as possible money.
> -You start with no bitcoin.
> -You stop with no bitcoinJ
> -Never have more then 1 bitcoin at a time.
> -You can sell and buy a bitcoin whenever you want to.
> First input = N, the amount of days. Then the input is the course of the
> bitcoin of every day.
> Output is 1 line with maximum of profit. It can be 0.
> Example:
> Input: 10 5 11 4 2 8 10 7 4 3 6
> Output: 17

Sorry, I know zilch about bitcoin, so don't even understand
the question.

> 
-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos



From neilc at norwich.edu  Thu Nov 30 14:42:01 2017
From: neilc at norwich.edu (Neil Cerutti)
Date: Thu, 30 Nov 2017 19:42:01 +0000 (UTC)
Subject: [Tutor] Counting iterations of a function
References: <CACKZzpjvNTogLGPu=e44QtyoHJfnAAuAFTUSZfFCDz2jtxjzog@mail.gmail.com>
Message-ID: <ovpmu8$3l8$1@blaine.gmane.org>

On 2017-11-30, Michael Dowell <michael.dowell297 at gmail.com> wrote:
> Hello, I'm trying to code a magic 8-ball program and it needs
> to include a counter for the number of questions asked. I'm
> having a hard time implementing a count, and need a little
> help. I had tried to implement it in the main() function, but
> that (naturally) led it to only counting '1' for each question,
> for each question asked. Is there a way to count how many times
> a give line of code is executed? For instance, every time the
> oracle() function is run, a counter goes up. Thanks for any
> help.
>
> Program:
> #import modules
> import random
> import turtle
>
>
> #Give welcome message
> def print1():
>
>     print("Hello!")
>     print("Thank you for using this Magic 8-Ball Simulator.")
>     print("We understand that you have a choice in magic 8-ball
> experiences,\n and that you have no choice in viewing mine.")
>     print("Thank you")
>
> #Define main function
>
> def main():
>     #Set local variables
>     count=0          #Tried to intergrate count into main() function
>     query=''
>
> #Get question
>     query=str(input("Please type in your question(press 'Enter' to exit):"))
>
>     while query!='':
>         oracle()
>         main()
>         break

You are combining a while loop and a recursive call to main in a
redundant way. A while loop without the complication of the
function calling itself makes things easier. By the way, input
returns a string, so you don't need to call "str" on it.

    query = input("Please type in your question(press 'Enter' to exit):")
    while query!='':
        oracle()
	count += 1
    	query = input("Please type in your question(press 'Enter' to exit):"))

When the while loop is finally complete, count will be the number
of times oracle has run. In current Python, pushing the query
into a separate function is a good way to eliminate the verbatim
repetition of code.

def get_query():
    return input("Please type in your question(press 'Enter' to exit):")

In main:

    query = get_query()
    while query!='':
        oracle()
	count += 1
    	query = get_query()

You can generalize function-call counting by writing a function
decorator that counts the number of times its function has run,
and then decorate oracle with it, but that pie is higher in the
sky than needed here.

-- 
Neil Cerutti


From bgailer at gmail.com  Thu Nov 30 15:17:49 2017
From: bgailer at gmail.com (Bob Gailer)
Date: Thu, 30 Nov 2017 15:17:49 -0500
Subject: [Tutor] Counting iterations of a function
In-Reply-To: <CACKZzpjvNTogLGPu=e44QtyoHJfnAAuAFTUSZfFCDz2jtxjzog@mail.gmail.com>
References: <CACKZzpjvNTogLGPu=e44QtyoHJfnAAuAFTUSZfFCDz2jtxjzog@mail.gmail.com>
Message-ID: <CAP1rxO5P0VPRB2krYq0k9HLyL1SFz6x-gSyhE=OALcwKi+P8JA@mail.gmail.com>

On Nov 30, 2017 12:56 PM, "Michael Dowell" <michael.dowell297 at gmail.com>
wrote:
>
> Hello, I'm trying to code a magic 8-ball program and it needs to include a
> counter for the number of questions asked. I'm having a hard time
> implementing a count, and need a little help. I had tried to implement it
> in the main() function, but that (naturally) led it to only counting '1'
> for each question, for each question asked. Is there a way to count how
> many times a give line of code is executed? For instance, every time the
> oracle() function is run, a counter goes up. Thanks for any help.
>
> Program:
>
>
> #Michael Dowell
> #11-26-27
> #Capstone: Magic 8-ball
>
> #import modules
> import random
> import turtle
>
>
> #Give welcome message
> def print1():
>
>     print("Hello!")
>     print("Thank you for using this Magic 8-Ball Simulator.")
>     print("We understand that you have a choice in magic 8-ball
> experiences,\n and that you have no choice in viewing mine.")
>     print("Thank you")
>
> #Define main function
>
> def main():
>     #Set local variables
>     count=0          #Tried to intergrate count into main() function
>     query=''
>
> #Get question
>     query=str(input("Please type in your question(press 'Enter' to
exit):"))
>
>     while query!='':
>         oracle()
>         main()
Your problem is here. Instead of calling main recursively you should move
the while to the top of the main function preceded by assigning something
to query. Also get rid of the break statement
>         break

>
> #Determine fate (the error "Variable 'fate' is not defined" was quite
> existential)
> def oracle():
>
>     fateList=["It is certain","It is decidedly so","Without a doubt","Yes
?
> definitely","You may rely on it","As I see it, yes","Most likely","Outlook
> is good","Yes","Signs point to yes","Reply hazy, try again","Ask again
> later","Better not tell you now","Cannot predict now","Concentrate and ask
> again","Don?t count on it","My reply is no","My sources say no","Outlook
> not so good","Very doubtful"]
>     fate=fateList[random.randint(0,len(fateList))-1]
>
> #Draw 8 ball/Refresh fate
>     turtle.pensize(10)
>     turtle.speed(7)
>     turtle.hideturtle()
>     turtle.goto(0,-200)
>     turtle.fillcolor('black')
>     turtle.begin_fill()
>     turtle.circle(250)
>     turtle.end_fill()
>     turtle.goto(0,-50)
>     turtle.fillcolor('blue')
>     turtle.begin_fill()
>     turtle.circle(150)
>     turtle.end_fill()
>     turtle.fillcolor('white')
>     turtle.begin_fill()
>     turtle.pendown()
>     turtle.goto(130,150)
>     turtle.goto(-130,150)
>     turtle.goto(0,-50)
>     turtle.end_fill()
>     turtle.penup()
>     turtle.goto(-75,125)
>     x=turtle.pos()
>
>     #Helvetica is the one true font
>     turtle.write(fate,font=("Helvetica",12,"normal"))
>
> #call functions
> print1()
> main()
>
> #exit message
>
> for count in range(20):
>     print("Thanks for playing!")
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor

From sydney.shall at kcl.ac.uk  Thu Nov 30 10:37:42 2017
From: sydney.shall at kcl.ac.uk (Shall, Sydney)
Date: Thu, 30 Nov 2017 15:37:42 +0000
Subject: [Tutor] problem with a sub-class
Message-ID: <04ccf72d-5949-b8d9-5518-90ba7954b306@kcl.ac.uk>

I am almost a beginner.
I have an error message which I cannot understand.
My problem is with constructing a sub-class.

I use;
MAC OS V10.13.1
Anaconda Python 3.5

My base Class works properly and all 136 tests of the Base Class are 
correct.

My sub-class is constructed as follows:

import sys
import random
import numpy as np
import pylab
import copy
import Population_InitV8 as POCI
import Population_ProductivityV24 as POCWP

line 27 : class SimulateCycleZero(POCWP):
line 28 :     def __init__(self, dirname_p):

The program follows on from this.

The error message is as follows:


   File 
"/Users/sydney/AnacondaProjects/Capital/Capital_with_productivity/Current_Versions/Simulate_Cycle_Zero_V3.py", 
line 27, in <module>
     class SimulateCycleZero(POCWP):

TypeError: module.__init__() takes at most 2 arguments (3 given)


My problem is that I do not understand to which file the word 'module' 
in the error message applies.

It seems to me that somewhere I am providing 3 arguments when only a 
maximum of two are required.

When I do the following, I get the same error message.

line 27 : class SimulateCycleZero(POCWP):
line 28 :     def __init__(self):

I would appreciate some guidance , please.

Sydney
_________

Professor Sydney Shall
Department of Haematology/Oncology
Phone: +(0)2078489200
E-Mail: sydney.shall
[Correspondents outside the College should add @kcl.ac.uk]

From Sydney282003 at yahoo.com  Thu Nov 30 12:51:07 2017
From: Sydney282003 at yahoo.com (Sydney282003)
Date: Thu, 30 Nov 2017 17:51:07 +0000
Subject: [Tutor] problem with sub-classing
Message-ID: <6ff7c70b-3c36-5d6c-a4f1-767fb9733035@yahoo.com>

I am almost a beginner.
I have an error message which I cannot understand.
My problem is with constructing a sub-class.

I use;
MAC OS V10.13.1
Anaconda Python 3.5

My base Class works properly and all 136 tests of the Base Class are 
correct.

My sub-class is constructed as follows:

import sys
import random
import numpy as np
import pylab
import copy
import Population_InitV8 as POCI
import Population_ProductivityV24 as POCWP

My program starts thus:

line 27 : class SimulateCycleZero(POCWP):
line 28 :???? def __init__(self, dirname_p):

The program follows on from this.

The error message is as follows:


 ? File 
"/Users/sydney/AnacondaProjects/Capital/Capital_with_productivity/Current_Versions/Simulate_Cycle_Zero_V3.py", 
line 27, in <module>
 ??? class SimulateCycleZero(POCWP):

TypeError: module.__init__() takes at most 2 arguments (3 given)


My problem is that I do not understand to which file the word 'module' 
in the error message applies.

It seems to me that somewhere I am providing 3 arguments when only a 
maximum of two are required.

When I do the following, I get the same error message.

line 27 : class SimulateCycleZero(POCWP):
line 28 :???? def __init__(self):

I would appreciate some guidance , please.

Sydney





-- 
Sydney282003


From alan.gauld at yahoo.co.uk  Thu Nov 30 17:08:30 2017
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Thu, 30 Nov 2017 22:08:30 +0000
Subject: [Tutor] problem with a sub-class
In-Reply-To: <04ccf72d-5949-b8d9-5518-90ba7954b306@kcl.ac.uk>
References: <04ccf72d-5949-b8d9-5518-90ba7954b306@kcl.ac.uk>
Message-ID: <ovpvgn$ils$1@blaine.gmane.org>

On 30/11/17 15:37, Shall, Sydney wrote:

> My problem is with constructing a sub-class.
> 
> My sub-class is constructed as follows:
> 
> import Population_ProductivityV24 as POCWP

Note that POCWP is an alias for the *module* Population_ProductivityV24.
It is not a class.

> line 27 : class SimulateCycleZero(POCWP):

Here you define a class that subclasses your imported module.
Frankly I'm surprised that you don't get an error there
but hey...

> line 28 :     def __init__(self, dirname_p):

But this is now an init for a subclass of module.

> The error message is as follows:
> 
>    File 
> "/Users/sydney/AnacondaProjects/Capital/Capital_with_productivity/Current_Versions/Simulate_Cycle_Zero_V3.py", 
> line 27, in <module>
>      class SimulateCycleZero(POCWP):
> 
> TypeError: module.__init__() takes at most 2 arguments (3 given)

So I'm guessing the use of a module to subclass
has confused things and I confess I'm not clear on
exactly what is going on and why you get this message.
But I'm pretty sure you don;t want to subclass your
imported module and thats the mistake.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos