Leap 42.2 Python 3 IDLE

Hey guys,

New at python and Linux and looking for an IDLE that supports python 3.6 for leap 42.2 Any suggestions?

Thanks!

In opensuse.org.help.programming-scripting, you wrote:
> New at python and Linux and looking for an IDLE that supports python 3.6
> for leap 42.2 Any suggestions?

I don’t understand. If you’re new to Python and GNU/Linux, I don’t see why you want version 3.6. What’s wrong with
Python 3.4.x, which is the current version in Leap 42.2? If you’re new to GNU/Linux and Python, it really won’t much
difference. The difference between Python 2 and Python 3 I’d agree however is much more important issue because there
are fundamental differences including in syntax.

I suspect you can install Leap’s python3-idle package and configure IDLE to look to invoke different Python 3.x
versions, but for a newcomer this would probably be unnecessary. Personally I would go one step further and say that
it’s a bad idea to learn Python using any IDE (including IDLE) since a text-editor+shell combination is much better
way to learn (because nothing is hidden from you). However I appreciate that plenty of other people do not share my
view…

The latest Python (including python3-idle) is available from the [noparse]devel:languages:python:Factory[/noparse] repo, here’s the link for 42.2:
http://download.opensuse.org/repositories/devel:/languages:/python:/Factory/openSUSE_Leap_42.2/

But you probably need to update the whole python3 installation, and I have no idea whether it would cause problems.

If you want to use it, I’d recommend to do a full switch as described here:
https://en.opensuse.org/SDB:Vendor_change_update#Full_repository_Vendor_change

Though I suppose just adding the repo and installing python3-idle from there would also work.

OTOH, if you don’t have any specific reason to use the latest python3 version, I would just stick to the one included in the distribution (3.4.5 in Leap 42.2). python3-idle is included as well.

That is a good point you make there with the shell-word editor to learn python.

I am actually just looking for an environment to help me debug.

In opensuse.org.help.programming-scripting, you wrote:
> That is a good point you make there with the shell-word editor to learn
> python.

OK - please specify whether you need Python 3.6.X (and why) or if you’re happy to stick with Python 3.4.5.

> I am actually just looking for an environment to help me debug.

Debugging and learning are very different things. You have three options:

  1. Use an IDE (they’re all pretty similar e.g. IDLE, Wing, Spyder, etc…)
  2. Use a text editor that offers language extensions e.g. emacs (which has a steep learning curve).
  3. Use a basic editor (I use Vim) and debug with pdb/ipdb.

My approach is option 3., but I realise this isn’t for everyone.

From what you guys have said I can stick with 3.4.5. My main concern was the syntax variation between a version and another and it has been made clear that the “big jump” is between 2.7 and 3

I am new using python but not coding per se. I have used C and ASM mainly to program microcontrollers and one of the things I like to visualize is allocation and size of variables instruction by instruction.
It might be an old habit from dealing with PIC assembly but is one of the things that helps find flaws in the code.

I am not familiar with pdb/ipdb but if it opens a tab where I can see the evolution of, lets say an array, step by step that might be what I am looking for.

Also,

I installed it with YAST but I am not able to run it. =/

Thanks a lot guys!

On 2017-02-03, Reynaldo Lopez <Reynaldo_Lopez@no-mx.forums.microfocus.com> wrote:
> From what you guys have said I can stick with 3.4.5. My main concern was
> the syntax variation between a version and another and it has been made
> clear that the “big jump” is between 2.7 and 3

Python 2 and Python 3 are very different in mostly mutally incompatible. Changes from Python 3.3.x have been very subtle
and almost undetectable to Python newcomers.

> I am new using python but not coding per se. I have used C and ASM
> mainly to program microcontrollers and one of the things I like to
> visualize is allocation and size of variables instruction by
> instruction.

Capital. Then you’ll should be be familiar with gdb. The pdb/ipdb are debuggers of a very similar vein.

> It might be an old habit from dealing with PIC assembly but is one of
> the things that helps find flaws in the code.

Don’t expect machine-instruction level from Python programs without compiling. It shouldn’t be necessary for debugging
Python code.

> I am not familiar with pdb/ipdb but if it opens a tab where I can see
> the evolution of, lets say an array, step by step that might be what I
> am looking for.

Sorry, I don’t know what you mean by a `tab’. If you mean a new kind of GUI window then I gdb/pdb/ipdb is not for you.
If you want a GUI-debugger, then you want an IDE (I’m not sure Xemacs has an equivalent but someone else here might be
able to help you).

wolfi323 Wrote:

OTOH, if you don’t have any specific reason to use the latest python3
version, I would just stick to the one included in the distribution
(3.4.5 in Leap 42.2). python3-idle is included as well.

I installed it with YAST but I am not able to run it. =/

To help you with that problem, we need more detail about why you are `not able to run it.’

Exactly.

I have to admit that I never used IDLE.
But there’s another one that’s also included in openSUSE: eric

Package name is eric5. The latest eric6 would be available too, but you’d need to add some repo, 5 should be good enough for you though.

Just to close this thread,

Thanks wolfi323 and flymail.

I realized the best way - and the way I proceeded - to start was as flymail suggested using:

  • Word editor - KWrite
  • Executing script though Konsole

For those starting as I am - I found Kwrite in script mode: python, very useful. It even indent instructions within a function. This is something the IDLE installed with Python 3.6 on Windows does not do.

Thanks again!