Dear experts
in learning the principles of Python I came across scope in the
control structure's section.
There I read the notion that variables createted inside a
control structute can't be seen or accessed from outside that
structure, Python would raise a Name Error.
However in for loops - al
I am working on a program to process some files created by an old
windows program that created it files with varying case with a python
program.
Using glob.glob on Windows seems to ignore the case, and find all the
matching files.
The same directory, running the same program under Mac OS X, which
On 18/05/2019 09:20, marcus lütolf wrote:
> in learning the principles of Python I came across scope in the
> control structure's section.
> There I read the notion that variables createted inside a
> control structute can't be seen or accessed from outside that
> structure, Python would raise a
On 18/05/2019 03:14, Richard Damon wrote:
> The same directory, running the same program under Mac OS X, which also
> is a case insensitive file system,
That is your mistake. Darwin, the core of the MacOS X system
is a version of BSD Unix and like all Unix OS is very much
case sensitive.
Some o
On 5/18/19 2:20 AM, marcus lütolf wrote:
> Dear experts
>
> in learning the principles of Python I came across scope in the
> control structure's section.
> There I read the notion that variables createted inside a
> control structute can't be seen or accessed from outside that
> structure, Pytho
On 5/17/19 8:14 PM, Richard Damon wrote:
> I am working on a program to process some files created by an old
> windows program that created it files with varying case with a python
> program.
>
> Using glob.glob on Windows seems to ignore the case, and find all the
> matching files.
>
> The same
Many thanks for this quick answer.
I unfortunatly misread the tutorial (edx Course CS1301xII, Computing in Python
II: Control Structures)
concerning scope insofar as a NameError arises if a variable is accessed which
was not created inside
the control structure.
Marcus.
-Ursprüngliche Nachri
On 5/18/19 6:52 AM, Alan Gauld via Tutor wrote:
> On 18/05/2019 03:14, Richard Damon wrote:
>
>> The same directory, running the same program under Mac OS X, which also
>> is a case insensitive file system,
> That is your mistake. Darwin, the core of the MacOS X system
> is a version of BSD Unix a
I am writing an Flask app following a book, where a piece of python concept I
am not getting how it works. Code is:
class Role(db.Model):
__tablename__ = 'roles'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64), unique=True)
default = db.Column(db.Boolea
On 18/05/2019 17:21, Arup Rakshit wrote:
> class Role(db.Model):
>
> def __init__(self, **kwargs):
> super(Role, self).__init__(**kwargs)
>
> Here, why super(Role, self).__init__(**kwargs) is used instead
> of super().__init__(**kwargs) ?
I suspect you are reading an older tutoria
On 18/05/2019 17:21, Arup Rakshit wrote:
I am writing an Flask app following a book, where a piece of python concept I
am not getting how it works. Code is:
class Role(db.Model):
__tablename__ = 'roles'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64),
On Sat, May 18, 2019 at 09:51:39PM +0530, Arup Rakshit wrote:
> Here, why super(Role, self).__init__(**kwargs) is used instead of
> super().__init__(**kwargs) ? What that Role and self argument is
> instructing the super() ?
The Role and self arguments are the owning class and current instance.
On Sat, May 18, 2019 at 11:52:29AM +0100, Alan Gauld via Tutor wrote:
> On 18/05/2019 03:14, Richard Damon wrote:
>
> > The same directory, running the same program under Mac OS X, which also
> > is a case insensitive file system,
>
> That is your mistake. Darwin, the core of the MacOS X system
On Sun, May 19, 2019 at 10:37:56AM +1000, Steven D'Aprano wrote:
> That's not quite right -- case sensitivity of the OS isn't important,
> case sensitivity of the *file system* is. And the standard file system
> on Mac OS, HFS+, defaults to case-preserving but case-insensitive.
>
> (There is an
> On 19-May-2019, at 4:46 AM, Mark Lawrence wrote:
>
> On 18/05/2019 17:21, Arup Rakshit wrote:
>> I am writing an Flask app following a book, where a piece of python concept
>> I am not getting how it works. Code is:
>> class Role(db.Model):
>> __tablename__ = 'roles'
>> id = db.Column
On 13/05/19 6:13 AM, Alan Gauld via Tutor wrote:
On 12/05/2019 10:15, David L Neil wrote:
Interestingly, I split these into two - my laziness for running/testing
is 'Save, Alt-Tab, Up-arrow, Enter' which would be 'ruined' by using the
cmdLN for anything else.
In a bash shell I use Ctr-R (for
On 18/05/19 4:15 AM, Alan Gauld via Tutor wrote:
On 16/05/2019 04:17, Alex Kleider wrote:
Alt-Tab and the X cut 'n paste mechanism provides
enough integration between windows.
I tried this (Ubuntu 18.4) and Alt-Tab cycles between terminal and
browser but I can't make it cycle from one termina
Stephen,
On 16/05/19 12:16 AM, Stephen P. Molnar wrote:
I am writing scripts to semi-automate some of my Quantum Chemistry
software and have encountered a problem that has me baffled. The two
scripts have the same form, the only difference being the commands. One
script works, the other bombs
On 13/05/19 10:56 AM, boB Stepp wrote:
On Sun, May 12, 2019 at 5:19 PM boB Stepp wrote:
On Sun, May 12, 2019 at 1:05 PM David L Neil
wrote:
I'm using Gnome Terminal under Fedora (Linux). This allows multiple
terminals in tabs (and thus Ctrl-Tab rapid-switching). However, it
irritates me that
19 matches
Mail list logo