What I find fun is poking around with C libraries with Python and not have to write much code to use a library in C:
https://docs.python.org/2/library/ctypes.html
If you use Windows, Pywin32 is handy:
http://sourceforge.net/projects/pywin32/
You can do quite a bit on Windows with that. If you need some quick starter examples (or better wrapper code), give Tim Goldens site a look:
http://timgolden.me.uk/python/
Especially this bit:
http://timgolden.me.uk/python/win32_how_do_i.html
If you work in Linux / OSX or Android, things don't need as much explanation :-)
Have fun with it. Post what you find that is fun. I have not tried the notebook stuff, but I guess I should.
Oh, yeah, for something useful if you're just getting into network programming, and you're wondering why you're getting such peculiar results:
http://blog.netherlabs.nl/articles/2009/01/18/the-ultimate-so_linger-page-or-w hy-is-my-tcp-not-reliable
Python definitely pulled way ahead of Perl in the space of scripting languages, at least in terms of those used on open systems.
A number of years ago, there was a community-wide debate about what language should be the preferred "managed code" environment for Linux. Java was king at the time (and in most of the places where it matters, still is), but a group led by a Microsoft employee named Miguel de Icaza kept clamoring about how Java was "too proprietary" (even though it's GPL) and said that .NET should be used instead. Meanwhile, there were people in the background pointing out that Python is already there and is already doing the job. These people quietly won the debate.
Python is making in-roads in to automation / deployment of Windows VM's or configs as well these days:
http://docs.ansible.com/intro_windows.html
Although, they still have some evil Powershell bits to deal with, I would guess they could replace them if needed with some wrapper code in Python.
Tue Sep 09 2014 11:40:15 AM EDT from fleeb @ Uncensored
Oh, yeah, for something useful if you're just getting into network programming, and you're wondering why you're getting such peculiar results:
http://blog.netherlabs.nl/articles/2009/01/18/the-ultimate-so_linger-page-or-w hy-is-my-tcp-not-reliable
Heh, loved the reply:
"wow, you just discovered why TCP is not on top of the IP network stack... gratz! :)"
Hope that does not deter that dude and his blog as it is the way we learn (by failure and not understanding everything in one quick glance). Failing and keeping track of failures is science. Keeping track of failures that lead us to an alternative discovery is the needle in the hey stack that we hope for.
Wed Sep 10 2014 01:20:49 EDT from ax25 @ UncensoredPython is making in-roads in to automation / deployment of Windows VM's or configs as well these days:
http://docs.ansible.com/intro_windows.html
Although, they still have some evil Powershell bits to deal with, I would guess they could replace them if needed with some wrapper code in Python.
I guess if you run the python in the see-carpet interpreter, you can simply call that stuff; its called ironpython, right?
ax25:
Well, honestly, that's kind of a dick-ish comment that fellow made.
Esp. in posix oses, one would approach working with a network socket like one would approach working with a file handle. And operations that flush output to a file handle would naturally be expected to flush output out a network socket.
But, it doesn't work like that, because of that one little detail, heh.
Still, I saw that same mistake several times in the last couple of weeks, not only from students learning how to program with sockets, but with employees we have that ought to know better.
Wed Sep 10 2014 07:32:45 AM EDT from dothebart @ UncensoredI guess if you run the python in the see-carpet interpreter, you can simply call that stuff; its called ironpython, right?
I should give ironpython a shot. Never did delve in to it. I mostly stuck to making one off .exe's with bundled interpreter using the pywin32 libraries to do the heavy lifting for me.
Fleeb, I hit that same issue on my first outing as well. It was also complicated by being AX.25 socket programming with its need to have CR / CRLF confusion and baggage.
I think it's a rite of passage. I ran into it when I first got into socket programming, too.
People learn through failure. This is one of those examples of failure where you learn, heh.
Sig, if you have programmed in most any other language before, Python should be a breeze. Much of what you learned should carry over.
Yeah, that ease-of-learning makes Python a strong language. I think other scripting languages fail compared to Python, feature-for-feature, although some folks feel its whitespace requirements add pedantry to the language.
The whitespace thing makes Python a little less maintainable, a little harder to refactor and move code around.
That code block was probably properly indented when it was first written, but after your move, with no other syntactic cues to catch that you didn't format it properly... meh.