Python 2.7 Tutorial Part 1

Поделиться
HTML-код
  • Опубликовано: 12 янв 2025

Комментарии • 403

  • @derekbanas
    @derekbanas  13 лет назад

    @lbrtdy Window > Preferences > Pydev > Editor > Code Completion, and check the 'Use Code Completion?' box. If your not using windows check under the Apple logo or elsewhere for Preferences. For syntax highlighting Right-click on the file in the package explorer, go to 'Open With', and make sure you're opening it with the Python Editor, and not the regular Text Editor. Syntax highlighting is on by default

  • @derekbanas
    @derekbanas  11 лет назад +1

    I'm glad you enjoyed it. I edit the videos so that some times it may seem as if eclipse is doing the work for me. Sorry if that was confusing

  • @derekbanas
    @derekbanas  13 лет назад +1

    @MikeslyMontague Yes if that is the location of your compiler. It won't matter normally though because you'll make the program executable

  • @derekbanas
    @derekbanas  13 лет назад

    @Chamerlengo The file you need to download is eclipse-SDK-3.6.2-win32 It's called Eclipse Classic. I'm not sure what you have, but this has an installer

  • @derekbanas
    @derekbanas  14 лет назад +1

    @unwireme Glad you liked it. I created tons of tutorials on Python. If you need help just ask.
    Thanks

  • @derekbanas
    @derekbanas  11 лет назад

    You're very welcome :) To enable code completion, go to Window > Preferences > Pydev > Editor > Code Completion, and check Use Code Completion box.
    Syntax coloring should just work by default. Right-click on the file in the package explorer, go to 'Open With', and make sure you're opening it with the Python Editor, and not the regular Text Editor.

  • @ssmmtt99
    @ssmmtt99 8 лет назад +3

    Hey Derek... I just wanted to say thank you for what you do. I have experience programming in the C family of languages and was having a real hard time finding python tutorials that weren't geared toward complete programming novices and extremely tedious... huge relief when I came across your tutorials. Everything straight to the point. I've learned python so fast because of you. Seriously, thanks for taking the time to make these, from coder to fellow coder I appreciate it.

    • @derekbanas
      @derekbanas  8 лет назад

      Thank you for taking the time to write such a nice message :) I appreciate it

  • @derekbanas
    @derekbanas  12 лет назад +1

    You can do most anything with Python, or most programming languages. You can automate numerous activities. You can comb through never ending supplies of information to answer any question. You can have a computer solve most any problem while you relax :)

  • @derekbanas
    @derekbanas  11 лет назад +2

    Thank you :) I've changed a great deal since I started making these. Now I normally draw a sequence diagram with a few notes. I then write the code from the sequence diagram. I like the improvised feeling that comes from doing that. I record the screencasts with camtasia 2. I edit out all of the pauses using iMovie. I think when I made this I was still using a Mac mini

  • @derekbanas
    @derekbanas  13 лет назад

    @zoozoo4all You use eclipse to help you write your code. It helps you figure out if you have any errors. It's pretty much a text editor that points out your mistakes

  • @derekbanas
    @derekbanas  11 лет назад +1

    Make sure you save the file in the src folder. You can find it in the package explorer part of eclipse. To display package explorer click Window - Show View - Package Explorer

  • @derekbanas
    @derekbanas  12 лет назад

    Yes definitely! How do you want to compare them? Are they limited in number or do you want to compare them based off of consistency?

  • @derekbanas
    @derekbanas  12 лет назад

    You can click ALT - SHIFT to change the keyboard layout. Also if you are in Windows go to Control Panel, Keyboard Settings and remove the layouts that you don't want to use. That way they won't be able to switch. I hope that helps

  • @derekbanas
    @derekbanas  13 лет назад

    @Chlaus95 Make sure you have python installed and you're using Eclipse Classic. If you still are having problems after that send me a note

  • @derekbanas
    @derekbanas  13 лет назад

    @picorettte I just checked. If you have Windows 7 you must be logged in as an Admin to install Pydev in Eclipse. Then click Help - Install New Software. Type in Pydev and Pydev Extensions & pydev org/updates then next a bunch of times and finish

  • @derekbanas
    @derekbanas  13 лет назад

    @SpecialDude123 Eclipse is nearly identical on a PC, Mac, or Linux os. That's why I use it. Everything in this tutorial works on any os

  • @derekbanas
    @derekbanas  11 лет назад

    Make sure PyDev is selected in the upper right hand corner in Eclipse. Try to right click on the program in package explorer and then run. The Juno version of Eclipse doesn't seem to like PyDev. I still use Indigo

  • @derekbanas
    @derekbanas  11 лет назад

    You understand the syntax of the python language. I don't go into the depth that I later did with java, but you'll understand the language and will have enough knowledge that you'll be comfortable using the many great libraries available.

  • @derekbanas
    @derekbanas  13 лет назад

    @lbrtdy You're welcome. Sorry I didn't point that out in the video

  • @derekbanas
    @derekbanas  11 лет назад +2

    With plugins you can do most anything with Eclipse. It is a great piece of free software :)

  • @atib1980
    @atib1980 12 лет назад

    Hi Derek! First of all let me express my utter respect and gratitude to you for making such wonderful and detailed programming video tutorials, and making it possible for us to learn a plenty of new things. You are really great and your video tutorials are the best, in my opinion they are number 1 on the internet. These are the best easily understandable, clearly explained but also scrupulously detailed programming video tutorials that ive had the chance to stumble upon so far... Thank you!

  • @derekbanas
    @derekbanas  14 лет назад

    @carlitosfigue1 You have to have Pydev selected in the upper right hand corner. Python is a completely different language from Java. On the left side of the screen there is a panel called Pydev package explorer. Right click on that folder and click new file. If you don't have a folder click File - New - Pydev Project. if that doesn't fix it tell me. Thanks

  • @derekbanas
    @derekbanas  11 лет назад +1

    Thank you very much :) I'm happy to see you liked them.

  • @derekbanas
    @derekbanas  13 лет назад

    @picorettte It will, but actually you won't need that line of code in Eclipse. If you want to turn your python code into a stand alone program you'll need a tool like py2exe

  • @gent2910
    @gent2910 14 лет назад +1

    Great start to what looks like an awesome turorial. I love the speed at which the fundamentals are covered. Fast enough so that you get it but not to slow to get old or worn over. Looking forward to the series as the fundamentals are where it is at and going over them brings back stuff one might have forgotten about this awesome language. SWEEEEEEEET VIDEO!!!!!!!

  • @derekbanas
    @derekbanas  13 лет назад

    @Chamerlengo Did you look at my website? I'm not sure what to do. What OS are you using

  • @derekbanas
    @derekbanas  11 лет назад +2

    You're very welcome :) I really should redo this tutorial. I love Python

  • @derekbanas
    @derekbanas  12 лет назад

    I made a browser using Java. Look at Java Video Tutorial pt 39. You can't move the users mouse in a browser without using something like ActiveX. You could analyze how information is past in the header and maybe pass info for logging in. Different sites allow you to perform different actions based on how secure they are

  • @derekbanas
    @derekbanas  13 лет назад

    @picorettte Type which python into your terminal and it will return the location of python on any UNIX / LINUX / Mac system

  • @derekbanas
    @derekbanas  14 лет назад

    @carlitosfigue1 To open a file up in the editor you double click on it if has already been created. To create a new file in the editor right click on one of the folders in the Pydev Package Explorer tab and then click New and then file in the pop up. That should do it

  • @maskedicy3423
    @maskedicy3423 7 лет назад

    Hey Derek! I wanted to thank you so much for creating this tutorial. Some may think that developing a full multiplayer community based game is hard because you have to keep updates current and new features, keep the game/game server and website online 24/7, patching bugs and exploits, banning hackers, and just in general having someone teach you this stuff. Imagine all of the things I listed before, accept with teaching yourself this stuff. This tutorial really helped me and for everyone else here. Thank you...

    • @derekbanas
      @derekbanas  7 лет назад

      Thank you very much :) I'm very happy that it helped. It sounds like you have an awesome project!

  • @derekbanas
    @derekbanas  12 лет назад

    Search for Eclipse Indigo and then get the classic version. The new version of Eclipse called Juno seems to still be buggy, or at least it doesn't work with the plugins

  • @derekbanas
    @derekbanas  13 лет назад

    @Kajcha97 Check to see if jvm.cfg is located in that folder. You could start Eclipse from the command line and pass it the location of javaw.exe like this eclipse.exe -vm path to javaw.exe

  • @derekbanas
    @derekbanas  14 лет назад

    @kfl90 Drag the tab to the right side of the screen until it snaps in place. Click Install New Software under help. Then type in Pydev(org) Select the popup and your off. Hope that helps?

  • @derekbanas
    @derekbanas  13 лет назад

    @Chamerlengo Right click on a folder in the Pydev Package Explorer. It should be on the left side of the screen. Then click New and File. Does that work

  • @derekbanas
    @derekbanas  12 лет назад

    Python is definitely the best first language and a great language in general. I'm glad my tutorials are helping you learn it :)

  • @derekbanas
    @derekbanas  14 лет назад +1

    @yakoubm7 I use Eclipse Classic, but I think all of them will work for Python

  • @derekbanas
    @derekbanas  14 лет назад

    @Yeshak10 The interpreter on Macs System/Library/Frameworks/Python.framework/Versions/2.6/Python

  • @derekbanas
    @derekbanas  13 лет назад

    @skills16 Type pydev manual 101 install into a browser and then select the first thing that comes up. Then follow the directions that follow after Installing with the update site. That will fix it

  • @derekbanas
    @derekbanas  14 лет назад

    @MrFaithFlicks I use Eclipse Classic. I'm sorry if you're having trouble seeing it. I recorded in HD so if you view the tutorial in full screen it should be easier to see. I have all of the code on my site as well. Hope that helps?

  • @derekbanas
    @derekbanas  12 лет назад

    My Python 3 tutorial may be a better tutorial to start off on. I do my best to explain everything step by step in it. Feel free to ask questions

  • @derekbanas
    @derekbanas  12 лет назад

    If I get interest in that I will definitely cover it. You pretty much determine what I do. Every once in a while I have a vote for the next tutorial XML and Design Patterns won last time. Thanks for the request :)

  • @derekbanas
    @derekbanas  12 лет назад +1

    Did you install pydev, is pydev selected in the upper right hand side in Eclipse, and have you saved your code in src - default package in the package explorer in Eclipse?

  • @derekbanas
    @derekbanas  14 лет назад +1

    @themetroidsuper You can but I always found idle to be limited and stripped down to the bare essentials. I like traditional ides, but fell free to use idle in the beginning.

  • @derekbanas
    @derekbanas  14 лет назад

    @yakoubm7 Do you mean you can't find the Python interpreter? What OS are you using? Here are the common locations On windows computers C:\Program Files\Python On Macs System/Library/Frameworks/Pyth on.framework/Versions/2.6/Pyth on On Unix/Linux /usr/local/lib/python2.6/site- packages Hope that helps? Thanks

  • @paracha3
    @paracha3 12 лет назад

    love the fast pace specially for someone like me who is little rusted on python but want to refresh the key concepts quickly. Great work!

  • @derekbanas
    @derekbanas  12 лет назад

    Syntax coloring should just work by default. Right-click on the file in the package explorer, go to 'Open With', and make sure you're opening it with the Python Editor, and not the regular Text Editor.

  • @derekbanas
    @derekbanas  12 лет назад

    Variables don't exist until they are defined so that you don't have uninitialized variables. The datatypes are inferred from the assignment statement

  • @derekbanas
    @derekbanas  13 лет назад

    @ribsmcgee1 By Havok do you mean the Physics engine? I'm a little confused

  • @derekbanas
    @derekbanas  12 лет назад +1

    Good idea because Juno seems to be messed up. Your interpreter should be around /Library/Frameworks/Python . framework/Versions/2 . 7/bin/python
    You should assign that in Preferences - PyDev - Interpreter - Python

  • @derekbanas
    @derekbanas  11 лет назад

    Did you install pydev and is it selected in the upper right hand corner in eclipse

  • @derekbanas
    @derekbanas  14 лет назад

    @MrPhoneBeast You'll probably have to compile your code outside of the editor unless it has a Python plugin?

  • @derekbanas
    @derekbanas  12 лет назад

    I've used Eclipse for years and I'm used to it. I don't often change once I'm comfortable with something

  • @derekbanas
    @derekbanas  11 лет назад

    Hi John, you're very welcome :) I'm glad you are enjoying the videos. Yes python is a bit odd, but most languages lack features here or there. In regards to the missing switch statement check this out bytebaker. com/2008/11/03/switch-case-statement-in-python/

  • @derekbanas
    @derekbanas  13 лет назад

    @CrunchyCardMachinima Preferences is probably under file? Sorry my pc broke :(

  • @atib1980
    @atib1980 12 лет назад

    Thank you so much. That would be very nice. Just take your time, its not that urgent. Im sure all of us would appreciate ur effort put into that. I know that i keep bringing this up all the time, and i cant help but to keep emphasizing how extremely useful and detailed your video tutorials are. One can learn a myriad of useful stuff by watching them. Once again thank you for all these amazing video tutorials.

  • @derekbanas
    @derekbanas  11 лет назад

    Thank you :) I can only imagine what it would be like to be 10% as popular as the Khan academy. I do my best to improve

  • @MyStuff774
    @MyStuff774 12 лет назад

    I'm new to programming and I love this language, it's so easy to understand and it helps me understand how other languages work aswell.

  • @derekbanas
    @derekbanas  13 лет назад

    @PaulRabilIsGod Are you on a PC, Mac, or Linux system?

  • @derekbanas
    @derekbanas  14 лет назад

    @fifemaster100 Did you install PyDev? What does the code look like? Try copying some of my code. Everything is tested to work

  • @derekbanas
    @derekbanas  12 лет назад

    Always feel free to make requests and ask questions. I welcome them. I could definitely cover Perl. I know pretty much every language outside of the .Net world. I'll see how soon I can work on a Perl tutorial

  • @derekbanas
    @derekbanas  12 лет назад

    Preferences - General - Editors - Text Editors - Click the the Colors and Fonts link

  • @derekbanas
    @derekbanas  12 лет назад

    I use Eclipse Indigo. Maybe you have Eclipse Juno? I prefer Indigo, the old version

  • @derekbanas
    @derekbanas  11 лет назад

    What OS are you using? What errors are you seeing

  • @derekbanas
    @derekbanas  14 лет назад

    @TVkeyse I'll do my best to live up to that comment. I'll do my best to get part 2 out tonight :)'

  • @derekbanas
    @derekbanas  12 лет назад

    I made a few Django sites. They average around $50 a month for hosting. They rank in the top 100,000 of sites in the world

  • @derekbanas
    @derekbanas  14 лет назад

    This will be the biggest tutorial I've ever done. By the end you'll have the ability to: File Share, Chat, Automate Sites, Create Feeds and make GUI applications. I'll also cover Django. The goal is to create a complete solution with Python.

  • @rajeshmaddala88
    @rajeshmaddala88 10 лет назад

    finally! a decent python 2.7 tutorial series in youtube.. thanx a ton Derek :)

    • @derekbanas
      @derekbanas  10 лет назад

      Rajesh Maddala You're very welcome :) I'm glad you found it useful.

  • @derekbanas
    @derekbanas  14 лет назад

    @kfl90 Drag the tab to the right side of the screen until it snaps in place

  • @derekbanas
    @derekbanas  13 лет назад

    @HughsMeatShop Some times I have to do redundant things in a tutorial to cover all of the different options available

  • @derekbanas
    @derekbanas  12 лет назад

    I'll do that. I just want to make sure there is a little demand for the topic

  • @derekbanas
    @derekbanas  13 лет назад

    @Bmxzebra97 What happens when you click File - New File?

  • @derekbanas
    @derekbanas  14 лет назад

    @Shitcakes26 Click Install New Software under help. Then type in Pydev(org) Select the popup and your off. Hope that helps?

  • @derekbanas
    @derekbanas  12 лет назад

    Download the files
    Untar or Decompress the file
    Drop the .py and .pyc files in your lib/site-packages folder
    You can also install the module by running this command: python setup.py install from inside the Beautiful Soup folder

  • @derekbanas
    @derekbanas  12 лет назад

    I'll make one eventually. I first need to find a hosting company that charges a reasonable rate. Most average around $50 for a site that gets some traffic

  • @derekbanas
    @derekbanas  12 лет назад +1

    No problem. I'm glad to help :)

  • @derekbanas
    @derekbanas  14 лет назад

    @fifemaster100 I cover file io and user input and many other topics through out the course of this tutorial. Just type python file io on my channel and you'll see the tutorial you are looking for. I show you how to do pretty much anything with python here. Hope that helps

  • @derekbanas
    @derekbanas  13 лет назад

    @picorettte Put in the location of python on your computer. Sorry, I thought you were asking for something else

  • @ruddogster
    @ruddogster 11 лет назад

    Hello Derek, don't know if you are still actively monitoring this video series if you are must say your voice is clear and easy to understand. Now with the good out of the way.
    Is Python more suited to Unix flavor of OS read some posts on line where there are opinions Windows is not as user friendly as Unix when it comes to programing in Python. Just starting to learn Python and want to learn programming which is native to both Unix and Windows.
    Again Great Job back to your videos!

  • @derekbanas
    @derekbanas  13 лет назад

    @Mybaroqueguitar It sounds like the eclipse install went wrong somewhere? Send me the full error message and I'll see if I can figure it out

  • @derekbanas
    @derekbanas  11 лет назад

    Great I'm glad to hear that :) Learning to program takes some time. Everything worth knowing takes a bit of practice

  • @derekbanas
    @derekbanas  11 лет назад

    What type of mod? I do my best to help if I can

  • @kurt9678
    @kurt9678 14 лет назад

    Hi,
    Thanks for making these great tutorials. So far I'm up to # 12 the sqlite3 tutorial and I will probably get through the rest in the next couple of days. I've been trying to learn python for a long time and these tutorials have been very helpful. I've tried others but none are even close to as good as yours. I look forward to checking out your other tutorials once i'm done!!
    Thanks!

  • @derekbanas
    @derekbanas  13 лет назад

    @ninjatbag1 I use eclipse classic

  • @derekbanas
    @derekbanas  11 лет назад

    Thank you! I do my best to answer all questions. Sometimes one will slip by, but I hope I'm forgiven for that :) As per the best OS for programming I'd have to say UNIX, or LINUX in my opinion. That is only based on my work though. I develop shopping carts and Android apps mostly and I never use Windows servers. I also like my Mac, but it is pretty much a UNIX machine since it pulls a lot of its OS code from FreeBSD.

  • @derekbanas
    @derekbanas  13 лет назад

    @ronateau You're very welcome :)

  • @barefootartist574
    @barefootartist574 11 лет назад

    yes, I had no problem installing pydev. And I made sure that it was selected before I tried to run one of your tutorials. I used the addNumbers.py in one of your tutorials. I ran it on IDLE and it ran fine. Thanks for your time.
    Dan Williams

  • @derekbanas
    @derekbanas  12 лет назад

    I'm using Eclipse Indigo. You can still download it because Juno is still buggy

  • @derekbanas
    @derekbanas  12 лет назад

    I use Eclipse Indigo Classic. Juno is buggy so get Indigo until it is fixed

  • @derekbanas
    @derekbanas  12 лет назад

    Make sure pydev is installed properly. I know it is a pain and has grown into a bigger pain lately. To install pydev click Help - Install New Software. Type in Pydev and Pydev Extensions & pydev . org/updates then next a bunch of times and finish.

  • @derekbanas
    @derekbanas  12 лет назад

    What do you mean by rip?

  • @derekbanas
    @derekbanas  14 лет назад

    Your probably pointing to the wrong python interpreter. What operating system are you using? I know it's frustrating when these simple things don't work, but we'll get through it :)

  • @SliqRyma
    @SliqRyma 12 лет назад

    Great tutorial,short and simple to follow. I have a python exam coming up in the next few weeks and i was hoping I could send you the question via email so that maybe you can do a tutorial on it.Your help would be greatly appreciated :)

  • @derekbanas
    @derekbanas  12 лет назад

    That information seems to be pulled from the server. You can send false messages and even make calls to the database from what I'm looking at but that may not be a good idea. In other words, Drexel's security isn't very good, or they just don't care what you do with this data

  • @derekbanas
    @derekbanas  11 лет назад

    It is probably not stored in your applications folder. Search for eclipse in the finder

  • @derekbanas
    @derekbanas  11 лет назад

    Thank you :) You could use Python on the backend for a site, but I wouldn't recommend it for cost reasons.

  • @greglumley
    @greglumley 11 лет назад +6

    Great tutorial, to the point no "ums" and "aaaahs" thank you!

  • @derekbanas
    @derekbanas  12 лет назад

    This tutorial still applies except for some of the beautiful soup stuff which doesn't seem to be working for some people. That is the problem with using third party free libraries

  • @TVkeyse
    @TVkeyse 14 лет назад

    thanks alot , the way you explain , its so eas to understand , i wish other people could talk like you

  • @derekbanas
    @derekbanas  12 лет назад

    I would have said Python 2.7 in the past, because of the great libraries. Today I think 3.0 + would probably be best. It is only an opinion