This is a pain in the ass
#1
HI,

I started playin around with Python and as everyone know Functions are a efficient thing in programming and scripting.
But this is the worst but litterly the worst way to create functions and on 3 lines I had 7 errors to define a function, I do not know what
logic python has but I cannot figure it out xD.

Just some simple thing I made a log function but all I tried ended up in a error.
Code:
def Logme(message)
   print (Fore.RED + message)
   return

* Fore is from a import Wink

I also tried it without return but I saw a lot of defs doing that while there was not a value getting returned but I dont get this. THis is soo simple I irritate myself on it.


EDIT:
Just found out a : needs to be added
Code:
def Logme(message):
   print(Fore.RED + message)
   return

But I also find out python is quite dum since when a define the function on the bottom of the page it won't recgonize it. Xd
#2
You know mate, I started learning python about 3 days ago and you can really get a good basic knowledge from codeacedemy. It's 100% free, you have some basic excersises and they explain it step-by-step. They're not videos though, you just follow the instructions but it's a good base. You should try it.

Also the language itself isn't too hard, but it depends on which coding languages you already know.

Python is a pretty strong language, generators and brute-force tools are often way faster in python than in for example c/c++. That's why most hacking tools in Kali Linux are written in python.
Reply
#3
(09-03-2016, 08:13 PM)Bish0pQ Wrote: way faster in python than in for example c/c++

A good C++ code will never be slower than its Python equivalent. In fact, both C and C++ curbstomp Python in terms of speed.
Reply
#4
(09-03-2016, 09:43 PM)Soap Wrote:
(09-03-2016, 08:13 PM)Bish0pQ Wrote: way faster in python than in for example c/c++

A good C++ code will never be slower than its Python equivalent. In fact, both C and C++ curbstomp Python in terms of speed.

I wanna learn C++ dude.
Reply
#5
(09-03-2016, 09:43 PM)Soap Wrote:
(09-03-2016, 08:13 PM)Bish0pQ Wrote: way faster in python than in for example c/c++

A good C++ code will never be slower than its Python equivalent. In fact, both C and C++ curbstomp Python in terms of speed.

Well it always depends on how you code but I'm sorry, I really thought python was faster, or so I have been told. It is way faster as VB.NET though, I know that for sure. Thank you for the correction.
Reply
#6
(09-03-2016, 09:51 PM)Bish0pQ Wrote: ...

Yeah, .NET is really abysmal when it comes to performance.
Reply
#7
(09-03-2016, 09:53 PM)Soap Wrote:
(09-03-2016, 09:51 PM)Bish0pQ Wrote: ...

Yeah, .NET is really abysmal when it comes to performance.

I know, I am currently coding a tool that gets the location of proxies in vb.net but it is so damn slow. I started to learn python in the hope I can make the program run faster because it almost crashes everytime when using big lists.
Reply
#8
(09-03-2016, 09:58 PM)Bish0pQ Wrote:
(09-03-2016, 09:53 PM)Soap Wrote: Yeah, .NET is really abysmal when it comes to performance.

I know, I am currently coding a tool that gets the location of proxies in vb.net but it is so damn slow. I started to learn python in the hope I can make the program run faster because it almost crashes everytime when using big lists.

I still hate Python or that is how I always stated it but I think I need to clear up it's not the language itself but more the Markup that I do not like. The way of writing is so not relaxed and not natural for me that that is what I hate and I always have hated. The librarys and performance of Python is amazing. Also it is really easy to install on your Machine.


Anyways I will get trough with it and will probably add Python to my list that are my main things to write. 
Currently It's:
  • HTML / CSS
  • PHP
  • C#
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)