Re: Question(s)

2023-10-26 Thread Thomas Passin via Python-list

On 10/26/2023 10:52 PM, avi.e.gr...@gmail.com wrote:

Thomas,

It looks like much of our discussion and attempts at help are not going to
be that helpful to Tenor as we may be way off bass about what he wants to do
and certainly RSTUDIO and quite a few other suggestions may not be available
in his microcontroller.

As I see it, some of his objective involves sampling a sensor in real time.
I have not heard what he wants to do with the data gathered and this may be
an example of where code needs to be running fast enough to keep up. Proving
the code will work, especially if you add logging or print statements or run
it in a monitored mode so you can follow what it is doing, presents special
challenges.

Now if he ever wants to read in a .CSV file and analyze the data and make
graphs and so on, I might chime in. For now, I am dropping out.



Avi


I'm there.  It's like someone is insisting on being instructed how to 
drive a race car in a race when he's only got a learner's permit.  You 
just have to go through the experience of actually driving on streets 
and in traffic first.  There is no substitute.


TomP


-Original Message-
From: Python-list  On
Behalf Of Thomas Passin via Python-list
Sent: Thursday, October 26, 2023 6:50 PM
To: python-list@python.org
Subject: Re: Question(s)

On 10/26/2023 6:36 PM, AVI GROSS via Python-list wrote:

I am not one for IDLE worship, Tenor. But if you have been getting a

message here, it is that there are an amazing number of programs that
support your use of python during the development phase and perhaps later. I
actually often use an environment called RSTUDIO (now part of a new name of
POSIT) because it has been expanded beyond supporting R and supports Python
and a growing number of other languages or combos that combine word
processing with inserts from multiple languages.

Excellent! I didn't know about this development.

[snip]




--
https://mail.python.org/mailman/listinfo/python-list


RE: Question(s)

2023-10-26 Thread AVI GROSS via Python-list
Thomas,

It looks like much of our discussion and attempts at help are not going to
be that helpful to Tenor as we may be way off bass about what he wants to do
and certainly RSTUDIO and quite a few other suggestions may not be available
in his microcontroller.

As I see it, some of his objective involves sampling a sensor in real time.
I have not heard what he wants to do with the data gathered and this may be
an example of where code needs to be running fast enough to keep up. Proving
the code will work, especially if you add logging or print statements or run
it in a monitored mode so you can follow what it is doing, presents special
challenges.

Now if he ever wants to read in a .CSV file and analyze the data and make
graphs and so on, I might chime in. For now, I am dropping out.

Avi

-Original Message-
From: Python-list  On
Behalf Of Thomas Passin via Python-list
Sent: Thursday, October 26, 2023 6:50 PM
To: python-list@python.org
Subject: Re: Question(s)

On 10/26/2023 6:36 PM, AVI GROSS via Python-list wrote:
> I am not one for IDLE worship, Tenor. But if you have been getting a
message here, it is that there are an amazing number of programs that
support your use of python during the development phase and perhaps later. I
actually often use an environment called RSTUDIO (now part of a new name of
POSIT) because it has been expanded beyond supporting R and supports Python
and a growing number of other languages or combos that combine word
processing with inserts from multiple languages.

Excellent! I didn't know about this development.

[snip]


-- 
https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question(s)

2023-10-26 Thread Thomas Passin via Python-list

On 10/26/2023 6:36 PM, AVI GROSS via Python-list wrote:

I am not one for IDLE worship, Tenor. But if you have been getting a message 
here, it is that there are an amazing number of programs that support your use 
of python during the development phase and perhaps later. I actually often use 
an environment called RSTUDIO (now part of a new name of POSIT) because it has 
been expanded beyond supporting R and supports Python and a growing number of 
other languages or combos that combine word processing with inserts from 
multiple languages.


Excellent! I didn't know about this development.

[snip]


--
https://mail.python.org/mailman/listinfo/python-list


RE: Question(s)

2023-10-26 Thread AVI GROSS via Python-list
I am not one for IDLE worship, Tenor. But if you have been getting a message 
here, it is that there are an amazing number of programs that support your use 
of python during the development phase and perhaps later. I actually often use 
an environment called RSTUDIO (now part of a new name of POSIT) because it has 
been expanded beyond supporting R and supports Python and a growing number of 
other languages or combos that combine word processing with inserts from 
multiple languages. I have not used it for other languages like C/C++ and 
Javascript but the point is that like some others, it is not specific to Python 
but provides support for it. And, somewhat amusingly, you can write programs 
that combine parts in R and in Python that inter-operate with each other.

Since you are taking a fairly overwhelming challenge of trying to learn 
everything at once while also developing something you want to be perfect and 
with few if any flaws, it may make sense to start with more of an ASCII editor 
or something with a few features but a simple interface, and a bit later when 
some parts of your code are working and you have some experience, you can move 
the code up a few notches to tools that perform a lot more validation for you.

Please consider that resources trying to teach you the language, besides often 
showing simpler scenarios, often are not going to tell you EVERYTHING else you 
may need or that is usable let alone teach you all available modules and so on.


-Original Message-
From: Python-list  On 
Behalf Of o1bigtenor via Python-list
Sent: Thursday, October 26, 2023 8:34 AM
To: Michael Torrie 
Cc: python-list@python.org
Subject: Re: Question(s)

On Wed, Oct 25, 2023 at 10:19 AM Michael Torrie via Python-list
 wrote:
>
> On 10/25/23 05:51, o1bigtenor via Python-list wrote:
> > Looks like I have another area to investigate. (grin!)
> > Any suggestions?
>
> Seems to me you're trying to run before you have learned to walk.
>
> Slow down, go to the beginning and just learn python, write some code,
> see if it runs.  Go through the tutorial at
> https://docs.python.org/3/tutorial/index.html

Interesting - - - -  ". . . see if it runs." - - - that's the issue!
When the code is accessing sensors there isn't an easy way to
check that the code is working until one has done the all of the
physical construction. If I'm trying to control a pulsation system
using square waves with distinct needs for timing etc I hadn't
seen any way of 'stepping through the code' (phrase you use later).

>
> Your first and most basic tool is the python interpreter.  It will tell
> you when you try to run your code if you have syntax errors.  It's true
> that some errors the linters will catch won't show up as syntax errors,
> but cross the bridge when you get to it.  Once you have a basic grasp of
> Python syntax, you can begin using some of the tools Python has for
> organizing code: Functions and modules (eventually packages).
> Eventually when your logic is placed neatly into functions, you can then
> write other python programs that import those functions and feed
> different parameters to them and test that the output is what you
> expect. That is known as a test.
>
> Nothing wrong with geany as an editor.  However, you might find the
> Python Idle IDE useful (it usually installs with Python), as it lets you
> work more interactively with your code, inspecting and interacting with
> live python objects in memory.  It also integrates debugging
> functionality to let you step through your code one line at a time and
> watch variables and how they change.

I have been following this list for some time. Don't believe that I've ever
seen anything where anyone was referred to 'Idle'.  In reading other user
group threads I have heard lots about java and its ide - - - don't remember,
again, any re: an ide for python.
Even in maker threads - - - say for arduino - - its 'use this cut and
paste method
of programming' with no mention of any kind of ide when it was microPython - -
although being a subset of python it Idle may not work with it.
>
> When you encounter isses with your code (syntax or logical) that you
> can't solve, you can come to the list, show your code and the full
> output of the interpreter that shows the complete error message and back
> trace and I think you'll get a lot of helpful responses.
> --

That was the plan.

My problem is that I'm needing to move quite quickly from 'hello, world' to
something quite a bit more complex. Most of the instruction stuff I've run
into assumes that one is programming only for the joy of learning to
program where I've got things I want to do and - - - sadly - - - they're
not sorta like the run of the mill stuff.

Oh well - - - I am working on things!

Thanks for the ideas and the assistance!

Regards
-- 
https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question(s)

2023-10-26 Thread Dan Purgert via Python-list
On 2023-10-26, o1bigtenor wrote:
> On Wed, Oct 25, 2023 at 10:19 AM Michael Torrie via Python-list
> wrote:
>>
>> On 10/25/23 05:51, o1bigtenor via Python-list wrote:
>> > Looks like I have another area to investigate. (grin!)
>> > Any suggestions?
>>
>> Seems to me you're trying to run before you have learned to walk.
>>
>> Slow down, go to the beginning and just learn python, write some code,
>> see if it runs.  Go through the tutorial at
>> https://docs.python.org/3/tutorial/index.html
>
> Interesting - - - -  ". . . see if it runs." - - - that's the issue!
> When the code is accessing sensors there isn't an easy way to
> check that the code is working until one has done the all of the
> physical construction. If I'm trying to control a pulsation system
> using square waves with distinct needs for timing etc I hadn't
> seen any way of 'stepping through the code' (phrase you use later).

You use a hardware debugger then ... and if you're talking hardware,
chances are you're also not talking Python (yes, yes, I know
"CircuitPython" is a thing, or was it MicroPython?)

> [...]
> Even in maker threads - - - say for arduino - - its 'use this cut and
> paste method of programming' with no mention of any kind of ide when
> it was microPython - - although being a subset of python it Idle may
> not work with it.

Bearing in mind, of course, that "Arduino" is basically "Programming for
dummies" level of stuff usually (i.e. people just getting their feet
wet).  It's meant to be a relatively "easy" introduction for students /
hobbiests / non-programmers into the world of programming for
microcontrollers.

> [...]
> My problem is that I'm needing to move quite quickly from 'hello, world' to
> something quite a bit more complex. Most of the instruction stuff I've run
> into assumes that one is programming only for the joy of learning to
> program where I've got things I want to do and - - - sadly - - - they're
> not sorta like the run of the mill stuff.

Sounds like you've been reading instructables :)

-- 
|_|O|_|
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1  E067 6D65 70E5 4CE7 2860
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question(s)

2023-10-26 Thread Thomas Passin via Python-list

On 10/26/2023 4:25 PM, o1bigtenor via Python-list wrote:

On Thu, Oct 26, 2023 at 11:43 AM Michael Torrie via Python-list
 wrote:


On 10/26/23 06:34, o1bigtenor wrote:

Interesting - - - -  ". . . see if it runs." - - - that's the issue!
When the code is accessing sensors there isn't an easy way to
check that the code is working until one has done the all of the
physical construction. If I'm trying to control a pulsation system
using square waves with distinct needs for timing etc I hadn't
seen any way of 'stepping through the code' (phrase you use later).


Having dabbled in embedded electronics, all I can say is you will just
have to build it and try to get it working.  Failure is always an
option.  If I understand you correctly, this is for a hobby interest, so
go at it and have fun.

Stepping through code is a basic part of debugging in any language.
They all have tools for it. Google for python debugging.

"distinct needs for timing?"  Did you forget to tell us you need to use
MicroPython?  Certainly MicroPython running on a microcontroller with
help from hardware timers certainly can do it, but this mailing list is
not the place to ask about it.  Instead you'll have to visit a forum on
MicroPython or CircuitPython.  By the way you definitely can step
through MicroPython code one line at a time with a remote debugger, say
with Visual Studio Code.


Its one of the reasons to use micropython - - - it is a subset of python.
I didn't think I was asking about micropython here though. The project with
the square wave stuff has lots going on so its more likely that regular python
will be used. Part of the challenge is trying to figure out if I need to be
running a real time kernel or even a real time OS. Independent information
is quite hard to find - - - seems like most of the information is by someone
with skin in the game and then without a background its hard to figure out
if what they're saying tells enough so that I can make a good decision or
not.


[snip]

Maybe see -

pyvisa (https://pyvisa.readthedocs.io/en/latest/)
https://github.com/mick001/Instruments-Control
http://justinbois.github.io/bootcamp/2021/lessons/l40_serial.html
https://chaserhkj.gitbooks.io/ivi-book/content/

--
https://mail.python.org/mailman/listinfo/python-list


Re: Question(s)

2023-10-26 Thread o1bigtenor via Python-list
On Thu, Oct 26, 2023 at 11:47 AM Michael Torrie via Python-list
 wrote:
>
> On 10/26/23 10:41, Michael Torrie wrote:
> > By the way you definitely can step
> > through MicroPython code one line at a time with a remote debugger, say
> > with Visual Studio Code.
>
> I meant to edit that bit out.   After doing a bit more research, it
> appears remote debugging with MicroPython may not be possible or easy.
> But the MicroPython lists and forums will know more about that than I
> do.  But there are some nice IDEs for developing code in MicroPython and
> deploying it to devices.
> --
Even here - - - I now have a first step and a direction!

Thanks
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question(s)

2023-10-26 Thread o1bigtenor via Python-list
On Thu, Oct 26, 2023 at 11:43 AM Michael Torrie via Python-list
 wrote:
>
> On 10/26/23 06:34, o1bigtenor wrote:
> > Interesting - - - -  ". . . see if it runs." - - - that's the issue!
> > When the code is accessing sensors there isn't an easy way to
> > check that the code is working until one has done the all of the
> > physical construction. If I'm trying to control a pulsation system
> > using square waves with distinct needs for timing etc I hadn't
> > seen any way of 'stepping through the code' (phrase you use later).
>
> Having dabbled in embedded electronics, all I can say is you will just
> have to build it and try to get it working.  Failure is always an
> option.  If I understand you correctly, this is for a hobby interest, so
> go at it and have fun.
>
> Stepping through code is a basic part of debugging in any language.
> They all have tools for it. Google for python debugging.
>
> "distinct needs for timing?"  Did you forget to tell us you need to use
> MicroPython?  Certainly MicroPython running on a microcontroller with
> help from hardware timers certainly can do it, but this mailing list is
> not the place to ask about it.  Instead you'll have to visit a forum on
> MicroPython or CircuitPython.  By the way you definitely can step
> through MicroPython code one line at a time with a remote debugger, say
> with Visual Studio Code.

Its one of the reasons to use micropython - - - it is a subset of python.
I didn't think I was asking about micropython here though. The project with
the square wave stuff has lots going on so its more likely that regular python
will be used. Part of the challenge is trying to figure out if I need to be
running a real time kernel or even a real time OS. Independent information
is quite hard to find - - - seems like most of the information is by someone
with skin in the game and then without a background its hard to figure out
if what they're saying tells enough so that I can make a good decision or
not.
>
> > I have been following this list for some time. Don't believe that I've ever
> > seen anything where anyone was referred to 'Idle'.  In reading other user
> > group threads I have heard lots about java and its ide - - - don't remember,
> > again, any re: an ide for python.
>
> Idle has been mentioned on several occasions, but probably more on the
> python-tutor list.  I find it hard to believe that searching for Python
> IDEs really came up blank.  There are even IDEs for MicroPython and
> embedded devices.  I found a nice list with a quick search.

I didn't say that I had done any searching for a python ide. I have only
spent time looking for information on coding. There's lots on make a led
blink and other simple stuff but when you want to get at least a couple
orders more complicated - - - there is precious little and that's what I've
been looking for (and finding any stuff very hard to find!).
>
> > Even in maker threads - - - say for arduino - - its 'use this cut and
> > paste method
> > of programming' with no mention of any kind of ide when it was microPython 
> > - -
> > although being a subset of python it Idle may not work with it.
>
> You keep dropping little details that, had you included them in the
> first post, would have helped avoid a lot of answers that ultimately
> aren't going to be useful to you.  Are you working MicroPython or with
> regular Python on a PC?  That makes a big difference in where you go to
> get help and what kind of help we can provide here.
>
I didn't even really know how to ask the question(s). Likely I could have asked
better but until I got some of the answers did it make sense for me to add
further. I did not want an answer for one 'problem'. I was more looking for a
way of doing things (which is quite different).

> > Oh well - - - I am working on things!
>
> That is good.  I wish you success.
>
Thank you.

I'll likely be back with more questions (grin!).

(Lost a great mentor some almost 4 years ago now so its a lot more flail
around than if my buddy were still available.)

Thanking you for your ideas and tips!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Too Broad of an exception

2023-10-26 Thread Mats Wichmann via Python-list

On 10/26/23 03:04, Rene Kita via Python-list wrote:

Rene Kita  wrote:

rsutton  wrote:

Hi all,
I am fairly new to python (ie < 2 years).  I have a question about
pylint.  I am running on windows 10/11, python 3.10.11.

[...]

 if p.returncode >= 8:
 raise Exception(f'Invalid result: {p.returncode}')

It actually runs fine.  But pylint is not having it.  I get:

win_get_put_tb_filters.py:61:12: W0719: Raising too general exception:
Exception (broad-exception-raised)


pylint is just a linter, ignore it if the code works and you like it the
way it is.

pylint complains because you use Exception. Use e.g. RuntimeException to
silence it.



Ingrid says it's a RuntimeError, not RuntimeException.


Meanwhile, the purpose of this complaint from pylint (and notice it's a 
"warning", not an "error", so take that for what it's worth), is that 
you usually want to convey some information when you raise an exception. 
Of course, you can put that into the message you pass to the class 
instance you raise, but the type of exception is informational too. 
Raising just "Exception" is equivalent to saying "my car is broken", 
without specifying that the starter turns but won't "catch", or starts 
but the transmission won't engage, or the battery is dead, or  so 
it's *advising* (not forcing) you to be more informative.


--
https://mail.python.org/mailman/listinfo/python-list


Re: Question(s)

2023-10-26 Thread Michael Torrie via Python-list
On 10/26/23 10:41, Michael Torrie wrote:
> By the way you definitely can step
> through MicroPython code one line at a time with a remote debugger, say
> with Visual Studio Code.

I meant to edit that bit out.   After doing a bit more research, it
appears remote debugging with MicroPython may not be possible or easy.
But the MicroPython lists and forums will know more about that than I
do.  But there are some nice IDEs for developing code in MicroPython and
deploying it to devices.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question(s)

2023-10-26 Thread Michael Torrie via Python-list
On 10/26/23 06:34, o1bigtenor wrote:
> Interesting - - - -  ". . . see if it runs." - - - that's the issue!
> When the code is accessing sensors there isn't an easy way to
> check that the code is working until one has done the all of the
> physical construction. If I'm trying to control a pulsation system
> using square waves with distinct needs for timing etc I hadn't
> seen any way of 'stepping through the code' (phrase you use later).

Having dabbled in embedded electronics, all I can say is you will just
have to build it and try to get it working.  Failure is always an
option.  If I understand you correctly, this is for a hobby interest, so
go at it and have fun.

Stepping through code is a basic part of debugging in any language.
They all have tools for it. Google for python debugging.

"distinct needs for timing?"  Did you forget to tell us you need to use
MicroPython?  Certainly MicroPython running on a microcontroller with
help from hardware timers certainly can do it, but this mailing list is
not the place to ask about it.  Instead you'll have to visit a forum on
MicroPython or CircuitPython.  By the way you definitely can step
through MicroPython code one line at a time with a remote debugger, say
with Visual Studio Code.

> I have been following this list for some time. Don't believe that I've ever
> seen anything where anyone was referred to 'Idle'.  In reading other user
> group threads I have heard lots about java and its ide - - - don't remember,
> again, any re: an ide for python.

Idle has been mentioned on several occasions, but probably more on the
python-tutor list.  I find it hard to believe that searching for Python
IDEs really came up blank.  There are even IDEs for MicroPython and
embedded devices.  I found a nice list with a quick search.

> Even in maker threads - - - say for arduino - - its 'use this cut and
> paste method
> of programming' with no mention of any kind of ide when it was microPython - -
> although being a subset of python it Idle may not work with it.

You keep dropping little details that, had you included them in the
first post, would have helped avoid a lot of answers that ultimately
aren't going to be useful to you.  Are you working MicroPython or with
regular Python on a PC?  That makes a big difference in where you go to
get help and what kind of help we can provide here.

> Oh well - - - I am working on things!

That is good.  I wish you success.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Too Broad of an exception

2023-10-26 Thread Rene Kita via Python-list
Rene Kita  wrote:
> rsutton  wrote:
>> Hi all,
>> I am fairly new to python (ie < 2 years).  I have a question about 
>> pylint.  I am running on windows 10/11, python 3.10.11.
> [...]
>> if p.returncode >= 8:
>> raise Exception(f'Invalid result: {p.returncode}')
>> 
>> It actually runs fine.  But pylint is not having it.  I get:
>> 
>> win_get_put_tb_filters.py:61:12: W0719: Raising too general exception: 
>> Exception (broad-exception-raised)
> 
> pylint is just a linter, ignore it if the code works and you like it the
> way it is.
> 
> pylint complains because you use Exception. Use e.g. RuntimeException to
> silence it.
   

Ingrid says it's a RuntimeError, not RuntimeException.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question(s)

2023-10-26 Thread Thomas Passin via Python-list

On 10/26/2023 7:50 AM, o1bigtenor via Python-list wrote:

On Wed, Oct 25, 2023 at 9:10 AM Dieter Maurer  wrote:


o1bigtenor wrote at 2023-10-25 08:29 -0500:

...
It would appear that something has changed.

Went to the Eclipse download page, downloaded and verified (using sha-512).
Expanded software to # opt .
There is absolutely NO mention of anything python - - - java, c and
its permutations,
'scientific computing', and some others but nothing python.

I may be missing something due to an extreme lack of knowledge.

Please advise as to where I might find the 'python' environment in eclipse.


I entered "eclipse python download" in my favorite search engine
(=> "ecosia.org") and the second hit gave:
"https://marketplace.eclipse.org/content/pydev-python-ide-eclipse;.


Using Duckduckgo I had tried eclipse + python  which I would have
thought should have spit out something useful - - - but that just took
me to the general page and the download - - - well it did NOT offer
any python anything!

Thank you for the tip!


Eclipse is a huge complicated ecosystem.  I'd stay away from it and go 
with something smaller and simpler. (having said that, it's quite a few 
years since I gave up on Eclipse the last time).  Something like pyzo, 
for instance.

--
https://mail.python.org/mailman/listinfo/python-list


Re: Question(s)

2023-10-26 Thread o1bigtenor via Python-list
On Wed, Oct 25, 2023 at 3:56 PM Jim Schwartz  wrote:

> Does this link help?  It seems to have a Linux package here.
>
> Eclipse Packages | The Eclipse Foundation - home to a global community,
> the Eclipse IDE, Jakarta EE and over 350 open source projects...
> 
> eclipse.org 
> [image: favicon.ico] 
> 
>
> I was looking at this page and absoulutely couldn't find anything python
related.
A previous poster (between my ask and this) pointed out a better location.

Thanks for the assistance.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question(s)

2023-10-26 Thread o1bigtenor via Python-list
On Wed, Oct 25, 2023 at 11:58 AM Michael F. Stemper via Python-list
 wrote:
>
> On 25/10/2023 05.45, o1bigtenor wrote:
> > On Tue, Oct 24, 2023 at 8:35 PM Chris Angelico via Python-list
> >  wrote:
>
> >> 3. Catch the failure before you commit and push. Unit tests are great for 
> >> this.
> >
> > Where might I find such please.
>
> You don't "find" unit tests; you write them. A unit test tests
> a specific function or program.
>
> Ideally, you write each unit test *before* you write the function
> that it tests.
>
> For instance, suppose that you were writing a function to calculate
> the distance between two points. We know the following things about
> distance:
> 1. The distance from a point to itself is zero.
> 2. The distance between two distinct points is positive.
> 3. The distance from A to B is equal to the distance from B to A.
> 4. The distance from A to B plus the distance from B to C is at
> least as large as the distance from A to C.
>
> You would write unit tests that generate random points and apply
> your distance function to them, checking that each of these
> conditions is satisfied. You'd also write a few tests of hard-coded
> points,such as:
> - Distance from (0,0) to (0,y) is y
> - Distance from (0,0) to (x,0) is x
> - Distance from (0,0) to (3,4) is 5
> - Distance from (0,0) to (12,5) is 13
>
> The python ecosystem provides many tools to simplify writing and
> running unit tests. Somebody has already mentioned "unittest". I
> use this one all of the time. There are also "doctest", "nose",
> "tox", and "py.test" (none of which I've used).
>

Very useful information - - - thanks!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question(s)

2023-10-26 Thread o1bigtenor via Python-list
On Wed, Oct 25, 2023 at 10:19 AM Michael Torrie via Python-list
 wrote:
>
> On 10/25/23 05:51, o1bigtenor via Python-list wrote:
> > Looks like I have another area to investigate. (grin!)
> > Any suggestions?
>
> Seems to me you're trying to run before you have learned to walk.
>
> Slow down, go to the beginning and just learn python, write some code,
> see if it runs.  Go through the tutorial at
> https://docs.python.org/3/tutorial/index.html

Interesting - - - -  ". . . see if it runs." - - - that's the issue!
When the code is accessing sensors there isn't an easy way to
check that the code is working until one has done the all of the
physical construction. If I'm trying to control a pulsation system
using square waves with distinct needs for timing etc I hadn't
seen any way of 'stepping through the code' (phrase you use later).

>
> Your first and most basic tool is the python interpreter.  It will tell
> you when you try to run your code if you have syntax errors.  It's true
> that some errors the linters will catch won't show up as syntax errors,
> but cross the bridge when you get to it.  Once you have a basic grasp of
> Python syntax, you can begin using some of the tools Python has for
> organizing code: Functions and modules (eventually packages).
> Eventually when your logic is placed neatly into functions, you can then
> write other python programs that import those functions and feed
> different parameters to them and test that the output is what you
> expect. That is known as a test.
>
> Nothing wrong with geany as an editor.  However, you might find the
> Python Idle IDE useful (it usually installs with Python), as it lets you
> work more interactively with your code, inspecting and interacting with
> live python objects in memory.  It also integrates debugging
> functionality to let you step through your code one line at a time and
> watch variables and how they change.

I have been following this list for some time. Don't believe that I've ever
seen anything where anyone was referred to 'Idle'.  In reading other user
group threads I have heard lots about java and its ide - - - don't remember,
again, any re: an ide for python.
Even in maker threads - - - say for arduino - - its 'use this cut and
paste method
of programming' with no mention of any kind of ide when it was microPython - -
although being a subset of python it Idle may not work with it.
>
> When you encounter isses with your code (syntax or logical) that you
> can't solve, you can come to the list, show your code and the full
> output of the interpreter that shows the complete error message and back
> trace and I think you'll get a lot of helpful responses.
> --

That was the plan.

My problem is that I'm needing to move quite quickly from 'hello, world' to
something quite a bit more complex. Most of the instruction stuff I've run
into assumes that one is programming only for the joy of learning to
program where I've got things I want to do and - - - sadly - - - they're
not sorta like the run of the mill stuff.

Oh well - - - I am working on things!

Thanks for the ideas and the assistance!

Regards
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question(s)

2023-10-26 Thread o1bigtenor via Python-list
On Wed, Oct 25, 2023 at 9:10 AM Dieter Maurer  wrote:
>
> o1bigtenor wrote at 2023-10-25 08:29 -0500:
> > ...
> >It would appear that something has changed.
> >
> >Went to the Eclipse download page, downloaded and verified (using sha-512).
> >Expanded software to # opt .
> >There is absolutely NO mention of anything python - - - java, c and
> >its permutations,
> >'scientific computing', and some others but nothing python.
> >
> >I may be missing something due to an extreme lack of knowledge.
> >
> >Please advise as to where I might find the 'python' environment in eclipse.
>
> I entered "eclipse python download" in my favorite search engine
> (=> "ecosia.org") and the second hit gave:
> "https://marketplace.eclipse.org/content/pydev-python-ide-eclipse;.

Using Duckduckgo I had tried eclipse + python  which I would have
thought should have spit out something useful - - - but that just took
me to the general page and the download - - - well it did NOT offer
any python anything!

Thank you for the tip!
-- 
https://mail.python.org/mailman/listinfo/python-list