On 23/04/19 10:08 PM, Steven D'Aprano wrote:
On Tue, Apr 23, 2019 at 08:27:15PM +0530, Arup Rakshit wrote:
You probably want:
def __init__(self, list=None):
if list is None:
list = []
self.list = list
That is really a new thing to me. I didn't know.
On Tue, Apr 23, 2019 at 08:27:15PM +0530, Arup Rakshit wrote:
> >You probably want:
> >
> > def __init__(self, list=None):
> > if list is None:
> > list = []
> > self.list = list
>
> That is really a new thing to me. I didn't know. Why list=None in the
>
On 4/23/19 8:57 AM, Arup Rakshit wrote:
> On 23/04/19 3:40 PM, Steven D'Aprano wrote:
>> Watch out here, you have a mutable default value, that probably doesn't
>> work the way you expect. The default value is created ONCE, and then
>> shared, so if you do this:
>>
>> a = MyCustomList() # Use the
On 23/04/19 3:40 PM, Steven D'Aprano wrote:
Watch out here, you have a mutable default value, that probably doesn't
work the way you expect. The default value is created ONCE, and then
shared, so if you do this:
a = MyCustomList() # Use the default list.
b = MyCustomList() # Shares the same
On Tue, Apr 23, 2019 at 11:46:58AM +0530, Arup Rakshit wrote:
> Hi,
>
> I wrote below 2 classes to explore how __getitem__(self,k) works in
> conjuection with list subscriptions. Both code works. Now my questions
> which way the community encourages more in Python: if isinstance(key,
> slice):
On 23/04/2019 07:16, Arup Rakshit wrote:
> which way the community encourages more in Python: if isinstance(key,
> slice): or if type(key) == slice: ?
I think isinstance is usually preferred although I confess
that I usually forget and use type()... But isinstance covers
you for subclasses too.
Hi,
I wrote below 2 classes to explore how __getitem__(self,k) works in
conjuection with list subscriptions. Both code works. Now my questions
which way the community encourages more in Python: if isinstance(key,
slice): or if type(key) == slice: ? How should I implement this if I
follow
On 22/04/19 3:35 PM, Alan Gauld via Tutor wrote:
On 22/04/2019 10:18, Arup Rakshit wrote:
Consider the below in simple class:
class RandomKlass:
def __init__(self, x):
self.x = x
def __del__(self):
print("Deleted…")
Now when I delete the object created from
On 22/04/2019 10:18, Arup Rakshit wrote:
> Consider the below in simple class:
>
> class RandomKlass:
> def __init__(self, x):
> self.x = x
>
> def __del__(self):
> print("Deleted…")
>
> Now when I delete the object created from RandomKlass using `del` operator I
>
Consider the below in simple class:
class RandomKlass:
def __init__(self, x):
self.x = x
def __del__(self):
print("Deleted…")
Now when I delete the object created from RandomKlass using `del` operator I
see the output “Deleted…”. That means `del` operator calls the
On 13 Mar 2019 18:14, Alan Gauld via Tutor wrote:
On 11/03/2019 16:10, Diana Katz wrote:
> What is the best way to ..program using python - that could recognize
> a 3D object and then rank drawings of the object as to which are more
> accurate.
===>> check this out:
I'll outline what you need
those types of recognition are done by machine learning, just some maths
using computation.
You normally give your program some images to train. Instead of letting the
program to figure out by itself, you give it some realistic drawings, the
best of the bunch and a
On 11/03/2019 16:10, Diana Katz wrote:
> What is the best way to ..program using python - that could recognize
> a 3D object and then rank drawings of the object as to which are more
> accurate.
I notice nobody has responded so I thought I'd let you
know your mail was received.
Unfortunately
Hi,
What is the best way to create an artificial intelligence program using python
- that could recognize a 3D object and then rank drawings of the object as to
which are more accurate. It was suggested to us to use raspberry pi and python
and perhaps tweak existing apps. Any help as to how to
On 21/08/18 12:16, Jacob Braig wrote:
> I am just starting out coding and decided on python.
It looks like you are using Python v2 (maybe v2.7?) but
the latest version is 3.7 and for beginners we normally
recommend adopting v3. It doesn't change anything much
in this case but it saves you
On Tue, Aug 21, 2018 at 05:16:35AM -0600, Jacob Braig wrote:
> I am having issues with " ammopleft = ammopistol - ammopused " any idea
> where I have gone wrong?
What sort of issues? Should we try to guess, or would you like to tell
us?
I'm reminded of a joke...
A man goes to the doctor.
Op 21-08-18 om 13:16 schreef Jacob Braig:
I am just starting out coding and decided on python. I am confused with
something I go shooting a lot so i wanted to make some stupid easy
calculator for ammo and slowly build the program up when I understand
python better but the code I have now keeps
I am just starting out coding and decided on python. I am confused with
something I go shooting a lot so i wanted to make some stupid easy
calculator for ammo and slowly build the program up when I understand
python better but the code I have now keeps popping up an error and I don't
understand
Jeremy Ogorzalek wrote:
> Not sure this is how this is done, but here goes.
>
> When I try to run the code in the SGP4 module, I get the following error,
> and it originates in the io.py script:
>
>
> File "C:\ProgramData\Anaconda3\lib\site-packages\sgp4\io.py", line 131,
> in twoline2rv
>
On 04/06/18 16:57, Jeremy Ogorzalek wrote:
> Not sure this is how this is done, but here goes.
>
> When I try to run the code in the SGP4 module, I get the following error,
> and it originates in the io.py script:
I have no idea what you are talking about and do not know what the SGP4
or io.py
Not sure this is how this is done, but here goes.
When I try to run the code in the SGP4 module, I get the following error,
and it originates in the io.py script:
File "C:\ProgramData\Anaconda3\lib\site-packages\sgp4\io.py", line 131,
in twoline2rv
assert line.startswith('1 ')
TypeError:
On 12/05/18 06:40, peter wrote:
> range does not work the same for 2.7 and my 3.6.5. Seems they have
> changed the nature of range. It is a built in listed along with lists
> and tuples
You are correct in that it has changed slightly and now returns
a range object. but you can convert it to a
range does not work the same for 2.7 and my 3.6.5. Seems they have
changed the nature of range. It is a built in listed along with lists
and tuples
list(range(10))
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> tuple(range(10))
(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
seems they have changed range for
> On May 9, 2018, at 07:14, kevin hulshof wrote:
>
> Hello,
>
> Is there a function that allows you to grab the numbers between two numbers?
>
> Eg. If you input the numbers 1 and 4
> To make a list like this [1,2,3,4]
One option is range
range(1,5)
>>> range(1,5)
[1,
On 09/05/18 13:14, kevin hulshof wrote:
Hello,
Is there a function that allows you to grab the numbers between two numbers?
Eg. If you input the numbers 1 and 4
To make a list like this [1,2,3,4]
Thank you for you’re time
Seems like 'range' should fit your needs
Hello,
Is there a function that allows you to grab the numbers between two numbers?
Eg. If you input the numbers 1 and 4
To make a list like this [1,2,3,4]
Thank you for you’re time
Sent from my iPhone
___
Tutor maillist - Tutor@python.org
To
On Thu, Jan 18, 2018 at 05:14:43PM +, Albert-Jan Roskam wrote:
> Is a metaclass the best/preferred/only way of doing this? Or is a
> class decorator an alternative route?
I haven't thought deeply about this, but I suspect a class decorator
should do the job too.
The general advice is to
On Thu, Jan 18, 2018 at 05:31:24PM +, Albert-Jan Roskam wrote:
> > Don't make the mistake of doing this:
> >
> > from collections import namedtuple
> > a = namedtuple('Bag', 'yes no dunno')(yes=1, no=0, dunno=42)
> > b = namedtuple('Bag', 'yes no dunno')(yes='okay', no='no way', dunno='not a
On Jan 10, 2018 19:32, Peter Otten <__pete...@web.de> wrote:
>
> Albert-Jan Roskam wrote:
>
> > Why does following the line (in #3)
>
> > # 3-
> > class Meta(type):
> > def __new__(cls, name, bases, attrs):
> > for attr, obj in
On Jan 10, 2018 18:57, Steven D'Aprano wrote:
>
> On Wed, Jan 10, 2018 at 04:08:04PM +, Albert-Jan Roskam wrote:
>
> > In another thread on this list I was reminded of
> > types.SimpleNamespace. This is nice, but I wanted to create a bag
> > class with constants that are
Steven D'Aprano wrote:
> On Wed, Jan 10, 2018 at 07:29:58PM +0100, Peter Otten wrote:
>
> [...]
>> elif not isinstance(obj, property):
>> attrs[attr] = property(lambda self, obj=obj: obj)
>
>> PS: If you don't remember why the obj=obj is necessary:
>> Python uses
On Wed, Jan 10, 2018 at 07:29:58PM +0100, Peter Otten wrote:
[...]
> elif not isinstance(obj, property):
> attrs[attr] = property(lambda self, obj=obj: obj)
> PS: If you don't remember why the obj=obj is necessary:
> Python uses late binding; without that trick all
Albert-Jan Roskam wrote:
> Why does following the line (in #3)
> # 3-
> class Meta(type):
> def __new__(cls, name, bases, attrs):
> for attr, obj in attrs.items():
> if attr.startswith('_'):
> continue
>
On Wed, Jan 10, 2018 at 10:08 AM, Albert-Jan Roskam
wrote:
> Hi,
>
>
> In another thread on this list I was reminded of types.SimpleNamespace. This
> is nice, but I wanted to create a bag class with constants that are
> read-only. My main question is about example #3
On Wed, Jan 10, 2018 at 04:08:04PM +, Albert-Jan Roskam wrote:
> In another thread on this list I was reminded of
> types.SimpleNamespace. This is nice, but I wanted to create a bag
> class with constants that are read-only.
If you expect to specify the names of the constants ahead of
Hi,
In another thread on this list I was reminded of types.SimpleNamespace. This is
nice, but I wanted to create a bag class with constants that are read-only. My
main question is about example #3 below (example #2 just illustrates my thought
process). Is this a use case to a metaclass? Or
Hello Khabbab Zakaria,
On Sun, Dec 10, 2017 at 11:18:16AM +0530, Khabbab Zakaria wrote:
> I am working on a program where I found the line:
> x,y,z = np.loadtext('abcabc.txt', unpack= True, skiprows =1)
> What does the x, y, z thing mean?
"x, y, z = ..." is iterable unpacking. The right hand
On 10/12/17 05:48, Khabbab Zakaria wrote:
> I am working on a program where I found the line:
> x,y,z = np.loadtext('abcabc.txt', unpack= True, skiprows =1)
> What does the x, y, z thing mean?
> What does the unpack= True mean?
They are related. unpacking is a feature of Python whereby a
I am working on a program where I found the line:
x,y,z = np.loadtext('abcabc.txt', unpack= True, skiprows =1)
What does the x, y, z thing mean?
What does the unpack= True mean?
Thank you
--
Khabbab Zakaria
Dept of Power Engineering
Jadavpur University
Calcutta
India
Айнур Зулькарнаев wrote:
> Hello all!
>
>
> There is a class Calendar in calendar.py in standard libriary.
>
>
> class Calendar(object):
> """
> Base calendar class. This class doesn't do any formatting. It
> simply provides data to subclasses.
> """
>
>
On Mon, Sep 11, 2017 at 10:58:51AM +, Айнур Зулькарнаев wrote:
> class Calendar(object):
> def __init__(self, firstweekday=0):
> self.firstweekday = firstweekday # 0 = Monday, 6 = Sunday
>
> def getfirstweekday(self):
> return self._firstweekday % 7
>
> def
On 11/09/17 11:58, Айнур Зулькарнаев wrote:
> So, the question is why not explicitly raise ValueError if
> user enters the firstweekday parameter bigger that 6
Its a valid question but you probably need to find the original PEP
document to find the answer and that module has been around for
a
Hello all!
There is a class Calendar in calendar.py in standard libriary.
class Calendar(object):
"""
Base calendar class. This class doesn't do any formatting. It simply
provides data to subclasses.
"""
def __init__(self, firstweekday=0):
On 12/04/17 15:32, Daniel Berger wrote:
>For me it is not clear what is going wrong and I would be happy to get
>some help to solve the problem.
This list is for the core language and library, so while we
can help with installing third party packages that doesn't
mean anyone here will
Gesendet: Dienstag, 11. April 2017 um 21:04 Uhr
Von: "Marc Tompkins" <marc.tompk...@gmail.com>
An: "Daniel Berger" <berg...@gmx.de>
Cc: "tutor@python.org" <tutor@python.org>
Betreff: Re: [Tutor] Question to Phyton and XBee
On Tue,
On Tue, Apr 11, 2017 at 9:12 AM, Daniel Berger wrote:
>Hello,
>
>I have installed the modules to control xbee with Python
>https://pypi.python.org/pypi/XBee). Afterwards I have set the path
>variable on C:\Python27\python-xbee-master and also the subdirectories.
>
Hello,
I have installed the modules to control xbee with Python
https://pypi.python.org/pypi/XBee). Afterwards I have set the path
variable on C:\Python27\python-xbee-master and also the subdirectories. To
check, if the modules are available, I have written the code as
On 04/05/2017 01:07 PM, Fazal Khan wrote:
> Hello,
>
> Heres another newbie python question: How can I loop through some data and
> assign different variables with each loop
>
> So this is my original code:
>
> def BeamInfo(x):
> for Bnum in x:
> if
On Wed, Apr 05, 2017 at 12:07:05PM -0700, Fazal Khan wrote:
> Hello,
>
> Heres another newbie python question: How can I loop through some data and
> assign different variables with each loop
You don't. That's a bad idea.
Instead, you use a sequence (a tuple, or a list), and use an index:
On 05/04/17 20:07, Fazal Khan wrote:
> assign different variables with each loop
You can't, but you can fake it...
> def BeamInfo(x):
> for Bnum in x:
> if plan1.IonBeamSequence[Bnum].ScanMode == 'MODULATED':
> TxTableAngle =
>
Hello,
Heres another newbie python question: How can I loop through some data and
assign different variables with each loop
So this is my original code:
def BeamInfo(x):
for Bnum in x:
if plan1.IonBeamSequence[Bnum].ScanMode == 'MODULATED':
TxTableAngle =
On 04/03/17 01:37, Tasha Burman wrote:
> I am having difficulty with a power function;
> what is another way I can do 4**9 without using **?
You can use the pow() function.
answer = pow(4,9)
However, I'm not sure that really answers your question?
Do you mean that you want to write your own
Hello python tutors,
I am having difficulty with a power function; what is another way I can do 4**9
without using **?
Thanks,
Tasha
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
On 09/11/16 22:30, Bryon Adams wrote:
> Hello,
> Working on a simple function to get an IP address and make it look
> pretty for the PyNet course. I'm wondering if there's way to evenly
> space text with the string.format() method similar to how I'm doing it
> with the % operator.
Yes,
Bryon Adams wrote:
> Hello,
> Working on a simple function to get an IP address and make it look
> pretty for the PyNet course. I'm wondering if there's way to evenly
> space text with the string.format() method similar to how I'm doing it
> with the % operator. The last two prints keep
Hello,
Working on a simple function to get an IP address and make it look
pretty for the PyNet course. I'm wondering if there's way to evenly
space text with the string.format() method similar to how I'm doing it
with the % operator. The last two prints keep everything left aligned
and 20
On 15 April 2016 at 10:48, Albert-Jan Roskam wrote:
> What I like about both namedtuple and AttrDict is attribute lookup: that
> makes code so, so, s much easier to read. This seems to be a nice
> generalization of your code:
>
> class Point(object):
>
> def
> From: oscar.j.benja...@gmail.com
> Date: Thu, 14 Apr 2016 21:34:39 +0100
> Subject: Re: [Tutor] question about __copy__ and __deepcopy__
> To: sjeik_ap...@hotmail.com
> CC: tutor@python.org
>
> On 14 April 2016 at 20:38, Albert-Jan Roskam <sjeik_ap...@hotmail.com> wr
On 15 April 2016 at 09:55, Albert-Jan Roskam wrote:
>
> Heh, it's my fancy __str__ method that confused me. This is what I get when I
> run my code without __copy__ and __deepcopy__
> runfile('/home/albertjan/Downloads/attrdict_tutor.py',
>
> Date: Fri, 15 Apr 2016 16:30:16 +1000
> From: st...@pearwood.info
> To: tutor@python.org
> Subject: Re: [Tutor] question about __copy__ and __deepcopy__
>
> On Thu, Apr 14, 2016 at 07:38:31PM +, Albert-Jan Roskam wrote:
> > Hi,
> >
> > Lately I hav
On Thu, Apr 14, 2016 at 07:38:31PM +, Albert-Jan Roskam wrote:
> Hi,
>
> Lately I have been using the "mutable namedtuple" shown below a lot.
> I found it somewhere on StackOverflow or ActiveState or something. In
> its original form, it only had an __init__ method. I noticed that
>
On 14 April 2016 at 20:38, Albert-Jan Roskam wrote:
> Hi,
>
> Lately I have been using the "mutable namedtuple" shown below a lot. I found
> it somewhere on StackOverflow or ActiveState or something.
> In its original form, it only had an __init__ method.
I don't know
Hi,
Lately I have been using the "mutable namedtuple" shown below a lot. I found
it somewhere on StackOverflow or ActiveState or something.
In its original form, it only had an __init__ method. I noticed that copying
Record objects sometimes failed. So I implemented __copy__ and __deepcopy__,
Hi,
I am new to python and just downloaded it onto my computer. The window
comes up however there is no menu bar across the top that says file, edit,
format, run, options, etc. I was wondering how to get that to appear.
Thank you
___
Tutor maillist -
When you say "Window" are you referring to the Installer or Idle?
Which Operating System are you using and what version of Python did
you download? Did you run the installer that you downloaded?
___
Tutor maillist - Tutor@python.org
To unsubscribe or
Hi folks, first thanks to Peter and Alan for the comments about the
Interpreter, i really appreciate that.
The question that i have in mind is about grid layout, i have the below
code and i want to resize every widget when the user resize the main
windows.
"""
START
"""
import tkinter as tk
On 17/01/16 18:27, Ricardo Martínez wrote:
> Hi folks, first thanks to Peter and Alan for the comments about the
> Interpreter, i really appreciate that.
I don't remember giving any comments about the interpreter,
but if I did you're welcome! :-)
> The question that i have in mind is about grid
> From: eryk...@gmail.com
> Date: Thu, 14 Jan 2016 04:42:57 -0600
> Subject: Re: [Tutor] Question about the memory manager
> To: tutor@python.org
> CC: sjeik_ap...@hotmail.com
>
> On Thu, Jan 14, 2016 at 3:03 AM, Albert-Jan Roskam
> <sjeik_ap...@hotmail.com>
On Thu, Jan 14, 2016 at 3:03 AM, Albert-Jan Roskam
wrote:
>
> These two pages are quite nice. The author says the memory used by small
> objects is
> never returned to the OS, which may be problematic for long running processes.
The article by Evan Jones discusses a
D
> From: sjeik_ap...@hotmail.com
> To: tim.pet...@gmail.com
> Date: Wed, 13 Jan 2016 08:11:11 +
> Subject: Re: [Tutor] Question about the memory manager
> CC: tutor@python.org
>
> > From: tim.pet...@gmail.com
> > Date: Sun, 10 Jan 2016 10:54:10 -0600
> >
> To: tutor@python.org
> From: __pete...@web.de
> Date: Sun, 10 Jan 2016 18:29:06 +0100
> Subject: Re: [Tutor] Question about the memory manager
>
> Albert-Jan Roskam wrote:
>
> > Hi,
> >
> > I just found a neat trick to free up an emergency stash of
On 10/01/16 16:16, Steven D'Aprano wrote:
>> rainydayfund = [[] for x in xrange(16*1024)] # or however much you need
>> def handle_exception(e):
>> global rainydayfund
>> del rainydayfund
>> ... etc, etc ...
>
> I was going to write a scornful email about how useless this would be.
Me too.
>
If you read the comment that goes with the code snippet pasted in the
original email it makes far more sense as the author is talking
specifically about out of memory errors...
"You already got excellent answers, I just wanted to add one more tip
that's served me well over the years in a variety
On 11 January 2016 at 12:15, Alan Gauld wrote:
>
> But I think that it definitely is heavily OS dependent.
> It should work in most *nix environments the first time
> you call the function. But on second call I'd expect
> all bets to be off. And in most real-time OS's
On 11 January 2016 at 15:40, Peter Otten <__pete...@web.de> wrote:
>> I can't even work out how you trigger a MemoryError on Linux (apart
>> from just raising one). I've tried a few ways to make the system run
>> out of memory and it just borks the system rather than raise any error
>> - I can
Oscar Benjamin wrote:
> On 11 January 2016 at 12:15, Alan Gauld wrote:
>>
>> But I think that it definitely is heavily OS dependent.
>> It should work in most *nix environments the first time
>> you call the function. But on second call I'd expect
>> all bets to be
Hi,
I just found a neat trick to free up an emergency stash of memory in a funtion
that overrides sys.excepthook. The rationale is that all exceptions, including
MemoryErrors will be logged.
The code is below. My question: is that memory *guaranteed* to be freed right
after the 'del'
On Sun, Jan 10, 2016 at 11:53:22AM +, Albert-Jan Roskam wrote:
> Hi,
>
> I just found a neat trick to free up an emergency stash of memory in a
> funtion that overrides sys.excepthook.
> rainydayfund = [[] for x in xrange(16*1024)] # or however much you need
> def handle_exception(e):
>
[Albert-Jan Roskam ]
> I just found a neat trick to free up an emergency stash of memory in
> a funtion that overrides sys.excepthook. The rationale is that all
> exceptions, including MemoryErrors will be logged.
> The code is below. My question: is that memory
Albert-Jan Roskam wrote:
> Hi,
>
> I just found a neat trick to free up an emergency stash of memory in a
> funtion that overrides sys.excepthook. The rationale is that all
> exceptions, including MemoryErrors will be logged. The code is below. My
> question: is that memory *guaranteed* to be
On 16/11/15 15:30, CUONG LY wrote:
Hello,
I’m learning Python.
Hello, welcome.
I want to know what does the following line represent
if __name__ == ‘__main__’:
The short answer is that it tests whether the file is being
imported as a module or executed as a program.
If its being imported
Hello,
I’m learning Python.
I want to know what does the following line represent and why I see some python
codes have two of them ?
if __name__ == ‘__main__’:
Thanks in advance
Cuong
___
Tutor maillist - Tutor@python.org
To unsubscribe or
> To: tutor@python.org
> From: __pete...@web.de
> Date: Fri, 13 Nov 2015 09:26:55 +0100
> Subject: Re: [Tutor] question about descriptors
>
> Albert-Jan Roskam wrote:
>
> >> __getattr__() is only invoked as a fallback when the normal attribute
> >> lookup
On Thu, Nov 12, 2015 at 12:11:19PM +, Albert-Jan Roskam wrote:
> > __getattr__() is only invoked as a fallback when the normal attribute
> > lookup
> > fails:
>
>
> Aha.. and "normal attributes" live in self.__dict__?
Not necessarily.
Attributes can live either in "slots" or the
Albert-Jan Roskam wrote:
>> __getattr__() is only invoked as a fallback when the normal attribute
>> lookup fails:
>
>
> Aha.. and "normal attributes" live in self.__dict__?
I meant "normal (attribute lookup)" rather than "(normal attribute) lookup".
__getattr__() works the same (I think) when
> To: tutor@python.org
> From: __pete...@web.de
> Date: Wed, 11 Nov 2015 20:06:20 +0100
> Subject: Re: [Tutor] question about descriptors
>
> Albert-Jan Roskam wrote:
>
> >> From: st...@pearwood.info
>
> >> Fortunately, Python has an mechanism for s
> Date: Sun, 8 Nov 2015 01:24:58 +1100
> From: st...@pearwood.info
> To: tutor@python.org
> Subject: Re: [Tutor] question about descriptors
>
> On Sat, Nov 07, 2015 at 12:53:11PM +, Albert-Jan Roskam wrote:
>
> [...]
> > Ok, now to my question. I want to
Albert-Jan Roskam wrote:
>> class ReadColumn(object):
>> def __init__(self, index):
>> self._index = index
>> def __get__(self, obj, type=None):
>> return obj._row[self._index]
>> def __set__(self, obj, value):
>> raise AttributeError("oops")
>
> This appears
Albert-Jan Roskam wrote:
>> From: st...@pearwood.info
>> Fortunately, Python has an mechanism for solving this problem:
>> the `__getattr__` method and friends.
>>
>>
>> class ColumnView(object):
>> _data = {'a': [1, 2, 3, 4, 5, 6],
>> 'b': [1, 2, 4, 8, 16, 32],
>>
> I think the basic misunderstandings are that
>
> (1) the __get__() method has to be implemented by the descriptor class
> (2) the descriptor instances should be attributes of the class that is
> supposed to invoke __get__(). E. g.:
>
> class C(object):
>x = decriptor()
>
> c = C()
>
Albert-Jan Roskam wrote:
>
>
> p, li { white-space: pre-wrap; }
>
> Hi,
> First, before I forget, emails from hotmail/yahoo etc appear to end up in
> the spam folder these days, so apologies in advance if I do not appear to
> follow up to your replies. Ok, now to my question. I want to create
On 07/11/15 12:53, Albert-Jan Roskam wrote:
Ok, now to my question.
> I want to create a class with read-only attribute access
to the columns of a .csv file.
Can you clarify what you mean by that?
The csvreader is by definition read only.
So is it the in-memory model that you want
On Sat, Nov 07, 2015 at 12:53:11PM +, Albert-Jan Roskam wrote:
[...]
> Ok, now to my question. I want to create a class with read-only
> attribute access to the columns of a .csv file. E.g. when a file has a
> column named 'a', that column should be returned as list by using
> instance.a.
On 10/09/15 18:00, Sarika Shrivastava wrote:
I wanted to ready data from excel file which in german Language and
onovert to English language ??
Those are two completely separate questions.
To read Excel there are several options. The simplest
is if you can convert the file to csv and use
Hello pythonistats,
I wanted to ready data from excel file which in german Language and
onovert to English language ??
--
Thanks
Sarika Shrivastava | Software Developer Trainee
www.zeomega.com
___
Tutor maillist - Tutor@python.org
To unsubscribe
In a message of Mon, 03 Aug 2015 10:38:40 +0100, matej taferner writes:
Or maybe should I go with the tkinter?
You have to decide whether what you want is a Stand Alone GUI Application
(in which case tkinter could be a fine idea) or a web app. It sounds
to me as if you want your customers to
Dear Python tutor list ...
I'm currently learning Python through an online course but after learning
the basics of the language I need to apply what I learned on a real project
and start practicing it. How can I do that ?
Thanks,
Lulwa Bin Shuker
___
On 04/08/15 05:21, Lulwa Bin Shuker wrote:
I'm currently learning Python through an online course but after learning
the basics of the language I need to apply what I learned on a real project
and start practicing it. How can I do that ?
Do you have a project in mind but are not sure how to
Or maybe should I go with the tkinter?
2015-08-03 10:36 GMT+01:00 matej taferner matej.tafer...@gmail.com:
thanks for the reply. I'll definitely check the book.
The back end solution of the problem is more or less clear to me. What I
find difficult is the grasp the idea of o called front end
thanks for the reply. I'll definitely check the book.
The back end solution of the problem is more or less clear to me. What I
find difficult is the grasp the idea of o called front end dev. or better
to say what should I use to make buttons should I dig into django framework
or something else?
1 - 100 of 946 matches
Mail list logo