3D surface plot

2019-03-17 Thread Keith Anthony
I should know this ...! Anyway, I have a list of 36 tuples, each with
x, y, z values  I want to create a surface plot ...
Need help putting data into right format for matplot3D ...


This is a gmail account used by Keith D. Anthony


On Sat, Mar 16, 2019 at 12:03 PM  wrote:

> Send Python-list mailing list submissions to
> python-list@python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://mail.python.org/mailman/listinfo/python-list
> or, via email, send a message with subject or body 'help' to
> python-list-requ...@python.org
>
> You can reach the person managing the list at
> python-list-ow...@python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Python-list digest..."
> Today's Topics:
>
>1. Re: Question regarding the local function object (Terry Reedy)
>2. subprocess svn checkout password issue (Martin De Kauwe)
>3. RE: asyncio Question (Joseph L. Casale)
>4. Re: Implement C's Switch in Python 3 (jf...@ms4.hinet.net)
>5. Re: subprocess svn checkout password issue (dieter)
>6. Re: subprocess svn checkout password issue (Martin De Kauwe)
>7. Re: Question regarding the local function object (Gregory Ewing)
>8. Re: how to embed non-tkinter VLC player into grid of tkinter
>   with python? (akashsahu...@gmail.com)
>9. Re: subprocess svn checkout password issue (Dan Sommers)
>
>
>
> -- Forwarded message --
> From: Terry Reedy 
> To: python-list@python.org
> Cc:
> Bcc:
> Date: Fri, 15 Mar 2019 13:00:50 -0400
> Subject: Re: Question regarding the local function object
> On 3/15/2019 8:47 AM, Arup Rakshit wrote:
> > Hi,
> >
> > I am reading a book where it says that:
> >
> > Just like module-level function definitions, the definition of a local
> function happens at run time when the def keyword is executed.
> Interestingly, this means that each call to sort_by_last_letter results in
> a new definition of the function last_letter. That is, just like any other
> name bound in a function body, last_letter is bound separately to a new
> function each time sort_by_last_letter is called.
> >
> > If that above is true, why the below program shows the same object
> reference for last_letter every time I call function sort_by_last_letter.
> >
> > # file name is sample.py
> >
> > def sort_by_last_letter(strings):
> >  def last_letter(s):
> >  return s[-1]
> >  print(last_letter)
> >  return sorted(strings, key=last_letter)
> >
> > python3 -i sample.py
>  sort_by_last_letter(['ghi', 'def', 'abc'])
> > .last_letter at 0x1051e0730>
> > ['abc', 'def', 'ghi']
>  sort_by_last_letter(['ghi', 'def', 'abc'])
> > .last_letter at 0x1051e0730>
> > ['abc', 'def', 'ghi']
>  sort_by_last_letter(['ghi', 'def', 'abckl'])
> > .last_letter at 0x1051e0730>
> > ['def', 'ghi', 'abckl']
>
> To build on Calvin's explanation ...
> intersperse other function definitions between the repeated calls
>
> sort_by_last_letter(['ghi', 'def', 'abc'])
> def a(): return 'skjsjlskjlsjljs'
> print(a)
> sort_by_last_letter(['ghi', 'def', 'abc'])
> def b(): return 546465465454
> print(b)
> sort_by_last_letter(['ghi', 'def', 'abc'])
>
> and memory gets reused a different way.
>
> .last_letter at 0x03A51D40>
>   # <== is same memory as .
> .last_letter at 0x043C2710>
>   # ditto
> .last_letter at 0x043C2768>
>
> Creating a new list or string did not have the same effect.  I believe
> that CPython function objects must currently all have the same size or
> at least the same max size and conclude that CPython currently allocates
> them from a block of memory that is some multiple of that size.  These
> are, of course, current internal implementation details, subject to
> change and even variation across hardware and OSes.
>
> --
> Terry Jan Reedy
>
>
>
>
>
> -- Forwarded message --
> From: Martin De Kauwe 
> To: python-list@python.org
> Cc:
> Bcc:
> Date: Fri, 15 Mar 2019 15:17:22 -0700 (PDT)
> Subject: subprocess svn checkout password issue
> Hi,
>
> I'm trying to write a script that will make a checkout from a svn repo and
> build the result for the user. However, when I attempt to interface with
> the shell it asks the user for their filename and I don't know how to
> capture this with my implementation.
>
> user = "XXX578"
> root="https://trac.nci.org.au/svn/cable;
> repo_name = "CMIP6-MOSRS"
>
> cmd = "svn checkout %s/branches/Users/%s/%s" % (root, user, repo_name)
> p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,
>   stdout=subprocess.PIPE,
> stderr=subprocess.PIPE)
> error = subprocess.call(cmd, shell=True)
> if error is 1:
> raise("Error downloading repo"
>
> I tried adding .wait(timeout=60) to the subprocess.Popen command but that
> didn't work.
>
> Any advice on whether there is an augmentation to the above, or a better
> approach, would be much appreciated. I need to solve 

Elastic Search

2017-04-07 Thread Keith Anthony
I need some insightful examples of elastic search, using REGEX ...
And using REST.
-- 
https://mail.python.org/mailman/listinfo/python-list


Please post Chuck Missler Bible audio/video

2011-02-16 Thread Keith Anthony
Anything from Chuck Missler .  I've lost my collection.
Thanks.


-- 
- --- -- -
Posted with NewsLeecher v4.0 Final
Web @ http://www.newsleecher.com/?usenet
--- -  -- -

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


Re: More Help with python .find fucntion

2011-01-08 Thread Keith Anthony
THanks ... I am new to Python ...

Comparing the result of find with -1 fixes the bug ... some
of the endobj start in the firt position ...

You're right about the lines ending in \n by accident,
EXCEPT in PDF files items are separated by obj \n
and endobj\n


-- 
- --- -- -
Posted with NewsLeecher v4.0 Final
Web @ http://www.newsleecher.com/?usenet
--- -  -- -

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


More Help with python .find fucntion

2011-01-07 Thread Keith Anthony
My previous question asked how to read a file into a strcuture
a line at a time.  Figured it out.  Now I'm trying to use .find
to separate out the PDF objects.  (See code)  PROBLEM/QUESTION:
My call to lines[i].find does NOT find all instances of endobj.
Any help available?  Any insights?

#!/usr/bin/python

inputfile =  file('sample.pdf','rb')# This is PDF with which we 
will work
lines = inputfile.readlines()   # read file one line at a time

linestart = []  # Starting address for each line
lineend = []# Ending address for each line
linetype = []

print len(lines)# print number of lines

i = 0   # define an iterator, i
addr = 0# and address pointer

while i  len(lines):   # Go through each line
linestart = linestart + [addr]
length = len(lines[i])
lineend = lineend + [addr + (length-1)]
addr = addr + length
i = i + 1

i = 0
while i  len(lines):   # Initialize line types as 
normal
linetype = linetype + ['normal']
i = i + 1

i = 0
while i  len(lines):   # 
if lines[i].find(' obj')  0:
linetype[i] = 'object'
print At address ,linestart[i],object found at line ,i,: , 
lines[i]
if lines[i].find('endobj')  0:
linetype[i] = 'endobj'
print At address ,linestart[i],endobj found at line ,i,: , 
lines[i]
i = i + 1



-- 
- --- -- -
Posted with NewsLeecher v4.0 Final
Web @ http://www.newsleecher.com/?usenet
--- -  -- -

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