Language:

en_US

switch to room list switch to menu My folders
Go to page: 1 2 3 4 5 [6] 7 8 9 10 ... Last
[#] Tue Sep 02 2014 03:43:35 UTC from ax25

[Reply] [ReplyQuoted] [Headers] [Print]

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.



[#] Tue Sep 09 2014 15:21:54 UTC from fleeb

[Reply] [ReplyQuoted] [Headers] [Print]


Milestone... first time I ever ready anything helpful on Expert Sexchange.

[#] Tue Sep 09 2014 15:40:15 UTC from fleeb

[Reply] [ReplyQuoted] [Headers] [Print]


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

[#] Tue Sep 09 2014 18:32:50 UTC from IGnatius T Foobar

[Reply] [ReplyQuoted] [Headers] [Print]

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.

 



[#] Tue Sep 09 2014 18:57:04 UTC from fleeb

[Reply] [ReplyQuoted] [Headers] [Print]


I find Python in use within Windows quite heavily as well.

[#] Wed Sep 10 2014 05:20:49 UTC from ax25

[Reply] [ReplyQuoted] [Headers] [Print]

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.



[#] Wed Sep 10 2014 05:36:27 UTC from ax25

[Reply] [ReplyQuoted] [Headers] [Print]

 

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 11:32:45 UTC from dothebart

[Reply] [ReplyQuoted] [Headers] [Print]

 

Wed Sep 10 2014 01:20:49 EDT from ax25 @ Uncensored

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.



I guess if you run the python in the see-carpet interpreter, you can simply call that stuff; its called ironpython, right?



[#] Wed Sep 10 2014 12:22:36 UTC from fleeb

[Reply] [ReplyQuoted] [Headers] [Print]


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.

[#] Thu Sep 11 2014 02:24:14 UTC from ax25

[Reply] [ReplyQuoted] [Headers] [Print]

Wed Sep 10 2014 07:32:45 AM EDT from dothebart @ Uncensored
I 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.



[#] Thu Sep 11 2014 02:37:31 UTC from ax25

[Reply] [ReplyQuoted] [Headers] [Print]

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.



[#] Thu Sep 11 2014 12:20:45 UTC from fleeb

[Reply] [ReplyQuoted] [Headers] [Print]


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.

[#] Fri Sep 12 2014 13:17:16 UTC from Sig

[Reply] [ReplyQuoted] [Headers] [Print]

There's a vague work-related connection for Python; it turns out that some of our newer tools (which most of us don't have and haven't used yet) are using Python for the queries, so at least a base level of understanding is pretty helpful. We don't have any programmers; sadly, I think my almost-done-with-codecademy-stream is the closest qualification.

[#] Mon Sep 15 2014 04:41:17 UTC from ax25

[Reply] [ReplyQuoted] [Headers] [Print]

Sig, if you have programmed in most any other language before, Python should be a breeze.  Much of what you learned should carry over.



[#] Mon Sep 15 2014 13:54:51 UTC from fleeb

[Reply] [ReplyQuoted] [Headers] [Print]


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.

[#] Mon Sep 15 2014 16:30:05 UTC from LoanShark

[Reply] [ReplyQuoted] [Headers] [Print]


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.

[#] Mon Sep 15 2014 16:32:14 UTC from fleeb

[Reply] [ReplyQuoted] [Headers] [Print]


Braces and parenthesis FTW!

[#] Mon Sep 15 2014 16:34:26 UTC from LoanShark

[Reply] [ReplyQuoted] [Headers] [Print]


(especially(parenthesis))

[#] Tue Sep 16 2014 23:38:44 UTC from LoanShark

[Reply] [ReplyQuoted] [Headers] [Print]


Why, oh why must IntelliJ's rebase/merge window be MODAL?!?

Batshit insane.

Go to page: 1 2 3 4 5 [6] 7 8 9 10 ... Last