Python Forum
Can't edit code after I've pressed enter.
Thread Rating:
  • 2 Vote(s) - 2.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't edit code after I've pressed enter.
#1
This is a general problem I've been having trying to learn Python using the documents that come with it. And I should note, I'm only starting to learn code. All I've learned so far in college is HTML and some Visual Basic code. I haven't even gotten the opportunity to work with C++ yet. Though I did dabble a bit in it in a class that essentially had you dabling in various programming languages. I think all I learned was how to use an 'if' command.

Anyway, if a I type in a code wrong, it gives me an error message, and completely screws up the program I was trying to write (a very common thing I do is forget to put in a ':' ). I'm certain everyone is aware that the program does that, but to me it just looks ludicrously impractical. You can't go back and edit lines after you've pressed enter, meaning that if you made a mistake, you have to start all over, or at least go back to your last save. Why does the program even work like this? It just makes writing code even more of a head ache than it needs to be. And I've seen videos on youtube of people editing their lines of code. I don't get why I can't. And even if you do make a mistake, if you decide to change something later on, well you just have to re-write the entire program from scratch, purely because you can't change a command line you typed earlier. And looking at youtube videos, they tend to jump around their code all the time.

I can't find any information in the documents or online as to why I can't do this.

And I know this forum apparently requires you to enter in a code you're having a problem with. But this doesn't have anything to do with a specific line of code. I'm struggling with the IDE itself!

I also don't get why there's two IDEs in the folder that seem to do the exact same thing. Yeah, the one with the white background has drop-down menus, but none of them seem to do anything. Most just give me an error ding when I click on them.

Oh, and I don't appreciate the fact that you can supposedly learn Python even if you don't know a thing about code yet, but the documents keep comparing the language to C++! I don't know any of these C++ commands its referencing, besides the if command. I'm sitting here having to fool around with command lines while meditating all day on what they do just to figure out what each does. Right now I'm still struggling to figure out what break and continue actually do. Or why the example suddenly uses the else command with a for command, even though the section on the for command made no mention of the else command and gives me no hint as to what it actually does with a for command.

I thought this was going to be easy to me. HTML was stupid simple to me. And I have a natural gift at learning languages, and supposedly the part of your brain that processes language also helps programmers interpret code. So I figured that this would come naturally to me. But its not. With HTML, I felt like I was discribing to the computer what I wanted my webpages to look like. With python, I just feel like I'm trying to set up a domino effect.

Yeah, I'm having problems. But for now, I just want to know how to use these IDE programs correctly. I don't even see how you could write a serious program with these things. Its a struggle just to make something that requires 4 or 5 lines.
Reply
#2
I found a youtube video (decided to change my search) that gave me the answer. I was typing everything in the 'shell'. I didn't know that if I clicked on 'new file' that it would open up a proper editor. I assumed that doing that would just open up another page like what you start with, like how office programs work. Oh well. At least now I can make programs without having to re-type the code over and over until I stopped making typos.
Reply
#3
It sounds like you've been using the repl for everything so far: https://docs.python.org/3/tutorial/inter...ctive-mode
That's not an ide, and it isn't designed for anything more than a small handful of lines at a time.

Quote: Oh, and I don't appreciate the fact that you can supposedly learn Python even if you don't know a thing about code yet, but the documents keep comparing the language to C++! I don't know any of these C++ commands its referencing
The neat thing about humans, is that the easiest way to understand something, is to compare it to something you already know.  Sometimes, that makes things more difficult than they need to be, though.  Most people who know enough about a programming language to write about how to use that language, also know other languages, so they naturally think of each of those languages in terms of each other.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting button pressed number Moris526 4 2,374 Dec-14-2020, 01:41 AM
Last Post: Moris526
  How many times was the button pressed in pyglet rama27 0 1,889 Oct-10-2020, 10:26 AM
Last Post: rama27
  run different functions each time the same button is pressed? User3000 6 3,247 Jul-31-2020, 11:11 PM
Last Post: User3000
  Terminate a process when hotkey is pressed 66Gramms 0 2,210 Dec-24-2019, 06:41 PM
Last Post: 66Gramms
  Advance program when certain keys are pressed? Chrislw324 2 2,305 May-19-2019, 07:13 PM
Last Post: woooee
  Count to movement according to the time pressed button noartist 1 2,478 Feb-27-2019, 01:33 PM
Last Post: noartist
  What key pressed? ian 2 4,917 Jul-29-2018, 02:30 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020