Hello,
In a class there are three possible types of methods,
the static methods, the class methods and the
instance methods
* Class methods are decorated, eg:
@classmethod
def func(cls, a, b):
...
I read that the decorator tranforms 'func' as a descriptor,
and when this descriptor is read, it
On Thursday, October 6, 2016 at 11:31:13 AM UTC+5:30, Chris Angelico wrote:
> On Thu, Oct 6, 2016 at 3:57 PM, Gregory Ewing wrote:
> > Chris Angelico wrote:
> >>
> >> Hence my
> >> query about how variadic functions and automatic currying work - how
> >> does it know whether to curry or run?
> >
>
On Thu, Oct 6, 2016 at 3:57 PM, Gregory Ewing
wrote:
> Chris Angelico wrote:
>>
>> Hence my
>> query about how variadic functions and automatic currying work - how
>> does it know whether to curry or run?
>
>
> Calling it "automatic" was probably a bad choice of words.
> I don't mean to imply that
>
> The MWE I provided is so simple. By now, It should be obvious what is
> missing from it. :-(
>
>
The problem is NOT with my code. I just installed a new virtual machine,
and installed python3.5 amd64 + pypiwin32 on it. On that machine, the
test service works perfectly!
So it is with my machin
> On Wed, Oct 5, 2016 at 7:43 AM, Nagy László Zsolt
> wrote:
>> It did not help. I still get the same error message (service did not
>> respond in time).
> Can you run the service executable directly? From the command line
> check `sc qc TestService`. Run the BINARY_PATH_NAME executable, e.g.
38016226...@gmail.com wrote:
def rec(a):
a+=1
if a<10:
rec(a)
print(a)
rec(0) gives me 101 normally.Why it works? Because of the stack memory
management?
Yes. There isn't just one 'a' here, there's a different one
each time rec is called.
Thank yo
Chris Angelico wrote:
Hence my
query about how variadic functions and automatic currying work - how
does it know whether to curry or run?
Calling it "automatic" was probably a bad choice of words.
I don't mean to imply that Haskell goes around currying
things behind your back when you don't wan
On Thursday, October 6, 2016 at 1:06:07 AM UTC+5:30, BartC wrote:
> On 05/10/2016 14:43, Rustom Mody wrote:
> > On Wednesday, October 5, 2016 at 7:05:02 PM UTC+5:30, BartC wrote:
>
> >> That's the one it can't find. Actually it can't seem to import any
> >> standard libraries, so the implementatio
38016226...@gmail.com writes:
> Google told me Python name is a label attaching to the object.
Well, “Google told me” has no necessary bearing on whether it's true :-)
so that's not a good citation to give.
If you need to know what Python terminology means, the Python
documentation is better.
On 10/05/2016 11:46 AM, 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.
If paramiko doesn't fit your needs, traditionally this sort of work was
done with the pexpect
Google told me Python name is a label attaching to the object.
But in this recursive function,the name 'a' will point to different number
object.
def rec(a):
a+=1
if a<10:
rec(a)
print(a)
rec(0) gives me 101 normally.Why it works? Because of the stack
Thanks guys...
I'm getting overwhelmed with good info, so, I am going to disappear
for a while and will comeback with questions when I get far enough to
ask them.
Again, thanks!
Beverly Howard
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, Oct 6, 2016 at 9:45 AM, BartC wrote:
> On 05/10/2016 22:34, Chris Angelico wrote:
>>
>> On Thu, Oct 6, 2016 at 6:35 AM, BartC wrote:
>>>
>>> This is exactly why I persist with my own language implementations. My
>>> current one is only 1/5000th the size but standard libraries are
>>> incl
On 05/10/2016 22:34, Chris Angelico wrote:
On Thu, Oct 6, 2016 at 6:35 AM, BartC wrote:
This is exactly why I persist with my own language implementations. My
current one is only 1/5000th the size but standard libraries are included!)
Yes, it has all the standard library that *you* expect. Do
On Wed, Oct 5, 2016 at 9:03 PM, Michael Felt wrote:
>
>> +80 args = (1, "name", None), (2, "buff", None), (1, "size",
>> 0), (1, "count", 1)
>
> error #1. paramater type 2 (the buffer might be where data is being put, but
> for the call, the pointer is INPUT)
An output parameter (type 2)
Beverly Howard writes:
>...snip...
> A primary question would be, "What are options for building a display
> that would update displayed values without scrolling?"
To rewrite only the last character, you could use '\b':
import os
import itertools
import time
for c in map(str.encode, ite
BartC wrote:
This is exactly why I persist with my own language implementations. My
current one is only 1/5000th the size but standard libraries are included!)
You might like to try a different Haskell implementation,
such as Hugs:
https://wiki.haskell.org/Hugs
According to the web page, it c
You should look into using PyQt or PySide. They are python bindings for
the very popular Qt GUI framework.
On Wed, Oct 5, 2016 at 2:33 PM, Beverly Howard wrote:
> >> if it is a pi controlling the system I would tend towards controlling it
> from a web page via the network. to keep it updating
I _think_ I see what I need...
window.move(new_y, new_x)
Move cursor to (new_y, new_x)
...even if not, I now know it's there somewhere.
Thanks for the specific links... they are very valuable.
Beverly Howard
--
https://mail.python.org/mailman/listinfo/python-list
>> I would recommend the 'curses' library: <<
Great! Thanks!
I'll be back... I'm sure.
Beverly Howard
--
https://mail.python.org/mailman/listinfo/python-list
>> if it is a pi controlling the system I would tend towards controlling it
from a web page via the network. to keep it updating would require AJAX
style programming of the web page. <<
Thanks. I am interested in eventually doing that, but it seems that learning
how to do it on a local console f
On Thu, Oct 6, 2016 at 6:35 AM, BartC wrote:
> This is exactly why I persist with my own language implementations. My
> current one is only 1/5000th the size but standard libraries are included!)
Yes, it has all the standard library that *you* expect. Does it have
what some random person on the i
On Thu, Oct 6, 2016 at 8:19 AM, Beverly Howard wrote:
> Thanks for the responses... appreciated.
>
>>> print("value value data data data", end="\r") <<
>
> That makes sense, but it also seems to suggest that there is no other way to
> position the cursor prior to printing.
>
> For example, if tha
Thanks for the responses... appreciated.
>> print("value value data data data", end="\r") <<
That makes sense, but it also seems to suggest that there is no other way to
position the cursor prior to printing.
For example, if that line is halfway down the screen, is there any way to
position th
Never said thank you - so, thanks!
What I need to do was add the .v at the end so I was accessing the value
of the structure.
Unlilke Linux, AIX - for reasons unknown to all, they have the time_t
definition that is specific to the ABI size, at least for these
performance libraries that proba
On 05-Oct-16 22:29, Emile van Sebille wrote:
Thanks for the reply!
After a shirt coffeebreak - back into the fray - and I found the following:
+76 class cpu_total:
+77 def __init__(self):
+78 __perfstat__ = CDLL("libperfstat.a(shr_64.o)")
+79 prototype = CFUNC
On 10/05/2016 01:06 PM, Michael Felt wrote:
On 02-Oct-16 19:50, Michael Felt wrote:
I am trying to understand the documentation re: ctypes and interfacing
with existing libraries.
I am reading the documentation, and also other sites that have largely
just copied the documentation - as well as
On Wed, Oct 5, 2016 at 7:18 PM, Mike Adams wrote:
> The install seemed to be going well up to near the end when I got the msg
> 'Python
> has stopped working', I clicked the button then I got the msg 'Setup was
> successful'.
> I then clicked 'IDLE' and it says it can't find
> 'api-msi-win-crt-
hello
some programs allow to export tools to dos .bat files for running from command
line.
my question is how can i do to running .bat files and how can i do to define
some variables from the .bat file before the running.
for example i want to define 4 variable and run this .bat file with the p
On 02-Oct-16 19:50, Michael Felt wrote:
I am trying to understand the documentation re: ctypes and interfacing
with existing libraries.
I am reading the documentation, and also other sites that have largely
just copied the documentation - as well as the "free chapter" at
O'Reilly (Python Co
The install seemed to be going well up to near the end when I got the msg
'Python has stopped working', I clicked the button then I got the msg 'Setup
was successful'. I then clicked 'IDLE' and it says it can't find
'api-msi-win-crt-runtime-11-1-0.dll'. I checked Python Tracker and saw that
t
Malcolm Greene writes:
> Looking for a quick way to calculate lines of code/comments in a
> collection of Python scripts. This isn't a LOC per day per developer
> type analysis - I'm looking for a metric to quickly judge the complexity
> of a set of scripts I'm inheriting.
Prospector http://pros
On 5-10-2016 2:43, Dennis Lee Bieber wrote:
> Or do what I once did with the Lunar Lander game on my college
> computer... Target accuracy: Excellent... Landing gear? somewhere on the
> other side of the moon. My vertical velocity was sub-inches per second --
> the horizontal velocity was in
On 05/10/2016 14:43, Rustom Mody wrote:
On Wednesday, October 5, 2016 at 7:05:02 PM UTC+5:30, BartC wrote:
That's the one it can't find. Actually it can't seem to import any
standard libraries, so the implementation must be screwed up.
Or is it because I downloaded the Minimal** rather Full v
On Wed, 05 Oct 2016 19:17:33 +, John McKenzie wrote:
> Hello, all.
>
> I have a function that takes three arguments, arguments to express an
> RGB
> colour. The function controls an LED light strip (a Blinkytape).
>
> Sometimes I might need to be change what colour is sent to the
> funct
Define your colors as actual number variables instead of a string
color = (255,0,0)
color2 = (0,0,255)
Then use argument expansion to pass them in as separate arguments to the
function
colorFunction(*color)
Brendan
On Wed, Oct 5, 2016 at 12:17 PM, John McKenzie
wrote:
>
> Hello, all.
>
> I
Hello, all.
I have a function that takes three arguments, arguments to express an RGB
colour. The function controls an LED light strip (a Blinkytape).
Sometimes I might need to be change what colour is sent to the function,
so I set a variable with the idea that I can change just the variab
On 5 Oct 2016 22:02, "Ethan Furman" wrote:
>
> On 10/05/2016 10:46 AM, Noah wrote:
>
>> I would like to use a python script to ssh into a server using a username
>> and password [...]
>
>
> I've written a module called scription to help with scripts; it supports
giving passwords to programs like s
On 10/05/2016 10:46 AM, Noah wrote:
I would like to use a python script to ssh into a server using a username
and password [...]
I've written a module called scription to help with scripts; it supports giving
passwords to programs like ssh.
Here's an example from one of my utility scripts:
Hi Rob
Thank you for your email.
I am guessing that is some module. Ok i will pip it and see how it goes.
Noah
On 5 Oct 2016 21:32, "Rob Gaddi" wrote:
> Noah wrote:
>
> > Hello folk,
> >
> > I would like to use a python script to ssh into a server using a username
> > and password and perhaps
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.highlandtechnology.com
Email address domain is
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
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, Oct 6, 2016 at 4:56 AM, Malcolm Greene wrote:
> Looking for a quick way to calculate lines of code/comments in a
> collection of Python scripts. This isn't a LOC per day per developer
> type analysis - I'm looking for a metric to quickly judge the complexity
> of a set of scripts I'm inher
Looking for a quick way to calculate lines of code/comments in a
collection of Python scripts. This isn't a LOC per day per developer
type analysis - I'm looking for a metric to quickly judge the complexity
of a set of scripts I'm inheriting.
Thank you,
Malcolm
--
https://mail.python.org/mailman/
--
https://mail.python.org/mailman/listinfo/python-list
On 2016-10-05 15:19, Camille Benoit via Python-list wrote:
Hi,it has been about a week since the last time I was able to use Python. Most of the
time, the interpreter doesn't show up and when it does and I am trying to run a program
it displayed the following message: "IDLE's subprocess didn't
On 2016-10-05 16:01, priya@gmail.com wrote:
Hi,
I am new to Python and I am learning it. Need some help. I downloaded
SimpleBool (https://github.com/lujunyan1118/SimpleBool) for simulating Boolean
models. SimpleBool works in Python. I downloaded the Canopy and executed
Boolmutation.py f
Here is another example
http://www.codetwo.com/media/images/exchange-sync-screencast-5.jpg
--
https://mail.python.org/mailman/listinfo/python-list
http://www.qualicode.com/EN/images/ScheduleGrid.png
looking to add schedule like that to my software trying with Qt but not sure
how to .
--
https://mail.python.org/mailman/listinfo/python-list
Welcome,
Please, format your code. That's a lot of code, and it doesn't run as
presented. Use text mode in your email program (or whatever you use
to post here), and make sure the indentation is correct.
On Wed, Oct 5, 2016 at 11:01 AM, wrote:
> Hi,
>I am new to Python and I am learning i
Hi,it has been about a week since the last time I was able to use Python. Most
of the time, the interpreter doesn't show up and when it does and I am trying
to run a program it displayed the following message: "IDLE's subprocess didn't
make connection. Either IDLE can't start a subprocess or per
Hi,
I am new to Python and I am learning it. Need some help. I downloaded
SimpleBool (https://github.com/lujunyan1118/SimpleBool) for simulating Boolean
models. SimpleBool works in Python. I downloaded the Canopy and executed
Boolmutation.py file. Below is the Boolmutation.py file
#!/bin/e
BartC writes:
> On 05/10/2016 11:03, Ben Bacarisse wrote:
>> Gregory Ewing writes:
>>
>>> Steve D'Aprano wrote:
>>>
And (shamelessly using Python syntax) if I have a function:
def spam(x):
print(x)
print(x+1)
spam(time.sleep(60) or 1)
>>>
>>> You can't
On Thu, Oct 6, 2016 at 12:10 AM, Beverly Howard wrote:
> I'm new to Python, but have three decades of experience with FoxPro and VFP
> plus I started programming in Basic and still comfortable with that.
>
> I have spent some time with Python and am now fairly familiar with the syntax
> and func
On Wed, 05 Oct 2016 06:10:05 -0700, Beverly Howard wrote:
> I'm new to Python, but have three decades of experience with FoxPro and
> VFP plus I started programming in Basic and still comfortable with that.
>
> I have spent some time with Python and am now fairly familiar with the
> syntax and fu
On Wednesday, October 5, 2016 at 7:05:02 PM UTC+5:30, BartC wrote:
> On 05/10/2016 14:13, Rustom Mody wrote:
> > On Wednesday, October 5, 2016 at 4:24:01 PM UTC+5:30, BartC wrote:
> >> On 05/10/2016 11:03, Ben Bacarisse wrote:
>
> >>> spam io = do x <- io;
> >>> print x;
> >>>
Hi
I'm writing json data validation tool in a language other than python,
but knowing that there is plenty of good tools for it,
I am looking for inspiration here.
I am aware of json schema standard, but on its own its
rather verbose and I'd rather have models defined in code
(directly or via som
On Thu, Oct 6, 2016 at 12:13 AM, Gregory Ewing
wrote:
> Chris Angelico wrote:
>>
>> How do you handle variadic functions?
>
>
> All functions in Haskell take exactly one argument, so
> there isn't really any such thing as a variadic function.
> The argument can be a list, however, so you can get t
On 05/10/2016 14:13, Rustom Mody wrote:
On Wednesday, October 5, 2016 at 4:24:01 PM UTC+5:30, BartC wrote:
On 05/10/2016 11:03, Ben Bacarisse wrote:
spam io = do x <- io;
print x;
x <- io;
print (x+1)
(I downloaded Haskell (ghc) yesterday to try this o
Chris Angelico wrote:
So how do you handle something that, by its nature, has BOTH side
effects and a return value?
A Pascal purist would probably say that you should make
it a procedure, and use var parameters to pass back
any results.
In the case of something like the unix write() call, this
On Wednesday, October 5, 2016 at 4:24:01 PM UTC+5:30, BartC wrote:
> On 05/10/2016 11:03, Ben Bacarisse wrote:
> > Gregory Ewing writes:
> >
> >> Steve D'Aprano wrote:
> >>
> >>> And (shamelessly using Python syntax) if I have a function:
> >>>
> >>> def spam(x):
> >>> print(x)
> >>> print
I'm new to Python, but have three decades of experience with FoxPro and VFP
plus I started programming in Basic and still comfortable with that.
I have spent some time with Python and am now fairly familiar with the syntax
and functions, but building a user interface has me stopped.
A primary q
Chris Angelico wrote:
How do you handle variadic functions?
All functions in Haskell take exactly one argument, so
there isn't really any such thing as a variadic function.
The argument can be a list, however, so you can get the
same effect.
--
Greg
--
https://mail.python.org/mailman/listinfo/
On Wednesday, October 5, 2016 at 12:21:35 PM UTC+5:30, Chris Angelico wrote:
> On Wed, Oct 5, 2016 at 5:19 PM, Rustom Mody wrote:
> > Its ironical:
> > - Function in Fortran was meant to emulate math-functions
> > - C took the same thing and did a ‘small little syntax elision’ viz
> > conflating f
On Wed, Oct 5, 2016 at 7:43 AM, Nagy László Zsolt wrote:
> It did not help. I still get the same error message (service did not
> respond in time).
Can you run the service executable directly? From the command line
check `sc qc TestService`. Run the BINARY_PATH_NAME executable, e.g.
for /f "
On 05/10/2016 11:03, Ben Bacarisse wrote:
Gregory Ewing writes:
Steve D'Aprano wrote:
And (shamelessly using Python syntax) if I have a function:
def spam(x):
print(x)
print(x+1)
spam(time.sleep(60) or 1)
You can't write that in Haskell, because Haskell's
equivalent of print() is
Gregory Ewing writes:
> Steve D'Aprano wrote:
>
>> And (shamelessly using Python syntax) if I have a function:
>>
>> def spam(x):
>> print(x)
>> print(x+1)
>>
>> spam(time.sleep(60) or 1)
>
> You can't write that in Haskell, because Haskell's
> equivalent of print() is not a function (or
after change to frozenset ,
it seems can classify into 7 repeated group
but, in real data
this consecutive lines can be also a group
but i can not find this,
actually i do not understand how the function works
is there any algorithm tutorials or books or external library that
can have a better
>> But again, that is not related to the question. Why does it not work?
>> What is missing?
> If you mean why running the service doesn't work, it should once you
> run the post-install script that copies pywintypes35.dll to the
> Windows System32 directory. This DLL is required by PythonService.
meInvent bbird writes:
... not looking at the details ...
"'str' object has not attribute 'intersection'": apparently,
something is really a string (an 'str') while you expect it to be a set.
"unhashable set": maybe, you try to put a set into another set (or a dict;
or somewhere else where hasha
Rustom Mody writes:
> On Tuesday, October 4, 2016 at 12:47:58 PM UTC+5:30, dieter wrote:
> ...
>> On the other hand, one can model Python variables as bindings
>> where language constructs (assignments) allow to change the binding.
>>
>> Thus, at an appropriate level of abstraction, you can say
Anuradha Laxminarayan writes:
> it Would be great to stay within the Python world if I could cover
> the key computational monadic ideas without the rest of Haskell.
It's useful to write some Python things in monadic style, but monads
make the most sense as type operators, which don't map onto Py
i do not understand,
how to solve this frozonset ?
Lawrence D’Oliveiro於 2016年10月5日星期三 UTC+8下午2時24分13秒寫道:
> On Wednesday, October 5, 2016 at 2:35:25 PM UTC+13, meInvent bbird wrote:
> > it return unhashable type 'set'
>
> This is what “frozenset” is for--it’s the immutable counterpart of “set”.
On Wednesday, 5 October 2016 11:47:17 UTC+5:30, Gregory Ewing wrote:
> Chris Angelico wrote:
> > Seriously though... this ties in with the other issues about *purely*
> > functional languages being rather impractical, and the purity
> > generally being sullied some by things like monads (which I s
74 matches
Mail list logo