[Tutor] Help with python
Hello there: i am facing some problem with my python programming language which is already installed in My laptop lenovo, 8.1 OS. The existing language says "python 27 ". when i click on it, it turns to "python or pythonw". I can write on its dark surface, but it does not have tools like file, play, edit,...on the tool box. And i can not Copy past from it. when i down load a new 2.7.11 or 3.51 or any other version, it dawnloads only text, but what i need is, to be able to program on it, i.e to write on it and copy- paste my assignments. Could you give me some help please? Best regards Bere Sent from Samsung Mobile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Help with python
On 19/04/16 02:20, Bereke via Tutor wrote: > Hello there: > > i am facing some problem with my python programming language which is > already installed in My laptop lenovo, 8.1 OS. I'm assuming that means Windows 8.1? > The existing language says "python 27 ". when i click on it, > it turns to "python or pythonw". I don't know what you mean when you say "click on it". Where are you clicking? The desktop? A menu? Windows explorer? And where does it say python or pythonw? > I can write on its dark surface, but it does not have tools like file, play, > edit,... It sounds like you are opening the Python interpreter in a command console. It will be helpful for you to learn how to use that console. There are several tutorials on the web if you search for "Windows command line". However, for now, you probably want to use IDLE which should come with Python. (It is sometimes called Python GUI on Windows too.) You should find it under Python in your All Programs view. Alternatively you can use Windows Explorer to search for the idle.bat file. Once you find it you can create a shortcut to your desktop or your start menu. 3 > what i need is, to be able to program on it, You can program using notepad and the console that you have but IDLE will be a better experience. On my Windows 10 box IDLE lives in this folder: C:\Python34\Lib\idlelib It should be similar for Windows 8.1 -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Help with python
On 19/04/2016 10:03, Alan Gauld wrote: However, for now, you probably want to use IDLE which should come with Python. (It is sometimes called Python GUI on Windows too.) You should find it under Python in your All Programs view. In any recent version of Windows (ie Vista & later) the most common way to find a program is to press the "Start" button or the "Windows" key and just start typing its name -- ie rather than actually navigating through a cascade of menus. (I think on other systems this is called a "Finder" or "Launcher" or something). In this particular case, pressing "Start/Windows" and typing "IDLE" gives -- in my case -- several options, including 3.4 64-bit etc. Hopefully, for the OP, there will be just one. The same for the getting a command prompt up: press "Start/Windows" and type "Command". Obviously it will depend on what's installed but for me the "Command Prompt" icon is the top of the resulting search list. Hope that helps people who are not used to (recent) Windows and are trying to advise novice users. TJG ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Help with python
On 19/04/16 10:13, Tim Golden wrote: > In any recent version of Windows (ie Vista & later) the most common way > to find a program is to press the "Start" button or the "Windows" key > and just start typing its name Interesting, I've been using Windows 10 since it came out and didn't know about that trick. I also haven't noticed it any of the PC mags I've read recently. > The same for the getting a command prompt up: press "Start/Windows" and > type "Command". I usually hit Windows->R and type cmd. So that's less useful for me. But thanks for the tip. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Slack Token Invalid Syntax
Apologies for top posting I blame the tablet! Malcolm, don't make us guess, show us how you put the quotes in and the error messages (in full). Alan g. Sent from my Fonepad Malcolm Boone wrote: So you are saying the right side should be a string, how do I do that? When I put quotes around the token it creates a dozen or so new errors. Unless I'm not even putting the quotes on correctly. On Sat, Apr 16, 2016 at 5:18 PM, Alan Gauld <[1]alan.ga...@btinternet.com> wrote: On 14/04/16 01:22, Malcolm Boone wrote: > advance if I've done this wrong. Nope, for a first post its pretty good. :-) > this error: > > File "C:\Users\malco\Anaconda3\Lib\Slack-File-Delete.py", line 6 > _token = xoxp-14301025207-14298191955-14452030292-** > SyntaxError: invalid syntax > Which is quite correct, that's not a valid line of Python. I suspect the right hand side should be a string? > > _token = xoxp-14301025207-14298191955-14452030292-** > _domain = [2]oasis-vape.slack.com And I'm pretty sure the same is true of the _domain line too? -- Alan G Author of the Learn to Program web site [3]http://www.alan-g.me.uk/ [4]http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: [5]http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - [6]Tutor@python.org To unsubscribe or change subscription options: [7]https://mail.python.org/mailman/listinfo/tutor References Visible links 1. mailto:alan.ga...@btinternet.com 2. http://oasis-vape.slack.com/ 3. http://www.alan-g.me.uk/ 4. http://www.amazon.com/author/alan_gauld 5. http://www.flickr.com/photos/alangauldphotos 6. mailto:Tutor@python.org 7. https://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Slack Token Invalid Syntax
So you are saying the right side should be a string, how do I do that? When I put quotes around the token it creates a dozen or so new errors. Unless I'm not even putting the quotes on correctly. On Sat, Apr 16, 2016 at 5:18 PM, Alan Gauld wrote: > On 14/04/16 01:22, Malcolm Boone wrote: > > > advance if I've done this wrong. > > Nope, for a first post its pretty good. :-) > > > this error: > > > > File "C:\Users\malco\Anaconda3\Lib\Slack-File-Delete.py", line 6 > > _token = xoxp-14301025207-14298191955-14452030292-** > > SyntaxError: invalid syntax > > > > Which is quite correct, that's not a valid line of Python. > I suspect the right hand side should be a string? > > > > > _token = xoxp-14301025207-14298191955-14452030292-** > > _domain = oasis-vape.slack.com > > And I'm pretty sure the same is true of the _domain line too? > > > > -- > Alan G > Author of the Learn to Program web site > http://www.alan-g.me.uk/ > http://www.amazon.com/author/alan_gauld > Follow my photo-blog on Flickr at: > http://www.flickr.com/photos/alangauldphotos > > > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor > ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
[Tutor] List of tuples
I have a list like this [ ("name",2344,34, "boy"),("another",345,47,"boy", "last") ] How do u get each value from it like Output name 2344 34 ... What i did was for row in list_tuple: for row2 in row: return row But i get error too many value to unpack Please help Sent from my iPhone ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] List of tuples
On Tue, Apr 19, 2016 at 1:56 PM, isaac tetteh wrote: > I have a list like this > [ > ("name",2344,34, "boy"),("another",345,47,"boy", "last") > ] > How do u get each value from it like > Output > name > 2344 > 34 > ... > > What i did was > for row in list_tuple: > for row2 in row: > return row > > But i get error too many value to unpack Hi Issac, Can you copy and paste the exact error message and stack trace that you're seeing? Try not to paraphrase it: we need to see exactly the text is saying. In some cases, we'll even pay attention to whitespace and other insanely silly details. :P Since that's tedious for you to retype, just use copy-and-paste. Include everything that the error message says, even if it doesn't make sense to you. We'll try to help you interpret what the error is saying. Unfortunately, you paraphrased the error message above too much: I have no good guesses from what you've presented so far. Also, try to show the entire program that you ran as well. The snippet you showed us is incomplete, because we don't know how the program defines "list_tuple". Generally, you want to include enough detail when asking for help that it's really easy for the tutors here to "reproduce" your problem. That way, we can see the same problem that you see. That's important. My best guess so far, from all that you've shown us, is that a *different* part of the program is responsible for the error you're showing us. That's why we need more details: I think something else other than what you're showing us is producing that error. The reason I think so is because no part of the program you're showing us is doing tuple unpacking, at least from what I can tell. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Slack Token Invalid Syntax
On Tue, Apr 19, 2016 at 10:05 AM, Malcolm Boone wrote: > So you are saying the right side should be a string, how do I do that? See: https://docs.python.org/3/tutorial/introduction.html#strings > When I put quotes around the token it creates a dozen or so new errors. > Unless > I'm not even putting the quotes on correctly. Show us what you did here. Also show the errors you're seeing: they might actually be worthwhile. One infuriating part about programming is that, as you're debugging a broken program, the number of problems you see being reported isn't necessarily going down. The *true* number of problems might, in fact, be under-reported, due to limitations in our software tools. So if you fix one thing, and suddenly see a bunch of errors, that might actually mean that you actually did fix one of the problems, but in doing so, exposed a few other latent problems. Or maybe not: maybe the "fix" really did make things worse. :) Show the folks here what you did. We can help interpret what you're seeing. Good luck! ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] List of tuples
Okay, in the context of a function, the error you're seeing makes more sense. You need to ensure that the return value of the function is of the right type. In SingleView, the intended return value appears to be a structured response value. Given that, then any other return statements in the body of the function are suspect: return is a statement that will finish a function. If a function returns a value of a tour that it isn't supposed to, expect that to produce very strange error messages. That's essentially what you're seeing. Looking at the construction of the response at the end: > return render_template("view.html",data=data,formB=formB) > I'm wondering: perhaps you can collect the extracted column and add it as an additional value in you're template? If you have questions, please feel free to ask. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] List of tuples
Sorry for typos in response: on cell phone at the moment. ;p ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor