"ast" writes:
> Suppose we have:
>
> ClassC inherit from ClassB
> ClassB inherit from ClassA
> ClassA inherit from object
>
> Let's build an object:
>
> obj = ClassC()
>
> Let's invoke an obj method
>
> obj.funct()
>
> funct is first looked in ClassC, then if not found
> on ClassB, then ClassA the
Hi
I am looking the relationship between some classes
from the enum module
from enum import EnumMeta, Enum
class Color(Enum):
pass
type(EnumMeta)
EnumMeta.__bases__
(,)
so EnumMeta is a metaclass, it is an instance of type
and inherit from type too.
type(Enum)
En
eryk sun at 2016/2/4 UTC+8 7:35:17PM wrote:
> > _mod = ctypes.cdll.LoadLibrary(_path)
>
> Calling ctypes.CDLL directly is preferable since it allows passing
> parameters such as "mode" and "use_errno".
>
> IMO, the ctypes.cdll and ctypes.windll loaders should be avoided in
> general, especially o
On Feb 5, 2016 5:45 AM, "Steven D'Aprano" wrote:
>
> On Fri, 5 Feb 2016 07:50 am, srinivas devaki wrote:
>
> > _siftdown function breaks out of the loop when the current pos has a
valid
> > parent.
> >
> > but _siftup function is not implemented in that fashion, if a valid
> > subheap is given to
On 05.02.2016 01:12, Steven D'Aprano wrote:
On Fri, 5 Feb 2016 07:50 am, srinivas devaki wrote:
_siftdown function breaks out of the loop when the current pos has a valid
parent.
but _siftup function is not implemented in that fashion, if a valid
subheap is given to the _siftup, it will bring
On Fri, 5 Feb 2016 07:50 am, srinivas devaki wrote:
> _siftdown function breaks out of the loop when the current pos has a valid
> parent.
>
> but _siftup function is not implemented in that fashion, if a valid
> subheap is given to the _siftup, it will bring down the root of sub heap
> and then
On Thu, Feb 4, 2016 at 11:22 PM, Salony Permanand
wrote:
> During working on python I need urllib2 for my python version 2.7.11.
> Kindly provide me address from where to download it..
> Thanking you.
It should have come with Python. Try it - you should be able to just
use it as-is.
ChrisA
--
h
_siftdown function breaks out of the loop when the current pos has a valid
parent.
but _siftup function is not implemented in that fashion, if a valid subheap
is given to the _siftup, it will bring down the root of sub heap and then
again bring it up to its original place.
I was wondering why it
On 04.02.2016 19:35, Random832 wrote:
On Thu, Feb 4, 2016, at 11:18, Sven R. Kunze wrote:
On 04.02.2016 00:47, Random832 wrote:
On Wed, Feb 3, 2016, at 16:43, Sven R. Kunze wrote:
Actually a nice idea if there were no overhead of creating methods for
all heap instances separately. I'll keep th
On Thu, Feb 4, 2016 at 12:26 AM, Ben Finney
wrote:
> Random832 writes:
>
> > On Wed, Feb 3, 2016, at 16:50, Ben Finney wrote:
> > > (You will also have a “reply to all” command. That's almost never
> > > appropriate in a forum like this.)
> >
> > Why not? People reply all to messages I write all
On Thu, Feb 4, 2016, at 11:18, Sven R. Kunze wrote:
> On 04.02.2016 00:47, Random832 wrote:
> > On Wed, Feb 3, 2016, at 16:43, Sven R. Kunze wrote:
> >> Actually a nice idea if there were no overhead of creating methods for
> >> all heap instances separately. I'll keep that in mind. :)
> > What abo
On 04.02.2016 00:47, Random832 wrote:
On Wed, Feb 3, 2016, at 16:43, Sven R. Kunze wrote:
Actually a nice idea if there were no overhead of creating methods for
all heap instances separately. I'll keep that in mind. :)
What about changing the class of the object to one which is inherited
from i
As an attempt to answer your original question, Python doesn't explicitly
mark a module as done. It does keep imports cached in sys.modules, though.
The behaviour you describe where later imports get the same module object
is driven by that cache.
There are cases, such as cyclical imports, where t
So far, I've been advised to:
1/ Double-check that the GIL was correctly acquired
2/ Ensure there's no 'string' module in my project
3/ Manually pre-import commonly used standard modules at interpreter's
init-time to avoid race conditions due to the multi-threaded nature of the
running environme
On Thu, Feb 4, 2016 at 2:45 AM, wrote:
> I have coded a program with python and vlc that plays some videos, but
> whenever I try to play 3 videos at once, Windows closes the program, I'm
> guessing that the reason is that one process can't play 3 videos at once (but
> I don't really know).
My
On Sunday, 29 December 2013 20:20:00 UTC, Michael Matveev wrote:
> Hi,
> I use live Debian on VM and trying to compile this code.
>
>
> import Tkinter
>
> root = Tkinter.Tk()
>
> root.title("Fenster 1")
> root.geometry("100x100")
>
> root.mainloop()
>
>
> The shell gives out that kind of
阎兆珣 wrote:
>Excuse me for the same problem in Python 3.4.2-32bit
>
>I just discovered that function does not necessarily take the
>string input and transfer it to a command to execute.
>
>So is there a problem with my assumption?
Python discriminates between statements and expr
On Thu, Feb 4, 2016 at 6:33 AM, 阎兆珣 wrote:
>Excuse me for the same problem in Python 3.4.2-32bit
>
>I just discovered that function does not necessarily take the
>string input and transfer it to a command to execute.
>
>So is there a problem with my assumption?
eval evaluates an
Hi,
>I just discovered that function does not necessarily take the
>string input and transfer it to a command to execute.
Can you please show us the code you try to execute and tells what result you
expect?
Lutz
--
https://mail.python.org/ma
Excuse me for the same problem in Python 3.4.2-32bit
I just discovered that function does not necessarily take the
string input and transfer it to a command to execute.
So is there a problem with my assumption?
Thanks
Option Product Manager
Gelin Dahua Futures Co.Ltd
On Thu, Feb 4, 2016 at 7:22 AM, Salony Permanand wrote:
> hello sir,
> During working on python I need urllib2 for my python version 2.7.11.
> Kindly provide me address from where to download it..
> Thanking you.
>
> Hello Salony,
Since this is a new question, its best to start a new thread with
On 04/02/2016 13:09, Tim Golden wrote:
> On 04/02/2016 12:52, Yossifoff Yossif wrote:
>> Hallow,
>> I try to open a .py file (attached), but what I get is a windows DOS window
>> opening and closing in a couple of seconds. Ran repair of the program,
>> nothing happened.
>> I cannot see error mess
On 04/02/2016 12:52, Yossifoff Yossif wrote:
> Hallow,
> I try to open a .py file (attached), but what I get is a windows DOS window
> opening and closing in a couple of seconds. Ran repair of the program,
> nothing happened.
> I cannot see error messages and don't know where to look for ones.
>
Hallow,
I try to open a .py file (attached), but what I get is a windows DOS window
opening and closing in a couple of seconds. Ran repair of the program, nothing
happened.
I cannot see error messages and don't know where to look for ones.
Would appreciate your piece of advice.
[cid:image003.jpg
Hi
I am an computer science engineer. I downloaded the python version
3.5.1.amd64 and just python 3.5.1. The problem is when I install the program
setup is failed and showing 0*80070570-The file or directory is corrupted and
unreadable. I install the newest visual c++ redist and still same.
I think it has to be with some functions that I think they are defined on the
"forked" processes and maybe they don't, if I create a class on the new process
it should have all the defined functions than the original right?
--
https://mail.python.org/mailman/listinfo/python-list
I have coded a program with python and vlc that plays some videos, but whenever
I try to play 3 videos at once, Windows closes the program, I'm guessing that
the reason is that one process can't play 3 videos at once (but I don't really
know).
My trimmed program plays one video (trhough a globa
hello sir,
During working on python I need urllib2 for my python version 2.7.11.
Kindly provide me address from where to download it..
Thanking you.
On Wed, Feb 3, 2016 at 4:27 PM, Salony Permanand wrote:
> Thankyou for consideration..I have solved my problem by changing name of
> temp files by
On Thu, Feb 4, 2016 at 3:33 AM, wrote:
>
> class DoubleArrayType:
> def from_param(self, param):
>
> [snip]
>
> DoubleArray = DoubleArrayType()
> _avg = _mod.avg
> _avg.argtypes = (DoubleArray, ctypes.c_int)
>
> [snip]
>
> What confuse me are:
> (1) at line: _avg.argtypes = (DoubleArray, ctyp
I have coded a program with python and vlc that plays some videos, but whenever
I try to play 3 videos at once, Windows closes the program, I'm guessing that
the reason is that one process can't play 3 videos at once (but I don't really
know).
My trimmed program plays one video (trhough a globa
Hi all,
The short version: How CPython marks a module as being fully imported, if it
does, so that the same import statement ran from another C thread at the same
time does not collide? Or, reversely, does not think the module is not already
fully imported?
The full version: I'm running CPytho
I have coded a program with python and vlc that plays some videos, but whenever
I try to play 3 videos at once, Windows closes the program, I'm guessing that
the reason is that one process can't play 3 videos at once (but I don't really
know).
My trimmed program plays one video (trhough a globa
On 04.02.2016 10:00, Chris Angelico wrote:
On Thu, Feb 4, 2016 at 7:54 PM, ast wrote:
It is strange but I dont have the same result that you:
(Python 3.4)
class A:
def a(self):pass
class B(A):
def b(self):pass
class C(B):
def c(self):pass
obj = C()
obj.a
>
Curious. It appears
Here is an example from "Python Cookbook, Third Edition(by David Beazley and
Brian K. Jones)" Chapter 15.1. "Accessing C Code Using ctypes"
---
import ctypes
...
# Try to locate the .so file in the same directory as this file
...
_mod = ctypes.cdll.LoadLibrary(_path)
...
...
# voi
On 3 February 2016 at 23:03, Syavosh Malek wrote:
> hi i install python 3.5.1 and found run time error
> see attach file and help me please
I'm afraid your attachment didn't arrive as this is a text-only
mailing list. Can you include more information about the error?
If it's that you're missing
On 3 February 2016 at 21:55, Barrie Taylor wrote:
>
> I am attempting to install and run Python3.5.1 on my Windows machine.
>
> After installation on launching I am presented the attached error message.
> It reads:
> 'The program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing
>
"eryk sun" a écrit dans le message de
news:mailman.49.1454576255.30993.python-l...@python.org...
On Thu, Feb 4, 2016 at 2:03 AM, ast wrote:
but if I am using dir to display all Carre's attributes and methods,
__bases__ is not on the list. Why ?
The __bases__ property is defined by the meta
On 02/03/2016 09:03 PM, 阎兆珣 wrote:
a = input("tell me which py to execute: ")
print(a)
print('import '+a)
print(type('import'+a))
eval('print(a)')
Eval is meant to evaluate Python expressions. The import is a
statement, not an expression. Also, it's a bad idea to use e
On Thu, Feb 4, 2016 at 7:54 PM, ast wrote:
> It is strange but I dont have the same result that you:
> (Python 3.4)
>
class A:
>
> def a(self):pass
>
class B(A):
> def b(self):pass
>
class C(B):
> def c(self):pass
>
obj = C()
>
obj.a
>
> >
Curious. It appears to have chan
"Ben Finney" a écrit dans le message de
news:mailman.48.1454575803.30993.python-l...@python.org...
That's been answered, but I'm curious to know what your program will do
with that information?
Nothings, I was just wondering.
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, Feb 4, 2016 at 2:03 AM, ast wrote:
> but if I am using dir to display all Carre's attributes and methods,
> __bases__ is not on the list. Why ?
The __bases__ property is defined by the metaclass, "type". dir() of a
class doesn't show attributes from the metaclass [1].
Because dir() i
"Chris Angelico" a écrit dans le message de
news:mailman.43.1454574987.30993.python-l...@python.org...
You can see that by looking at the objects without calling them:
class A:
... def a(self): pass
...
class B(A):
... def b(self): pass
...
class C(B):
... def c(self): pass
...
ob
"ast" writes:
> Let's invoke an obj method
>
> obj.funct()
>
> funct is first looked in ClassC, then if not found
> on ClassB, then ClassA then object
If it helps: What you describe is attribute lookup, and it happens
whether or not you're going to call the attribute.
In other words, you need o
On Thu, Feb 4, 2016 at 4:03 PM, 阎兆珣 wrote:
>a = input("tell me which py to execute: ")
>
>print(a)
>
>print('import '+a)
>
>print(type('import'+a))
>
>eval('print(a)')
>
>try:
>
>eval('import '+a)
>
>except Exception as e:
>
>print('Error: ', e)
>
>
"Chris Angelico" a écrit dans le message de
news:mailman.43.1454574987.30993.python-l...@python.org...
Is that what you're hoping for?
yes, ty
--
https://mail.python.org/mailman/listinfo/python-list
a = input("tell me which py to execute: ")
print(a)
print('import '+a)
print(type('import'+a))
eval('print(a)')
try:
eval('import '+a)
except Exception as e:
print('Error: ', e)
##while True:
## pass
@python 3.4.2
this code attempts to
hi i install python 3.5.1 and found run time error
see attach file and help me please
--
https://mail.python.org/mailman/listinfo/python-list
Hi,
I am attempting to install and run Python3.5.1 on my Windows machine.
After installation on launching I am presented the attached error message.
It reads:
'The program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing
from your computer. Try reinstalling the program to fix thi
On Thu, Feb 4, 2016 at 7:25 PM, ast wrote:
> Hi
>
> Suppose we have:
>
> ClassC inherit from ClassB
> ClassB inherit from ClassA
> ClassA inherit from object
>
> Let's build an object:
>
> obj = ClassC()
>
> Let's invoke an obj method
>
> obj.funct()
>
> funct is first looked in ClassC, then if no
Hi
Suppose we have:
ClassC inherit from ClassB
ClassB inherit from ClassA
ClassA inherit from object
Let's build an object:
obj = ClassC()
Let's invoke an obj method
obj.funct()
funct is first looked in ClassC, then if not found
on ClassB, then ClassA then object
But is there a command to
Hi
I have a Carre class which inherit from a Rectangle class.
Carre has a __bases__ tuple attribute which contains the
classes which it inherit from.
Carre.__bases__
(,)
and Rectangle only inherit from object, so:
Rectangle.__bases__
(,)
Thats OK
but if I am using dir to display all Carr
51 matches
Mail list logo