Author Topic: What To Do With Python  (Read 2891 times)

0 Members and 1 Guest are viewing this topic.

Offline dillond21

  • Serf
  • *
  • Posts: 30
  • Cookies: -5
    • View Profile
What To Do With Python
« on: July 19, 2012, 05:21:03 am »
Total noob question, but i am getting pretty good at programming in python but what i found was that half the time im just following tutorials, and not really doing anything. What can you do with it? What can i create through python. And what is the difference between python and java programming. What do they do??
« Last Edit: July 19, 2012, 06:06:59 pm by Factionwars »

Offline techb

  • Soy Sauce Feeler
  • Global Moderator
  • King
  • *
  • Posts: 2350
  • Cookies: 345
  • Aliens do in fact wear hats.
    • View Profile
    • github
Re: What To Do With Pyhton
« Reply #1 on: July 19, 2012, 05:43:35 am »
Python and Java are kinda one in the same, what you can do with one, you can do with the other.


The difference is Python is fully interpreted. Meaning, you write code save in .py or .pyw and the interpreter compiles and runs the code when invoked. Compile and running are done then and there all at once.


Java is kinda like compiled mixed with interpreted. Java uses a virtual machine that takes the source, compiles, then runs via the virtual machine. There are a few things that can happen, as with Android, Dalvak is used to run code.


Python is to PHP as Java is to C# (for the most part).


Python was built mainly for web stuff, but has excelled in other areas such as local app dev, and has support for a lot of GUI tool-kits suck as Tk and Qt.


Java has it's pluses too. It is Androids preferred way to dev for their devices, also with applets, dumb-phone support, and others. It is also a good language to know. Most colleges and university's offer Java over Python.


Syntax is also a big player. Python is very loosely typed, meaning you can do something like "x = "this string" without declaring x first, it just knows x is a string. Java isn't as loosely typed, meaning you have to define x before assigning anything to it. Java uses {} for code blocks and doesn't care about indention. Python uses indention for its code blocks and forces people to write cleaner code. Python is much easier to learn than Java too from syntax alone.


As for projects, this is a big topic for new people since they don't know where to go after the tutorials. The thing with this is, pick something that interest you the most. I know the first real thing I done with python was tracking infrared light with my webcam because I thought it was cool. Something that will help you further your knowledge is writing a game. A simple 2D game will work and will expose you more to OOP and using API's and all. PyGame is very popular, so try writing a platforming game or tile-based game. Art-work isn't the focus either, you don't need to animate the characters or anything.


Another good project would be to write a text editor like Notepad, but with auto-complete and code highlighting, you could use the built-in Tkinter lib too. Stackoverflow has some good suggestions as well. Just google for "Python Projects".


Here is one thread on Daniweb just for projects:
http://www.daniweb.com/software-development/python/threads/32007/projects-for-the-beginner
>>>import this
-----------------------------

Offline Axon

  • VIP
  • King
  • *
  • Posts: 2047
  • Cookies: 319
    • View Profile
Re: What To Do With Pyhton
« Reply #2 on: July 19, 2012, 10:39:00 am »
That depends on how creative you are?

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: What To Do With Pyhton
« Reply #3 on: July 19, 2012, 02:57:56 pm »
Write plugins, collaborate and develop the most awesome python project ever -- D0xBase :P
Actually python is very good for quick stuff because it's so easy. I prefer other kind of language (like Java or Delphi) for bigger projects.

Offline dillond21

  • Serf
  • *
  • Posts: 30
  • Cookies: -5
    • View Profile
Re: What To Do With Python
« Reply #4 on: July 19, 2012, 08:31:49 pm »
Thank you so much that cleared it all up! And say you wanted to program a game just to get a feel for it. How would you go about it? Online tutorials? And how much coding would be required? And do i need any other software other than Python to do it?

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: What To Do With Python
« Reply #5 on: July 19, 2012, 09:16:29 pm »
heh, you cannot make a game which is more than a MUD type of game without resources like images and/or 3D graphics. Look into DirectX and OpenGL renders.
I'm not a big fan of game development so I dunno much.

Offline Lionofgod

  • Knight
  • **
  • Posts: 164
  • Cookies: 6
    • View Profile
Re: What To Do With Python
« Reply #6 on: July 20, 2012, 04:17:03 am »
The pygame library is very popular, thenewboston on youtube has a few tutorials on using Pygae, good luck :D

Offline dillond21

  • Serf
  • *
  • Posts: 30
  • Cookies: -5
    • View Profile
Re: What To Do With Python
« Reply #7 on: July 20, 2012, 03:23:01 pm »
Thank you very much!
And who said hackers were mean people;)

Offline iTpHo3NiX

  • EZ's Pirate Captain
  • Administrator
  • Titan
  • *
  • Posts: 2920
  • Cookies: 328
    • View Profile
    • EvilZone
Re: What To Do With Python
« Reply #8 on: July 20, 2012, 08:42:23 pm »
asdf
« Last Edit: February 13, 2013, 11:54:18 am by DeepCopy »
[09:27] (+lenoch) iTpHo3NiX can even manipulate me to suck dick
[09:27] (+lenoch) oh no that's voluntary
[09:27] (+lenoch) sorry

Offline ande

  • Owner
  • Titan
  • *
  • Posts: 2664
  • Cookies: 256
    • View Profile
Re: What To Do With Python
« Reply #9 on: July 20, 2012, 11:38:28 pm »
Since it has not been mentioned and the guy mentioned game-dev:

Both Python and Java are interpreted languages. Meaning, they will not run without extra software etc. The Java and Python code cannot (normally) be compiled into executables.

The difference between interpreted languages and executable or compilable languages can be discussed back and forth. But I would say the main difference is performence and code syntax. As well as the obvious fact that you can run executables (most anyway) without any additional software.

Now to the point.. Since you mentioned game-dev, I would recommend C# with XNA or straight to C++ with DirectX. Better performance, better libraries and better code structure. (ofcourse now Python and Java lovers are gonna discuss this lol).
if($statement) { unless(!$statement) { // Very sure } }
https://evilzone.org/?hack=true

Offline dillond21

  • Serf
  • *
  • Posts: 30
  • Cookies: -5
    • View Profile
Re: What To Do With Python
« Reply #10 on: July 21, 2012, 01:30:58 am »
Thank all of you guys so much!!!