× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Fri, Jun 18, 2021 at 3:23 PM Greg Wilburn
<gwilburn@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

I actually thought about doing exactly [the steps that Jerry mentioned]... take the above file and parse out the date. But I'm not sure if the date will always be in the same location/format, etc.

If you are always connecting to the same system, then you can be
reasonably sure that the date will always be in the same location and
format.

I actually couldn't tell for sure whether the steps Jerry mentioned
were for if you *do* use Python and Pexpect, or if you *don't*.

I'm guessing the Python solution would be better... is there an example somewhere a novice could begin with?

There wasn't just one Python solution, at least the way I look at it.
To me, Jerry was suggesting using Python in a different way than I
was.

Given that you were already thinking along the lines of using familiar
FTP commands, my recommendation for dipping your toes in Python for
this task is a library called ftpretty. It is very close to plain old
FTP, just with Python syntax. Take a look at this page and see if the
examples seem reasonably readable to you:

https://pypi.org/project/ftpretty/

If so, then I should be able to get you started and answer any
questions you may have. One thing to note in those examples: The
`list` function with the optional parameter `extra=True` does the date
parsing for you.

You really don't need to know much Python to use a lot of these libraries.

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.