Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Python or Delphi?


Demons Halo's Avatar
Member
0 0

Hi again guys :D I've noticed that there are many things I want to do but there are no programs out there that can help me out, so I decided to learn programming :D

I know html, Css, a little bit java and I've read a C++ book which did not catch my interest back in the days. But now I've come across a book about DELPHI which seems like a short and good language for starters (C/C++ etc seems a bit too complicated while Delphi seems short). But after a bit of googling I noticed that people advice each other to use Python instead. so what do you guys think? Is Python a better choice? and is the language really as simple as it's posted in this tutorial:

http://www.sthurlow.com/python/

This is damn easy, I know all of that stuff already…

anyway… If Python will be my first language there are some question I'd like you guys to answer.

looking at the delphi book there is some kind a compiler (Borland Developer Studio 2006) that is being used to make the source code executable. what kind of compiler programs are there for python and how good are they?

and one more thing… when you convert the python code into an executable file, how do you decide the way the window is going to look? do you do that with the compiler or do you just run python programs in MS-DOS environment? (yeah.. I'm using windows :P shame right? xD)

Thnx in advance

//D.H.


spyware's Avatar
Banned
0 0

Python. Read Richohealey's profile (he wrote some articles).

Learning Delphi is fucking awesome, do it in summer vacation when you have a month or two of spare time. Be sure to investigate some C when you feel confident in Python, though.

Respect the roots.

Edit: Formatting.


korg's Avatar
Admin from hell
0 0

Python is the better choice to answer your questions look here: http://www.python.org/. Oh theres nothing wrong with using windows. Use what your comfortable with.


ghost's Avatar
0 0

Python is better, Delphi is just an Object Oriented extension of Pascal :o

Demons Halo wrote: [..] so I decided to learn programming :D

I know html, Css [..]

HTML and CSS are not really programming languages.


ghost's Avatar
0 0

Coming from a computer related field. I know that most company's would have more use using python than Delphi


ghost's Avatar
0 0

Python, any day of the week. I would recommend this book for starting out:

Programming in Python 3 - Mark Summerfield

Teaches right from the start, with all the awesome new features of python 3. I agree with spy, when you have python down have a look into C, keep it roots :D


Demons Halo's Avatar
Member
0 0

Thnx for all the answers guys. I've already started with tutorials and all I can say is AWESOME! This language is so easy to learn & use. no need for unnessesary syntax stuff, just write and execute the code… 15 lines creates a calculator. Just the way I like it.

(L)Python :D:D

btw… I've installed the Python pack and I'm learning about for loops atm.

All I need to know is after me writing my own program code, how can I get the code converted to an exectable .exe file for windows? what program should I use to get that done?

btw… Thnx for the book recommendation jjbutler88, I will certainly read it :D

//D.H.


ghost's Avatar
0 0

Demons Halo wrote: All I need to know is after me writing my own program code, how can I get the code converted to an exectable .exe file for windows? what program should I use to get that done?

http://www.py2exe.org/


Demons Halo's Avatar
Member
0 0

Rapt0r wrote: [quote]Demons Halo wrote: All I need to know is after me writing my own program code, how can I get the code converted to an exectable .exe file for windows? what program should I use to get that done?

http://www.py2exe.org/[/quote]

This file is currently unavailable. Click here to view this projects available releases.

jesus christ. Not even a single site on the net has another link to this tiny program… sourceforge seems to have some problems atm :(


ghost's Avatar
0 0

Demons Halo wrote: This file is currently unavailable. Click here to view this projects available releases.

jesus christ. Not even a single site on the net has another link to this tiny program… sourceforge seems to have some problems atm :(

Really? Seems to be working fine for me when I tried downloading it from Sourceforge.


ynori7's Avatar
Future Emperor of Earth
0 0

Demons Halo wrote: This file is currently unavailable. Click here to view this projects available releases.

jesus christ. Not even a single site on the net has another link to this tiny program… sourceforge seems to have some problems atm :( You sure you're doing it right? http://sourceforge.net/project/showfiles.php?group_id=15583 I just checked, and it's fine.


Demons Halo's Avatar
Member
0 0

Edit:

Thanks a lot guys :D this is the best site ever =D I've got everything running now :D I just hope I can learn this language fast enough (6)

//D.H.


korg's Avatar
Admin from hell
0 0

Jesus Christ $%#^# Well the link worked fine for me too.


Demons Halo's Avatar
Member
0 0

well, now that I've learned the basics of how to program in Python, I was thinking about creating my first program, so I might need some help :P Now just for the record… I don't want anyone of you to spoon feed me the answer, I want to do it by myself so I can learn from it, but it would be nice to have some ideas/feedback on my progress. here is the project I was thinking of:

Stage 1: When you download a song there is often characters like (_ - .), I was thinking of writing a program that takes in a file and rename it, removing all those characters and replacing them with space bars.

**Stage 2:**Change the first character of every word in the filename from a small letter to a capital letter.

Stage 3: The program should search though my hard drive/certain folder (E:\music\*) for a duplicate of this file. It should look like this:

If file exist in folder: 
[tab]print 'file already exist in that folder'  
else:
[tab]copy file to that folder

Stage 4: Maybe making the program automatically search for duplicates inside the hard drive? but this seems hard to do as a first project :P so I 'll put this one on hold for the moment.

So this is my idea. All I need is maybe for someone experienced in here to write some kind a mind-map or something like the "code" I did above. NO CODES should be evolved, just describe how you would have done it, and maybe what operators you would have used :)

Thnx for all the help so far… Cheers

//D.H.


spyware's Avatar
Banned
0 0
  1. RegEx, search 'n replace.
  2. See one.
  3. Hm. You could fingerprint files, or read the metadata, either way, your choice. Metadata comparisons would be much, much better, as you would have some flexibility when comparing two files. Oh, again, RegEx.
  4. Needs indexing system/sorting algo. (QuickSort).

Have fun.


ynori7's Avatar
Future Emperor of Earth
0 0

Look up the os module.

I've written a few programs like that in python, so if you need help feel free to pm me.


richohealey's Avatar
Python Ninja
0 0

Python :D:ninja: