Image
 
linkedin_logo.png rss_logo.jpg
twitter_logo.png youtube_logo.jpg
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 69 guests online
EH-Net News Feeds
Latest Additions
 
Advertisement

You are here: Home arrow Forum arrow Ethical Hacking Discussions and Related Certificationsarrow Programmingarrow Python 2 or Python 3
EH-Net
May 26, 2012, 05:09:44 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Advertise on EH-Net!! - Reasonable Rates, Highly Targeted Audience.
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Python 2 or Python 3  (Read 6898 times)
0 Members and 1 Guest are viewing this topic.
Thegmandrive
Newbie
*
Offline Offline

Posts: 40


View Profile
« on: July 29, 2011, 11:17:56 AM »

I have started to learn Python 3. I am very new to python, but am familiar with VB script. So some of the Python 3 syntax is making sense to me.

However, I have been reading about Python 2, and it seems many people still use it.

So my first question is.

Should I learn Python 2 and then learn Python 3?

Or, am I ok sticking with Python 3 for now.

I want to learn Python, for Iphone programming and script writing.

Also, I heard that python is useful for PEN testing. I assume however, that most PEN testers use python 2. Since it's been around much longer.
 
Logged
chrisj
Hero Member
*****
Offline Offline

Posts: 997


View Profile
« Reply #1 on: July 29, 2011, 11:53:37 AM »

like perl 5, python 2 will be around for a while.  it'll take a while for everything to be converted over. Personally I'd go with Python 3. Only reason I mess with python 2 is because I have books on the subject.

There are scripts that will update 2 to 3. Learning 3, and then enough 2 to upgrade existing scripts might be a good choice to.
Logged

OSWP, Sec+
Thegmandrive
Newbie
*
Offline Offline

Posts: 40


View Profile
« Reply #2 on: July 29, 2011, 12:18:30 PM »

Thank you for your reply, I will stick with Python 3 then for now. I really like the syntax so far in python 3, It's very "logical"
Logged
tturner
Sr. Member
****
Offline Offline

Posts: 329


View Profile WWW
« Reply #3 on: July 29, 2011, 12:23:29 PM »

I disagree. Name me 1 significant security tool written in 3. I don't know of any but I'd be happy to be mistaken.
Logged

Certifications:
CISSP, CISA, GPEN, GWAPT, GAWN, GCIA, GSEC, OPSE, CSWAE, VCP

Next 6 months: GCIH, CSTP, STI MSISE
chrisj
Hero Member
*****
Offline Offline

Posts: 997


View Profile
« Reply #4 on: July 30, 2011, 12:09:54 AM »

tturner, I don't see how that is relevant. People write in the code they know. I'd rather make my security tools in Shell script and Perl. Smiley

If you're running other people's code than yeah, go with the interpreter that works for that code. But if you're writing fresh might as well go with the one that's maintained, and the developers are trying to get people to switch too.

From the pyhton wiki
Quote
Short version: Python 2.x is the status quo, Python 3.x is the shiny new thing.

At the time of writing (July 4, 2010), the final 2.7 release is out, with a statement of extended support for this end-of-life release. The 2.x branch will see no new major releases after that. 3.x is under active and continued development, with 3.2 already available.

Not dissing you, have respect, but I can't agree with you on this.
Logged

OSWP, Sec+
tturner
Sr. Member
****
Offline Offline

Posts: 329


View Profile WWW
« Reply #5 on: July 30, 2011, 02:16:41 AM »

It's a personal choice. For me, my desire to learn Python was not to write my own code as much as tweak the code in existing tools to suit my purpose and extend it's functionality and also to understand what is going on under the covers in the tools I'm using. So for that 2.x makes sense. By all means, use what works for you.
Logged

Certifications:
CISSP, CISA, GPEN, GWAPT, GAWN, GCIA, GSEC, OPSE, CSWAE, VCP

Next 6 months: GCIH, CSTP, STI MSISE
chrisj
Hero Member
*****
Offline Offline

Posts: 997


View Profile
« Reply #6 on: July 30, 2011, 06:39:55 PM »

tturner, all good. that's a better argument. Showing you're using existing code to learn and do more. Smiley

Wasn't trying to knock you man. Just didn't see where you were coming from.
Logged

OSWP, Sec+
ajohnson
Recruiters
Hero Member
*
Offline Offline

Posts: 650


aka dynamik


View Profile WWW
« Reply #7 on: August 02, 2011, 09:44:41 PM »

Correct me if I'm wrong, but I believe the issue is that there are still many libraries that have not been updated to be compatible with v3. It's been awhile since I really looked at this, but it seems like this is still the consensus today. That seems like a valid reason to stay with v2 if you need additional functionality.
Logged

WIP: OSCP | www.infosiege.net | @infosiege

The day you stop learning is the day you start becoming obsolete.
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.207 seconds with 23 queries.
 

gk_static-ad_feb2012.jpg
Global Knowledge: Build Security Skills to Protect & Defend

els_130x200fixed2.gif
eLearnSecurity Student Course Now Live!
5% Off with Code
ELS-EH-5

SANS Deals 4 EH-Netters
$150 OFF Any SANS Course in Any Format!
Coupon Code: EHN_Connect Including SANS Security West 2012 & SANSFIRE 2012
Recent Forum Topics

cbtnuggets_logo_125.jpg
Try CBT Nuggets Free!

Vote For EH-Net

Add to Technorati Favorites
technorati fave

 
         
Advertisement

© 2012 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.