t unskilled
programmers won't understand.
You can even create a default object in the main library with some
sensible defaults and bind out the methods as functions just to provide
a quick and easy answer for people who don't care.
class Library:
...
_defaultlib = Library()
_
Steven D'Aprano wrote:
> On Thursday 17 November 2016 04:52, Rob Gaddi wrote:
>
>>> import library
>>> result = library.make_spam(arg)
>>>
>>>
>>> versus:
>>>
>>> import library
>>> make_spam = library.make_libr
calculations on arbitrary sized
signed/unsigned ints, figuring how to parallelize them into numpy arrays
would save you a ton of time.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org
;
Agreed. If you had to do a lot of calculations on arbitrary sized
signed/unsigned ints, figuring how to parallelize them into numpy arrays would
save you a ton of time.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address
domain is currently out of order.
;s
amazing and very simple to use.
And if you get halfway into your project and find ElementTree was
insufficient, you can switch to lxml without changing practically
anything you've already written.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain i
nsive code is exactly the circumstance where Python
threading lets you down. It really shines when you're I/O-bound.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
yone have a use case in
the modern (Py3) age for '\r'? I use b'\r' fairly regularly when
talking to serial port devices. But the string version?
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
tmanager.
Then you just use the @contextmanager decorator on a function, have it
set up, yield the context you want, and clean up after.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org
ed in greenbar paper ...
"Look, you can make a filter out of the pinfeed!"
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
an API to
these libraries, just a few functions.
Cheers
Tom
If all you're doing is a thin-wrapper around a C library, have you
thought about just using ctypes?
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above t
installing something
--user for yourself, or are you using sudo to install it systemwide.
Because 'sudo which pip' is probably still pointed to the APT installed one.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of orde
all-through kicks in (the
slightly non-identical case) is often the source of disastrous code errors.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
t bogged
down in regexes. They tend to be excellent solutions to only a very
specific complexity of problem.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
solutions will give you all manner of initial bootstrap issues.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
print (...)
and it displayed:
Ellipsis
which wasn't very enlightening.
No, but if you ever have difficulty remembering how to spell "ellipsis",
it's good to know Python comes with a built-in reference.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email ad
python.org/3/library/subprocess.html is your friend.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
rting with 0 and ending before 10, and columns to
everything.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
faster than
enumerating over the string just to get the last index.
If what you want is the current index, though, you can look at the
enumerate function
s='kitti'
for i, c in enumerate(s):
print(i, ':', c)
--
Rob Gaddi, Highland Technology -- www.highlandtechnology
didn't know they needed the special operator.
[[] for _ in range(5)] works just as well without adding more syntax.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
[[{'swallow': 'unladen'}, {}], [{}, {}], [{}, {}]]
>>> d = list.replicate(2, 3, fill=0)
>>> d
[[0, 0], [0, 0], [0, 0]]
>>> d[0][0] = 5
>>> d
[[5, 0], [0, 0], [0, 0]]
"""
if n:
this
On 05/25/2018 10:13 AM, bartc wrote:
On 25/05/2018 17:58, Rob Gaddi wrote:
So, in the spirit of explicit being better than implicit, please
assume that for actual implementation replicate would be a static
method of actual list, rather than the conveniently executable hackjob
below.
_list
On 05/30/2018 09:34 AM, Paul Rubin wrote:
I think Usenet posts are no longer getting forwarded to the mailing
list, but now I wonder if this is getting out at all, even to usenet.
Does anyone see it?
Can't speak for the mailing list, but this came out to Usenet just fine.
--
Rob
mply defining a function in the module that does the things
you want done to strings? Not everything has to be an object method.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
is TWAIN
Really? I always thought it didn't scan.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
x27;t you run your
arbitrary code in my environment?"
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
cious pizzas in the future ! ;) =D
Bye,
Skybuck.
Or, you know, someone didn't bother putting limit checks in and a time
out of 20 the thing gets lost and starts putting the sauce directly on
the customer.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address
pe test than in simply saying "is
None". There are no other instances of NoneType. Don't try
type-checking None; just check if the object is None.
ChrisA
I suppose one valid usage would be this sort of thing:
fn = {
int: dispatchInt,
str: dispatchStr,
suited in the general case (though can be beaten
into sufficiency in specific ones).
Use https://docs.python.org/3.6/library/xml.etree.elementtree.html
instead. Everything will just work. You'll be happier and more
productive, with a brighter smile and glossier coat.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
an
really talk about is order of magnitude.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
merely ask...
-- Thomas
Suddenly I'm filled with visions of pipe, fittings, and a herpetology
degree.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
eatures, or if the
performance isn't optimized to within an inch of its life, well so be it.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
https://boingboing.net/2018/10/15/python-falls-from-ceiling-in-b.html
Say what you want about performance and linguistic elegance, but Julia
almost never falls in through the ceiling.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of
the context of that class. It should be a
stand-alone function if it provides stand-alone functionality. The
decision is also almost certainly not worth the amount of thought you're
giving it.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is current
, the most popular, takes
too long to start, and you have to setup folders and directories EVERY SINGLE
TIME at startup.
I've never been a fan of IDEs, but a code editor window on the left and
the IPython QtConsole on the right is a pretty efficient way to blaze
through code.
--
Rob
_libs\parsers.c:28765)()
ParserError: Error tokenizing data. C error: Expected 1 fields in line 8, saw 3
Offhand, and as a guess based on nothing, I would speculate that
something about line 8 of your CSV file differs from lines 1-7.
--
Rob Gaddi, Highland Technology -- www.hig
tribution to this
conversation. Think long and hard on it.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
t; Howeve, it doesnt seem to be working. It doesnt calculate the bill. I dont
> know what to do, as I'm less than average at this.
> it comes up as IndexError: list index out of range at line42
>
> Please help
Don't know which one is line 42; but I'd bet your problem is there.
As a rough guess, it might be the line that says:
pizza_cost = pizzatype[menu]
You're bounding that to the range 1-5. A Python list of length 5 has
indices 0-4.
But the error message is telling you everything you need to know; you're
trying to get a list index that's out of range in line 42. Find line
42, figure out what index you're asking it for, and you'll have your
answer. If you don't have an editor that shows you line numbers then
your editor is fundamentally terrible and you should not use it (I
personally like Notepad++ for Windows or Geany for Linux).
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
eter to look at the actual values of variables that you're
creating.
Also, as a mailing list/Usenet etiquette note: You get to have one name
you go by. Going around changing the name you're posting under in the
middle of the thread is a guaranteed way to piss folks off. You didn't
kn
<[email protected]>
>
Just read on Usenet instead of through the mailing list. That way
you can accept broken threading as a given rather than wonder why it's
happening in a particular case.
--
Rob Gaddi, Highland Technology -- www.highlandte
ck['relative_chart1']['vessel_names'])"
Pdb takes the "list" command as a request to list source code.
print list(block['relative_chart1']['vessel_names']) should work.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
All (well-behaved) iterators are iterables,
with their __iter__ method returning themselves.
for x in y:
...
implies:
try:
_it = iter(y)
while True:
x = next(_it)
...
except StopIteration:
pass
That's true for any iterable y, including a y which is itself an
iterator. Y
teration is shooting at a moving target.
How about:
newlist = (
[x for x in mylist if x.startswith(key)] +
[x for x in mylist if not x.startswith(key)]
)
return newlist
Or if you really insist on mutating the original list (which seems less
clean to me, but you do you), then:
newli
Does anyone know the history of why relative imports are only available
for packages and not for "programs"? It certainly complicates life.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
ou have been badly misled. Python local variables are frame local, and
recursion just works.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
Rob Gaddi wrote:
> Does anyone know the history of why relative imports are only available
> for packages and not for "programs"? It certainly complicates life.
>
Really, no one? It seems like a fairly obvious thing to have included;
all of the reasons that you want to be
Chris Angelico wrote:
> On Sat, Apr 9, 2016 at 2:59 AM, Rob Gaddi
> wrote:
>> Rob Gaddi wrote:
>>
>>> Does anyone know the history of why relative imports are only available
>>> for packages and not for "programs"? It certainly complicates life.
>
u in advance.
Offhand, I'd say you should fix the error in your indentation, probably
at the line number that the error specifies.
Python cares about indentation, and uses it the way other languages use
braces. Things that are at the same logical depth must be indented th
sequentially". f.read is both superfluous and also doesn't do
that. Leave it out entirely.
The next problem you'll have is that iterating over the lines of the
file leaves the newline at the end of line, so your * will end up on the
wrong line.
Do yourself a favo
Seymore4Head wrote:
> On Mon, 25 Apr 2016 18:24:02 - (UTC), Rob Gaddi
> wrote:
>
>>Seymore4Head wrote:
>>
>>> On Tue, 19 Apr 2016 18:29:38 -0400, Seymore4Head
>>> wrote:
>>>
>>> I am going to forget using a directory path.
>>>
gt;
> How could I get the variable `x` in the environment of `func2()`? i.e. `f()`.
>
> Best regards,
> Jin
By using class instances instead of closures.
class Foo:
def __init__(self, x):
self.x == x
def __call__(self):
return 0
def func1():
return Foo(10)
--
Rob Gaddi, Highla
that thing is Python, so be it. If you need a soldering iron, or a
hammer and chisel, or a structural engineering degree instead, then go
figure out how to use one of those and Python will still be waiting when
you do need it.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email
r some heavy
math. After a lot of door knocking, poking, prodding, and hoping, the
conclusion he reached was that what you want can't be done, and he had
to gut and redesign the web server to support parallel connections.
Turned a 45 second page load into south of one, but it wasn't pretty and
chewed up a bunch of RAM. We had 256K to play in; I'm assuming you've
got closer to 32K.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
Grant Edwards wrote:
> On 2016-05-16, Rob Gaddi wrote:
>
>> Grant, the bad news is that I know this because our firware guy had
>> _exactly_ this problem, with exactly your scenario, about a month ago.
>> http, not https, but the problem remains the same but for some he
Steven D'Aprano wrote:
> On Tue, 17 May 2016 02:52 am, Chris Angelico wrote:
>
>> On Tue, May 17, 2016 at 2:34 AM, Rob Gaddi
>> wrote:
>>>> The solution might actually be to move all your static files
>>>> elsewhere. Slap 'em up onto github.i
to look at a number and say "Yeah, no, that's
CLEARLY too high." based on the minimum number of bytes a stack frame
can require. Guaranteeing that some number lower than that is safe is
almost certainly impossible. So you'd get an exception for truly
stupid numbers, but a lack
27;s that, increasingly, programming is similar to carpentry. I
can't reframe a house, and certainly can't build cabinetry, but I can do
an adequate job putting up a simple wooden shelf.
Looked at that way, it becomes a question of teaching people enough of
the general prin
load, and it's not
like you need to see every sample.
Are you going to be trying to use this data realtime, or are you just
trying to datalog it and deal with it offline? Because at some point
you'll need to decide, all in, how much data you're willing to try to
hold in memory
the _canonical_ use case for
for loopvar in range(initial_value, limit+1):
processing
if found_what_im_looking_for:
break
else:
do_whatever_it_is_you_do_when_its_not_found
The limited variable scoping is the only thing missing, and you can get
around that by telling yourself
w.eurion.net/python-snippets/snippet/Calendar_Date%20picker.html
>
> - Nick.
I use PySide rather than PyQt, but definitely count me as another vote
for Qt as the toolkit of choice. I started out on wx, but when I needed
to move to Python3 it wasn't able to come with me.
--
Rob Gaddi
Lawrence D’Oliveiro wrote:
> On Friday, June 3, 2016 at 8:09:21 AM UTC+12, Rob Gaddi wrote:
>> Although your loop is really the _canonical_ use case for
>>
>> for loopvar in range(initial_value, limit+1):
>> processing
>> if found_what_im_look
d may contain privileged
> information or confidential information or both. If you are not the intended
> recipient please delete it and notify the sender.
You're looking for numpy.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
x27;min', 'VMIN'), ('ptp', 'VPP'),
('rms', 'VRMS'), ('top', 'VTOP')):
def measmaker(p):
def inner(self, cursorarea=False):
region = 'CREG' if cursorarea else 'SCR'
retur
Random832 wrote:
> On Wed, Jun 15, 2016, at 13:37, Rob Gaddi wrote:
>> I've got a whole lot of methods I want to add to my Channel class, all
>> of which following nearly the same form. The below code works, but
>> having to do the for loop outside of the main class d
Steven D'Aprano wrote:
> On Thu, 16 Jun 2016 04:39 am, Rob Gaddi wrote:
>
>>> class Channel:
>>> frequency = mkmeasure('frequency', 'FREQ')
>>> falltime = mkmeasure('falltime', 'FTIM')
>>
>> Thought about
ry) gives me the
_Registry documentation as expected.
>From the (Linux) command line though:
$ pydoc3 foobar._Registry
[lots of good documentation stuff]
$ pydoc3 foobar.Registry
no Python documentation found for 'foobar.Registry'
Is this a thing that can be fixed with a
realised the implications.
>
As speedy problem resolutions go, before I mentioned it is pretty good.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
Michael Selik wrote:
>
>
>> On Jul 7, 2016, at 7:46 PM, Rob Gaddi
>> wrote:
>>
>> I've got a package that contains a global ensmartened dict that allows
>> all the various parts of my program to share state.
>
> The simplest solution would be to
quot;sound_recorder.py", line 21, in for i in range(0,
> int(RATE / CHUNK * TIME)): OverflowError: range() result has too many items
>
Offhand, I'll bet that you're getting TIME="2" instead of TIME=2.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.co
ely that you have an indentation error than an
intentional need for an empty code block, and Python's trying to prevent
you shooting yourself in the foot. If you actually needed an empty code
block, the langugage provides a way of marking that emptyness as
intentional. That way is the
to remove the redundant pass statement.
>
> How often do you actually need empty statements, adding stuff,
> removing stuff, like that? Possibly there's a code smell here.
>
> ChrisA
Yeah, all the time.
try:
return self.cache[key]
except KeyError:
pass
lots... of... co
Python objects are out on the heap? And that the
references themselves may or may not wind up on the stack depending on
what flavor you're running?
Answers to these questions have very little bearing on how I actually
write Python, mind, but now I'm curious.
--
Rob G
e thread I will take under advisement, I suppose.
If I recall correctly you can make the color argument a list with the
same number of elements as you have points.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above t
], [4, 3, 8]]
>>> a = np.array([[2, 7, 6], [9, 5, 1], [4, 3, 8]])
>>> b = np.array([1, 5, 2, 6, 3, 7, 4, 8, 5, 9])
>>> (a > 5).nonzero()
(array([0, 0, 1, 2]), array([1, 2, 0, 2]))
>>> np.nonzero(b % 2)
(array([0, 1, 4, 5, 8, 9]),)
--
Rob Gaddi, Highland Techno
ordering
operators, since ordering is inherently undefined.
In part, these decisions were made to make it possible to detect a NaN
in C in the absence of an isnan() function. If (x != x), then x must be
a NaN.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is cu
n int.
Which is only a problem because somewhere in your code, you're asking
it to do that. In all likelihood, if you follow the line number
provided in the traceback, you'll see that somewhere that you planned to
use the result of calling a function you left out the parentheses and
are
1:len(listarg)]:
if myMax < i:
myMax = i
return myMax
How would you simplify it?
In English rather than Python, how do you find the maximum element in a
list?
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currentl
):
myMax = listarg[0]
for item in listarg:
if item > myMax:
myMax = item
return myMax
Sayth
When you understand what it is you intend to write (barring DL Neil's
comments), and THEN write it, you write the correct thing. Thus endith
the lesson.
ive?
You could, of course, do some benchmarks to see if it makes a
difference, but, personally, I'd just leave it.
Personally yes, but because it allows it to execute on non-sequence
iterables rather than because it saves a single near-instantaneous
comparison.
--
Rob G
comment can't be ignored because it's sitting there flagging your
problem. Strings (in single or double quote) are strings; a sequence of
characters as used to write words. Numbers are numbers. You can't add
them together.
This over here is my friend Bob. What's 31 + 18 +
Sometimes when I'm feeling lazy it's a convenient way to set defaults on
instance variables. I don't love it, but I also can't explain what I
find wrong with it.
Irv
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address d
t wrapper around all this stuff, and I feel
like it often doesn't get enough love.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
f to the autoindexed element. You could
also explicitly index the 1st element (#0) as {0:6.5f}.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
On 6/14/19 8:49 AM, Christian Seberino wrote:
Thanks for all the help. I'll definitely try to bypass the GUI first if
possible. This is on Windows 7 so maybe AutoIt will do the trick if can't
avoid the GUI. Thanks again everyone.
Out of curiosity, what hardware?
--
Rob Gaddi
e the provided software" that hasn't been
updated since 2001 and doesn't actually let you test the thing you need to.
The underlying FPGA board that it's built on has its own page at
https://opalkelly.com/products/xem3010/ with an SDK. That may turn out
to be your best way in.
ation',
'version') as well as to pass device handles around, since an open connection to
a given piece of physical hardware is an inherently global thing.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
rser takes out of the file it passes to
self.statefn, which processes the line in the current context and updates
self.statefn to a different method if necessary.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
aven't I seen it before? Can you see anything 'wrong' with this picture?
I've used them sometimes for basic encapsulation principles without really
gaining anything. I use inheritance of nested classes in my
https://pypi.org/project/indexedproperty/ project, where subclasses o
you do anything that modifies bar, and find that bar
always points not to a new empty list each time but to the same empty list on
each call.
>>> def foo(bar=[]):
... bar.append(5)
... return bar
...
>>> foo()
[5]
>>> foo()
[5, 5]
>>> foo()
[5, 5, 5]
A
Doubly agreed. Avoid import * as it makes the code a nightmare to reason
about later amongst other things
On Fri, 9 Aug 2019 at 20:02, Peter J. Holzer wrote:
> On 2019-08-09 12:43:45 -0600, Michael Torrie wrote:
> > On 8/9/19 4:52 AM, Peter J. Holzer wrote:
> > > You didn't import 'tkinter', you
, but otherwise the list should only have
six entries - without the entry directly behind "if x: ".
mylist = ['a', 'b', 'c', 'd', 'e', 'f', 'g']
if not x:
del mylist[3]
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
g in iterable:
yield thing
You assume that the initial iterable is reusable. If its not, the only way you
can go back to the beginning is to have kept track of it yourself.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See
oes a fantastic job of handling
this sort of parallelization in a straightforward way.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
b
to graphing_module_a, that decision is made at a single central point in my
package rather than scattered through 30 different import statements in a dozen
files.
Any ideas?
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above t
ing None will specifically NOT accomplish the thing
you want; nothing ever checks the return value of __init__.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list
File "", line 1, in
TypeError: __init__() should return None, not 'int'
Cheers,
Luciano
On Mon, Nov 4, 2019 at 2:31 PM Rob Gaddi
wrote:
>> [snip]
Raise an exception. Returning None will specifically NOT accomplish the thing
you want; nothing ever checks the return va
On 11/4/19 10:59 AM, R.Wieser wrote:
Rob,
Returning None will specifically NOT accomplish the thing you want;
nothing ever checks the return value of __init__.
I thought to have read that when you return a none from it the object itself
would return a placeholder singleton.
Raise an
On 11/5/19 11:52 AM, Peter J. Holzer wrote:
On 2019-11-04 18:18:39 -0300, Luciano Ramalho wrote:
In addition, as Rob said, it is usually a bad idea to wrap several
lines of code in a single try/except block
I disagree with this. While it is sometimes useful to wrap a single
line, in my
nu, not the command prompt. I personally
start even GUI programs far more often from a prompt.
To follow Linux conventions you'd put the shebang, make the file executable, and
put the executable somewhere on the PATH. I'd stick to those conventions
barring a particular reason not
ormance
than threads or vice versa. There's also async in the mix, which I still have
no idea how to use. But this way if you strike out on one approach you've got
some others to consider.
Also, does the rPi have any PWM or counter pins that you can just set and
forget, rather th
terval then your lack of rigid
control over what happens on your processor is a real problem and you're better
off bare metal on a dedicated $2 Cortex-M than with random timeslices of the
1.4GHz beast on the rPi.
Is what I was shorthanding with "realtime".
--
Rob Gaddi, Highland T
101 - 200 of 1021 matches
Mail list logo