On 2/28/19, Chip Wachob wrote:
>
> Python 2.7 & Windows and also Linux are the platforms being used. Running
> the code from the command line / terminal as python except.py. Note that
> it does work properly in Linux. So I'm guessing I need to test for a
> different exception along with the
On 28/02/2019 21:03, Chip Wachob wrote:
> it does work properly in Linux. So I'm guessing I need to test for a
> different exception along with the KeyboardInterrupt??
Don't guess, test.
Write a single line script
raw_input('> ')
Run it in a console.
Hit Ctrl-C while it waits for input.
See
> On Feb 28, 2019, at 17:23, Alan Gauld via Tutor wrote:
>
> On 28/02/2019 14:45, nathan tech wrote:
>
>> but I'm thinking, should I do this?
Honestly, scheduling is the last thing to figure out. As mentioned, it’s
probably better to focus on backups and leave the scheduling to the OS tools
On 28/02/2019 14:45, nathan tech wrote:
> but I'm thinking, should I do this?
No. fOr several reasons...
> def do_backup
> # backup code here,
>
> def scheduler():
> global tus # tus=time until schedule
>
> while(time.time()>tus):
> time.sleep(5)
> scheduler()
scheduler doesn't
Sorry, I hit send too quick...
I realise you haven't written a busy loop, but the way you wrote your
scheduler, you can only schedule jobs to the nearest 5 seconds. That's
probably okay for a backup process that might take a few hours to run,
but it is hardly a good solution to things that
On Thu, Feb 28, 2019 at 02:45:59PM +, nathan tech wrote:
> Hi there,
>
> I recently started working on a backup program, and the one big feature
> everyone wants in backup programs is the ability to schedule backups, right?
>
> but I'm thinking, should I do this?
[...]
> Is that wise? Is
Hello,
Python 2.7 & Windows and also Linux are the platforms being used. Running
the code from the command line / terminal as python except.py. Note that
it does work properly in Linux. So I'm guessing I need to test for a
different exception along with the KeyboardInterrupt??
So, the code
Hi there,
I recently started working on a backup program, and the one big feature
everyone wants in backup programs is the ability to schedule backups, right?
but I'm thinking, should I do this?
def do_backup
# backup code here, without prints to screen or anything so it just
does it in
I think it could be solved in a much easier way.
s.replace('\n ', '')
In other words removing a new line followed by a space.
In such case, the approach is not by line.
f = open('file.ics')
content=f.read().replace('\n ', '')
f.close()
The real use case is an .ics file.
It works as expected
- Messaggio originale -
> Da: "Valerio Pachera"
> A: "Tutor Python"
> Inviato: Giovedì, 28 febbraio 2019 13:05:27
> Oggetto: Re: [Tutor] Remove soft line break
>...
> It works as expected but there's a thing I've to understand about the end of
> line in general.
> ...
> I noticed that
Wow! What a treasure of information.
>From the looks of it, I'm going to give colorama a try. It seems like it
will do what I want to do, and, if I'm reading the documentation correctly,
it will work cross platform. Ie: if I am in Linux, it will simply be
ignored. And, it appears to interpret
yes - usually that was the prompt for the terminal to insert a new line ... on
some terminals this is a behaviour you can't control as it's implemented in
hardware, so curses fakes things by moving the cursor back to where it "should"
be afterward.
If you try and to something when the cursor
12 matches
Mail list logo