[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Python indentation (3 spaces)

On Mon, Oct 8, 2018 at 8:27 AM Gene Heskett <gheskett at shentel.net> wrote:
> On Sunday 07 October 2018 14:30:04 Chris Angelico wrote:
> > On Mon, Oct 8, 2018 at 5:20 AM Gene Heskett <gheskett at shentel.net>
> wrote:
> > > This poster is 200% correct. Somewhere, someplace, there should be
> > > easily found rule that dictates where one can use a tab, and where
> > > spaces only are allowed.
> >
> > Ask the people who maintain makefiles whether that's a good thing or
> > not. HINT: Many will say no.
> >
> > > > > That
> > > > > said, there is an easy fix for tab misuse: in Visual Studio
> > > > > Code, you can replace all Tabs with Spaces by highlighting the
> > > > > entire code block, hitting Tab once and Shift-Tab after.
> > >
> > > But that automatically assumes one is running in a windows
> > > environment. I don't allow it on the premises if I own the machine.
> > > Are there good, alternatives that run on linux?
> >
> > VSCode runs on Linux. Also, there are easy ways to do the same sort of
> > thing in many editors that I've used.
> >
> > > > IDLE does that also.
> > >
> > > And idle for python-2.7 runs on linux.
> >
> > (Not sure why you specifically say 2.7, as IDLE for any version of
> > Python runs on Linux, far as I know.)
> >
> 3.5+ has not, and never will arrive on wheezy. We've a stretch based lcnc
> installer now, but I've got stretch on 2 machines now, and I'm not
> impressed. Making networking actually work makes work a 4 letter word.

Wheezy is no longer supported by Debian. It's not even oldstable any
more. But if you still have old releases sitting around, you have two
good options:

1) Use IDLE from CPython 3.2 by installing package idle3
2) Compile CPython 3.5+ from source

But if you have issues with networking on Stretch, just uninstall
Network Manager and try again. I've been using Stretch since before it
was stable, and have not a whit of trouble. All my family use either
Debian or Ubuntu (including the not-so-technically-literate ones), and
those on Debian are mostly on Stretch. That includes laptops that
connect to various different wifi networks, the routers/gateways that
drive the networks themselves, everyone's desktop computers... the

Also, that *still* has nothing to do with the matter at hand. There's
no problems running some version of IDLE on any release of Debian that
I've ever used.

> > I don't understand what any of this has to do with anything. Do you
> > suspect that your code is fraught with indentation bugs?
> Not sure where the problem is Chris, but A: its not my code, and B: a
> potentially very useful machine vision utility to a cnc machinist
> actually works like the teats on a boar hog. Useless if it cannot be
> actually used on a daily basis. I've tried to make it work with pyvcp,
> and with gladevcp. Essentially the same errors (none reported) and
> behavior on both gui interfaces. With 3 different cameras. That, in 3
> versions of it, is the main reason I've been mostly lurking on this list
> for several years.

Okay, but I'm trying to understand why you're referencing this in this
thread about indentation. That would imply that you at least have
reason to suspect that the problem is indentation.