Steven D'Aprano writes:
> On Wed, 2 Sep 2015 02:20 am, Marko Rauhamaa wrote:
>> Steven D'Aprano:
>>
>>> I believe that Marko is wrong. It is not so easy to compile Python
>>> to machine language for real machines. That's why the compiler
>>> targets a virtual machine instead.
>>
>> Somehow Guile
Steven D'Aprano :
> On Wed, 2 Sep 2015 02:20 am, Marko Rauhamaa wrote:
>> I never said a compiler would translate Python to (analogous) machine
>> language. I said you could easily turn CPython into a dynamic library
>> (run-time environment) and write a small bootstrapper that you
>> package into
On 08/31/2015 02:35 AM, Mahan Marwat wrote:
> What I know about an interpreter and a compiler is: they both convert
> source code to machine code and the only difference is, an
> interpreter convert it, line by line while compiler convert the whole
> source file. Now if we compile a C source file o
On Wed, 2 Sep 2015 02:20 am, Marko Rauhamaa wrote:
> Steven D'Aprano :
>
>> I believe that Marko is wrong. It is not so easy to compile Python to
>> machine language for real machines. That's why the compiler targets a
>> virtual machine instead.
>
> Somehow Guile manages it even though Scheme i
On 02Sep2015 08:01, Cameron Simpson wrote:
One circumstance where you might use fdopen and _not_ want .close to close the
underlying service is when you're handed a file descriptor over which you're
supposed to perform some I/O, and the I/O library functions use high level
files. In that case
On Wed, Sep 2, 2015 at 6:08 AM, Marko Rauhamaa wrote:
> Laura Creighton :
>
>> But are Guile programs small?
>
> They can be tiny because libguile-2.0.so, the interpreter, is a dynamic
> library and is installed on the computer. It's barely different from how
> compiled C programs can be a few kil
On 2015-09-01, Laura Creighton wrote:
> Don't go around closing things you don't know are open. They
> could be some other processes' thing.
I don't understand. Closing a file descriptor that isn't open is
harmless, isn't it? Closing one that _is_ open only affects the
current process. If ot
On 01Sep2015 11:56, random...@fastmail.us wrote:
On Tue, Sep 1, 2015, at 10:57, Steven D'Aprano wrote:
Q3: I could probably answer Q2 myself if I knew how to check whether a
fd
was open or not. With a file object, I can inspect file_obj.closed and it
will tell me whether the file is open or no
On Tue, Sep 1, 2015 at 2:07 PM, Chris Angelico wrote:
> On Wed, Sep 2, 2015 at 3:23 AM, wrote:
> > I'm starting in the Python scripts. I run this script:
> >
> >
> > import numpy as np
> >
> > import netCDF4
> >
> > f = netCDF4.Dataset('uwnd.mon.ltm.nc','r')
> >
> >
> > f.variables
> >
> >
> >
Laura Creighton :
> But are Guile programs small?
They can be tiny because libguile-2.0.so, the interpreter, is a dynamic
library and is installed on the computer. It's barely different from how
compiled C programs can be a few kilobytes in size because libc.so is
dynamic.
Emacs is a lisp interp
On Wed, Sep 2, 2015 at 3:23 AM, wrote:
> I'm starting in the Python scripts. I run this script:
>
>
> import numpy as np
>
> import netCDF4
>
> f = netCDF4.Dataset('uwnd.mon.ltm.nc','r')
>
>
> f.variables
>
>
> and I had the message:
>
>
> netcdf4.py
> Traceback (most recent call last):
> File
>But are Guile programs small? I the OP made a categorisation error,
>confusing correlation with causation. (i.e. the presence of
>feathers makes a animal able to fly).
s/I the/I think the/
--
https://mail.python.org/mailman/listinfo/python-list
In a message of Wed, 02 Sep 2015 00:57:22 +1000, "Steven D'Aprano" writes:
>Let's suppose somebody passes me a file descriptor to work with. It could
>come from somewhere else, but for the sake of discussion let's pretend I
>create it myself this way:
>Q1: In this example, I know that I opened th
Hi,
I'm starting in the Python scripts. I run this script:
import numpy as np
import netCDF4
f = netCDF4.Dataset('uwnd.mon.ltm.nc','r')
f.variables
and I had the message:
netcdf4.py
Traceback (most recent call last):
File "", line 1, in
NameError: name 'netcdf4' is not defined
Wh
In a message of Tue, 01 Sep 2015 19:20:51 +0300, Marko Rauhamaa writes:
>Somehow Guile manages it even though Scheme is at least as dynamic a
>language as Python.
But are Guile programs small? I the OP made a categorisation error,
confusing correlation with causation. (i.e. the presence of
feath
On Tuesday, September 1, 2015 at 12:54:08 PM UTC+5:30, Jahn wrote:
> 1.
> How can I save 256 lists, each list has 32 values( hexadecimal numbers)
> 2.
> How to compare the saved lists with another 256 lists ( that are read online
> and have the
> same structure as the list one)?
> ( the first lis
On Mon, Aug 31, 2015 at 11:45 PM, Luca Menegotto
wrote:
> Il 31/08/2015 19:48, Mahan Marwat ha scritto:
>
>> If it hasn't been considered all that useful, then why
>
>> the tools like cx_freeze, pytoexe are doing very hard!
>
> Well, I consider those tools useless at all!
> I appreciate Python bec
On Tue, Sep 1, 2015 at 12:20 PM, Marko Rauhamaa
wrote:
Steven D'Aprano :
I believe that Marko is wrong. It is not so easy to compile Python
to
machine language for real machines. That's why the compiler targets
a
virtual machine instead.
Somehow Guile manages it even though Scheme is
In a message of Wed, 02 Sep 2015 00:57:45 +1000, Chris Angelico writes:
>On Wed, Sep 2, 2015 at 12:45 AM, Steven D'Aprano wrote:
>> I assume the answer is "Yes", but is it safe to expect that
>> tempfile.mkstemp() will only create a file that doesn't already exist? I
>> presume that there's no cha
On Wed, Sep 2, 2015 at 2:20 AM, Marko Rauhamaa wrote:
> In fact, the shebang notation turns any single .py file into such an
> executable. The problem is if you break your program into modules. Java,
> of course, solved a similar problem with .jar files (but still wouldn't
> jump over the final hu
Steven D'Aprano :
> I believe that Marko is wrong. It is not so easy to compile Python to
> machine language for real machines. That's why the compiler targets a
> virtual machine instead.
Somehow Guile manages it even though Scheme is at least as dynamic a
language as Python.
I never said a com
On Tue, Sep 1, 2015, at 10:57, Steven D'Aprano wrote:
> Q1: In this example, I know that I opened the fd in write mode, because
> I
> did it myself. But since I'm not actually opening it, how do I know what
> mode to use in the call to fdopen? Is there something I can call to find
> out what mode
On Tue, 1 Sep 2015 03:48 am, Mahan Marwat wrote:
>> Python programs *could* easily be compiled the same way, but it generally
>> hasn't been considered all that useful.
>
> If it hasn't been considered all that useful, then why the tools like
> cx_freeze, pytoexe are doing very hard! And if it is
Let's suppose somebody passes me a file descriptor to work with. It could
come from somewhere else, but for the sake of discussion let's pretend I
create it myself this way:
import os
fd = os.open("some path", "w")
I then turn it into a file object:
file_obj = os.fdopen(fd, mode)
Q1: In this
On Wed, Sep 2, 2015 at 12:45 AM, Steven D'Aprano wrote:
> I assume the answer is "Yes", but is it safe to expect that
> tempfile.mkstemp() will only create a file that doesn't already exist? I
> presume that there's no chance of it over-writing an existing file (say,
> due to a race-condition).
I
I assume the answer is "Yes", but is it safe to expect that
tempfile.mkstemp() will only create a file that doesn't already exist? I
presume that there's no chance of it over-writing an existing file (say,
due to a race-condition).
--
Steven
--
https://mail.python.org/mailman/listinfo/python-l
In a message of Tue, 01 Sep 2015 05:16:48 -0700, harirammanohar...@gmail.com wr
ites:
>On Tuesday, 18 August 2015 08:27:33 UTC+5:30, hariramm...@gmail.com wrote:
>> execute commands as su on remote server
>>
>> Postby hariram » Mon Aug 17, 2015 4:02 am
>> Needed:
>> I need to execute commands aft
On Tuesday, 18 August 2015 08:27:33 UTC+5:30, hariramm...@gmail.com wrote:
> execute commands as su on remote server
>
> Postby hariram » Mon Aug 17, 2015 4:02 am
> Needed:
> I need to execute commands after doing su to other user on remote server(not
> sudo which doesn't require password) how i
On Tue, 01 Sep 2015 07:08:48 +0200, Jahn wrote:
> 1.
> How can I save 256 lists, each list has 32 values( hexadecimal numbers)
> 2.
> How to compare the saved lists with another 256 lists ( that are read
> online and have the same structure as the list one)?
> ( the first list must be saved in the
In a message of Tue, 01 Sep 2015 07:08:48 +0200, "Jahn" writes:
>1.
>How can I save 256 lists, each list has 32 values( hexadecimal numbers)
>2.
>How to compare the saved lists with another 256 lists ( that are read online
>and have the
>same structure as the list one)?
>( the first list must be
On 09/01/2015 07:08 AM, Jahn wrote:
1.
How can I save 256 lists, each list has 32 values( hexadecimal numbers)
2.
How to compare the saved lists with another 256 lists ( that are read online
and have the
same structure as the list one)?
( the first list must be saved in the previous step)
E.
On 31.08.2015 19:41, John McKenzie wrote:
> Still checking here and am discussing all this in the Raspberry pi
> newsgroup. Thanks to the several people who mentioned it.
>
> Again, still listening here if anyone has any more to add.
I've had the problem to use interrupt-driven GPIOs on the P
If I understand what you are saying, then I think what you are
looking for is not a compiler, but docker.
see: https://www.docker.com/
in particular https://www.docker.com/whatisdocker
PyPy used this to produce portable PyPy binaries. See:
https://github.com/squeaky-pl/portable-pypy/blob/master/R
Jahn wrote:
> 1.
> How can I save 256 lists, each list has 32 values( hexadecimal numbers)
> 2.
> How to compare the saved lists with another 256 lists ( that are read
> online and have the same structure as the list one)?
> ( the first list must be saved in the previous step)
You are giving det
On Tue, Sep 1, 2015 at 3:08 PM, Jahn wrote:
> 1.
> How can I save 256 lists, each list has 32 values( hexadecimal numbers)
> 2.
> How to compare the saved lists with another 256 lists ( that are read online
> and have the
> same structure as the list one)?
> ( the first list must be saved in the
1.
How can I save 256 lists, each list has 32 values( hexadecimal numbers)
2.
How to compare the saved lists with another 256 lists ( that are read online
and have the
same structure as the list one)?
( the first list must be saved in the previous step)
E.g
Thanks
--
https://mail.python.o
dunric...@gmail.com wrote:
> Hello,
>
> bellow is a simple Python2 example of a class which defines __getattr__
> method and a property, where AttributeError exception is raised:
>
> from __future__ import print_function
>
> class MyClass(object):
> def __getattr__(self, name):
> pr
37 matches
Mail list logo