Hi Terry,
> I have Learning Python (
> http://shop.oreilly.com/product/0636920028154.do ) in paper and
> ebook versions.
I haven't, but a look on the Internet suggests "Arbitrary Arguments
Examples" in Ch. 18, "Arguments", shows you how apschedule is saving
that `args=(1,)' tuple you're passing
On Sunday, 21 August 2016 18:13:14 BST Peter Merchant wrote:
> What book do you have? I have two free ebooks on it byteofpython,
> http://python.swaroopch.com/ and diveintopython.
> http://www.diveintopython.net/
I paid for mine :-)
I have Learning Python (
On 21/08/16 16:50, Terry Coles wrote:
OK.I couldn't see an example in my Python
book, so kind of ran out of ideas.
Does anyone know what will work?
What book do you have? I have two free ebooks on it byteofpython,
http://python.swaroopch.com/ and diveintopython.
Hi Terry,
> On the piCore forum, the guys were trying to get me to use asyncio,
> instead of apscheduler, but I found a total lack of suitable examples
> and I got the impression that it wasn't really intended for what I
> wanted to do; it just was possible.
asyncio is a new whizzy thing added
On Sunday, 21 August 2016 17:10:32 BST Ralph Corderoy wrote:
> Try
>
> sched.add_cron_job(hours, args=('1',))
>
> And look for `args' and `kwargs' in the documentation for the add*
> functions you're using. It's a Python convention, but not part of the
> language; apscheduler will have
Hi Terry,
> sched.add_cron_job(hours(1), hour='1')
>
> with the function redefined as:
>
> def hours(hour):
> print(hour + "O'clock")
That will call hours() to work out the parameter to pass to
add_cron_job().
Try
sched.add_cron_job(hours, args=('1',))
And look for `args' and
OK. So now my code runs, but it isn't very efficient. Currently I have one of
these for every hour and every quarter throughout the day:
def one_oclock():
print("One O'clock")
print(datetime.datetime.now())
time.sleep(120)
os.system('mpg321 -g 20 -q ./mp3/Wedding_March.mp3')
On Sunday, 21 August 2016 16:23:13 BST Ralph Corderoy wrote:
> Going back to your first mail, there's three ways of running it.
>
> > #!/usr/bin/env python
>
> ...
>
> > #!/usr/bin/env python2.7
>
> ...
>
> > Python 2.7.12 (default, Jul 1 2016, 15:12:24)
>
> For the
Hi Terry,
> Well actually it was in the first line of the shell output at runtime:
>
> Python 2.7.12 (default, Jul 1 2016, 15:12:24)
Going back to your first mail, there's three ways of running it.
> #!/usr/bin/env python
...
> #!/usr/bin/env python2.7
...
> Python 2.7.12
On Sunday, 21 August 2016 15:53:47 BST Terry Coles wrote:
> > Add `import logging' to your other imports, and then immediately after
> > try `logging.basicConfig()'.
>
> I've done that and am currently waiting for the next schedule job to occur
> (1600). Where should I expect the logger to write
Hi Terry,
> No handlers could be found for logger "apscheduler.scheduler"
It's handy for Python questions to state whether it's 2 or 3. :-)
Running Python in the same method as your script with its --version
option will say.
Add `import logging' to your other imports, and then immediately
Hi,
Most of you are aware by now that Clive and I have a project to bring the
bells back to the Wimborne Model Town Minster. I've been experimenting with
using apscheduler and mpg321 in Python to realise this. It's pretty crude at
the moment, but if I run two separate programs (the bells and
Hi Tim,
> I ran "inxi -n" and according to that the Ethernet adaptor is an Intel
> I217-LM which use the e1000-e driver. I ran lsmod which is saying that
> the driver is loaded but unused. Booting the PC into windows show that
> the Ethernet does work without a problem so it seems to be undamaged
I have a bit of an odd ball one here. I have acquired a Laptop with a
smashed screen, I have removed the LCD screen and hooked up the laptop
to an external monitor. I have booted from the latest SolydX 64bit DVD
which comes up using the ext. display as the main display. The wireless
works but
14 matches
Mail list logo