Hello DL,
I am using Python3.
Thanks,
Arup Rakshit
a...@zeit.io
> On 30-Mar-2019, at 6:58 AM, DL Neil wrote:
>
> Arup,
>
> There is a minefield here. Are you using Python 2 or 3?
>
> --
> Regards =dn
> --
> https://mail.python.org/mailman/listinfo/python-list
--
https://mail.python.o
Arup Rakshit writes:
> I basically had defined 4 classes. SimpleList be the base class for all the
> other 3 classes. SortedList and IntList both being the child of the base
> class SimpleList. They have a single inheritance relationship. Now I have the
> last class called SortedIntList which h
lol cheeky as.
server = 'x' # name of the target computer to get event logs
source = 'x' # 'Application' # 'Security'
hand = win32evtlog.OpenEventLog(server, source)
flags = win32evtlog.EVENTLOG_BACKWARDS_READ |
win32evtlog.EVENTLOG_SEQUENTIAL_READ
total = win32evtlog.GetNumberOfEventLogRecords
On Fri, Mar 29, 2019 at 11:54 PM Arup Rakshit wrote:
>
> Now when I call the add method on the SortedIntList class’s instance, I was
> expecting super.add() call inside the IntList class add method will dispatch
> it to the base class SimpleList. But in reality it doesn’t, it rather
> forwards
Arup,
There is a minefield here. Are you using Python 2 or 3?
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
On 30Mar2019 09:44, Cameron Simpson wrote:
On 27Mar2019 18:41, Paul Moore wrote:
I'm looking for a library that lets me parse binary data structures.
The stdlib struct module is fine for simple structures, but when it
gets to more complicated cases, you end up doing a lot of the work by
hand (
On 27Mar2019 18:41, Paul Moore wrote:
I'm looking for a library that lets me parse binary data structures.
The stdlib struct module is fine for simple structures, but when it
gets to more complicated cases, you end up doing a lot of the work by
hand (which isn't that hard, and is generally perfe
On 2019-03-29 16:34:35 +, Paul Moore wrote:
> On Fri, 29 Mar 2019 at 16:16, Peter J. Holzer wrote:
>
> > Obviously you need some way to describe the specific binary format you
> > want to parse - in other words, a grammar. The library could then use
> > the grammar to parse the input - either
>
> Pretty cool. FYI, the index page (now containing 4 articles) with Google
>> Chrome 72.0.3626.x prompts me to translate to French. The articles
>> themselves do not.
>>
>
> I'm now getting the translation offer on other web pages with Chrome, not
just this one.
Thus, please ignore my prior po
On Fri, 29 Mar 2019 at 16:16, Peter J. Holzer wrote:
> Obviously you need some way to describe the specific binary format you
> want to parse - in other words, a grammar. The library could then use
> the grammar to parse the input - either by interpreting it directly, or
> by generating (Python)
On 3/29/19 12:13 PM, Peter J. Holzer wrote:
Obviously you need some way to describe the specific binary format you
want to parse - in other words, a grammar. The library could then use
the grammar to parse the input - either by interpreting it directly, or
by generating (Python) code from it. Th
On 2019-03-28 11:07:22 +0100, dieter wrote:
> Paul Moore writes:
> > My real interest is in whether any libraries exist to do this sort
> > of thing (there are plenty of parser libraries for text, pyparsing
> > being the obvious one, but far fewer for binary structures).
>
> Sure. *BUT* the libra
DL Neil writes:
> How do you keep, use, and maintain those handy snippets, functions,
> classes... - units of code, which you employ over-and-over again?
Fun topic!
I have two methods:
First, in my scripts directory I have a file called
"python-cheatsheet.py" where I save small tips that I
think
Peter J. Holzer wrote:
> On 2019-03-29 12:56:00 +0100, Thomas Jollans wrote:
>> On 29/03/2019 12.39, Tony van der Hoff wrote:
>> > Running in browser:
>> > http://localhost/~tony/private/home/learning/jinja/minimal/minimal.py
>> >
>> > In apache2.access.log:
>>
>> So it's running in apache!
>>
On 2019-03-29 12:56:00 +0100, Thomas Jollans wrote:
> On 29/03/2019 12.39, Tony van der Hoff wrote:
> > Running in browser:
> > http://localhost/~tony/private/home/learning/jinja/minimal/minimal.py
> >
> > In apache2.access.log:
>
> So it's running in apache!
>
> Now the question is what apache
On 2019-03-28, DL Neil wrote:
> How do you keep, use, and maintain those handy snippets,
> functions, classes... - units of code, which you employ
> over-and-over again?
>
> Having coded 'stuff' once, most of us will keep units of code,
> "utilities", which we expect will be useful in-future (DRY
I basically had defined 4 classes. SimpleList be the base class for all the
other 3 classes. SortedList and IntList both being the child of the base class
SimpleList. They have a single inheritance relationship. Now I have the last
class called SortedIntList which has multiple inheritance relati
On 29/03/2019 12.39, Tony van der Hoff wrote:
> On 29/03/2019 11:08, Chris Angelico wrote:
>> On Fri, Mar 29, 2019 at 9:12 PM Tony van der Hoff
>> wrote:
>>>
>>> Hello Chris.
>>> Thanks for your interest.
>>>
>>> On 28/03/2019 18:04, Chris Angelico wrote:
On Fri, Mar 29, 2019 at 4:10 AM Tony
On 29/03/2019 11:08, Chris Angelico wrote:
> On Fri, Mar 29, 2019 at 9:12 PM Tony van der Hoff
> wrote:
>>
>> Hello Chris.
>> Thanks for your interest.
>>
>> On 28/03/2019 18:04, Chris Angelico wrote:
>>> On Fri, Mar 29, 2019 at 4:10 AM Tony van der Hoff
>>> wrote:
This'll probably wo
On Fri, Mar 29, 2019 at 9:12 PM Tony van der Hoff wrote:
>
> Hello Chris.
> Thanks for your interest.
>
> On 28/03/2019 18:04, Chris Angelico wrote:
> > On Fri, Mar 29, 2019 at 4:10 AM Tony van der Hoff
> > wrote:
> >>
> >> This'll probably work:
> >
> > You have a python3 shebang, but are you d
On 29/03/2019 11.10, Tony van der Hoff wrote:
> and running it in a browser (tried both chrome and Firefox),
How?
> it fails as before: blank web page.
No traceback? There must be a traceback somewhere. In a log file perhaps.
--
https://mail.python.org/mailman/listinfo/python-list
On 27/03/19 09:21, Alexey Muranov wrote:
> Whey you need a simple function in Python, there is a choice between a
> normal function declaration and an assignment of a anonymous function
> (defined by a lambda-expression) to a variable:
>
> def f(x): return x*x
>
> or
>
> f = lambda x: x*x
>
>
Hello Chris.
Thanks for your interest.
On 28/03/2019 18:04, Chris Angelico wrote:
> On Fri, Mar 29, 2019 at 4:10 AM Tony van der Hoff
> wrote:
>>
>> This'll probably work:
>
> You have a python3 shebang, but are you definitely running this under Python
> 3?
>
Absolutely.
> Here's a much more
> ltemp = [ydata[i] - ydata[0] for i in range(ll)]
> ytemp = [ltemp[i] * .001 for i in range(ll)]
> ltemp = [xdata[i] - xdata[0] for i in range(ll)]
> xtemp = [ltemp[i] * .001 for i in range(ll)]
Use the vectorization given by numpy:
ytemp = (ydata - ydata[0]) * 0.001
24 matches
Mail list logo