ser with Python 2.7
Regards,
Ganesh
Don't unpack them yet, you still want them to be aggregated.
vals = return_x_values()
if all(vals):
v1, v2, v3 = vals
print "all values true"
else:
print "at least one false value"
--
Rob Gaddi, Highland Technology -- www
would actually be an xnor (not xor) operation, a fairly rare
usage case. Python doesn't even provide an operator for that, the
closest thing would be (bool(x) == bool(y)).
"And" means "and". This is true AND that is true.
--
Rob Gaddi, Highland Technology -- www.highla
Anyone have any good references on using Sphinx to generate a mix of
autogenerated API docs and hand-written "Yeah, but this is what you DO
with it" docs? Free is good but I'm happy to drop money on books if
they're worthwhile.
--
Rob Gaddi, Highland Technology -- www.hi
On 09/27/2017 04:15 PM, Ned Batchelder wrote:
On 9/27/17 6:55 PM, Rob Gaddi wrote:
Anyone have any good references on using Sphinx to generate a mix of
autogenerated API docs and hand-written "Yeah, but this is what you DO
with it" docs? Free is good but I'm happy to drop mo
he only
time I've ever needed to explicitly worry about '\r' is communicating
over sockets or serial ports to devices. And in those cases you need to
stuff them with bytes rather than str anyhow, so you're already down in
the gory bits.
--
Rob Gaddi, Highland Technology --
built
in module so there are less dependencies.
Any ideas?
You mean, other than .split('/')?
--
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
The second time, however, you
take the existing value that "li" refers to [1,2,3,4,5], create a new
object that is ([1,2,3,4,5] + [100,200]), and reassign the local
reference "li" to point to that new object. Then your function ends,
"li" goes out of scope, nothing
older with file is there.
Why error message? Is it h5py.File() or is it my file? Everything seems
pretty simple, what's going on?
Thank you!
Be 100% sure your directory is correct. Try it again with an absolute
path to the file. Windows makes it far too easy for the working
director
ightforward and I've made it do
some very heavy lifting over the years. Cython is definitely more work.
SWIG makes sense if you've got a huge number of interfaces you're trying
to map and need to automate the process, but if you've got south of 20
I'd just do it n
e some kind of
portfolio, just as a bar of "This is what I consider my good work to
be." The idea that someone is going to have years of experience, but
not a single page of code that they can let me look over always strikes
me as odd.
--
Rob Gaddi, Highland Technology -- www.highlandtec
On 12/18/2017 01:52 PM, Gene Heskett wrote:
On Monday 18 December 2017 16:05:10 Rob Gaddi wrote:
On 12/18/2017 08:45 AM, Larry Martell wrote:
On Mon, Dec 18, 2017 at 11:33 AM, Marko Rauhamaa
wrote:
However, one great way to stand out is a portfolio of GitHub
projects. Several people have
ance
stored in variable name foobar. That method assigns the new method to
the "_setter" of that property instance and returns the updated
property, which is assigned redundantly to the variable name foobar.
--
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
etc.
Though it appears some wag has used function decorators to implement
goto statements:
https://pypi.python.org/pypi/goto-statement/1.1
Rather clever, it seems.
Skip
If only all that power had been used for good instead of evil...
--
Rob Gaddi, Highland Technology -- www.highlandtechnolo
something that should be doable easily without having to throw around a
lot of extraneous copies.
--
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 01/05/2018 04:27 PM, Ben Finney wrote:
Rob Gaddi writes:
I'd like to create a native Python object that exposes the buffer
protocol. Basically, something with a ._data member which is a
bytearray that I can still readinto, make directly into a numpy array,
etc.
The “etc.” seems p
#x27;s the difference between a --user install
and a system one?
--
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
I write a single line of code,
I've got a setup.py and the directory framework.
Then you install the package using pip -e (or in practice --user -e).
That's the missing piece. That way you can import your module from the
interpreter, because it's now on the path, but its physical loca
On 02/07/2018 03:17 PM, Grant Edwards wrote:
On 2018-02-07, Rob Gaddi wrote:
When I'm working on a module, the trick is to write a setup.py (using
setuptools) from the very get-go. Before I write a single line of code,
I've got a setup.py and the directory framework.
Then you i
uto-default behavior" from the rest of them. Yeah, **kwargs is clumsy,
but it gets the job done.
--
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
tion
with intelligent cyclical reference breaking.
--
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
def add2list(lst, elem):
lst.extend([elem, elem])
return lst
I did all the type checking I needed to there; none whatsoever. If
passed a list, or something that behaves like one, that does the
expected thing.
If passed an ExtensionLadder, it probably does the wrong thing, but that
is n
;
> Hal
A missing colon, the appropriate location of which is left as an
exercise to the reader.
--
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
Juan Pablo Romero Méndez wrote:
> 2016-08-09 13:18 GMT-07:00 Rob Gaddi :
>
>> Juan Pablo Romero Méndez wrote:
>>
>> > 2016-08-09 12:06 GMT-07:00 Paul Rubin :
>> >
>> >> Juan Pablo Romero Méndez writes:
>> >> > In online forums so
ults. For older Python, create a subprocess.Popen (again with stdout
and stderr=subprocess.PIPE) and call the communicate() method.
There's probably a dozen other ways. That one there, that's your
easiest.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is curr
ctangular or vice versa in
> polar.
> I have never seen it done.
>
While I fully admit to thinking in degrees, any time I'm actually doing
any mathematical work my units are either radians or cycles. The
representation of angle in fixed point cycles actually comes o
t;
> This seems even worse from a readability point of view. The arguments to
> 'compare' are a long way away from the block to be executed.
>
> Can anyone offer an alternative which is closer to my original intention?
>
> Thanks
>
> Frank Millman
>
You
that weeks manage to
fall into with nothing to show for them.
If this is an exercise in learning to work with libusb then have at.
But if what you actually need from this is to talk to the meter? You're
talking to it already. Take the win and walk.
--
Rob Gaddi, Highland Technology -- ww
yield node._value
yield from iter(node._right)
I think there's a little bit of optimization that goes on using yield
from. That said, all this has a serious stink of premature
optimization.
--
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
e.
>
> It would help if you could comment the code.
> Thankyou in advance!!
I'm sure it would help; your professor will probably take points off
otherwise.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order.
Noah wrote:
> Hello folk,
>
> I would like to use a python script to ssh into a server using a username
> and password and perhaps ass port.
>
> Any ideas on how to script that.
>
> Thanks
>
> Noah
paramiko
--
Rob Gaddi, Highland Technology -- www.highlandtechnolo
I want to
>> grab that error and process.
>>
>> Regards, Puneet
>
> Steve, You are absolutely right. I am trying to eliminate the method of using
> parenthesis while calling in my file. Especially when I call it from a
> instance.
There's a simple solution the
ers in the shell and seeing what you can do
with it. The word you're looking for is 'slices'. Figure out
interactively what you need to do, then write it up.
--
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
s to /usr/highland/python3.4/site-packages, and put all the
executable stubs that pip creates into /usr/highland/bin, then I can
just rsync all of /usr/highland.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
--
https
)
> md.keys()
> ==> KeysView()
Nope, that's exactly right. That's the python3 behavior.
>>> d = {'a': 1, 'b':2}
>>> d.keys()
dict_keys(['b', 'a'])
Keys returns a dedicated keys object now, not just a list. That thin
#x27;]
> ...
>
>
> but what magic do I need? globals() is no good, because it returns the
> library's global namespace, not the caller's.
>
>
> Any solution ought to work for CPython, IronPython and Jython, at a minimum.
>
class Library:
SPAMIFY = False
def make_spam(m):
...
import library
Library = library.Library()
result = Library.make_spam(99)
--
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
s that's one thing, but I certainly
hope that's not actually going to be production code. Even if it were
right it's unreadable.
--
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
at is in the class Form
>
> in wich way i can have access to the lineedit of class Form without event
> from class Cornice
>
> Many Thanks
Traditionally you'd have Cornice emit a Signal, which when you
__init__the Form you'd connect to the appropriate slot. I don'
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
<1392737302.749065.1459024715818.javamail.ya...@mail.yahoo.com>
>
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
1 - 100 of 261 matches
Mail list logo