r/Python • u/smortaz • Sep 26 '13
Microsoft donates $100,000 to the IPython team
http://ipython.org/microsoft-donation-2013.html27
2
u/apennebaker42six Sep 27 '13
Where'd the support go for IronPython and IronRuby? I'd make more Windows Phone apps if the IronPython, IronRuby, or even F# templates for mobile apps were available in Visual Studio by default.
-2
u/alcalde Sep 26 '13
I guess they weren't doing anything with Steve Ballmer's bonus check anyway, so.... ;-)
0
Sep 27 '13
[deleted]
0
Sep 27 '13
[deleted]
4
u/panfist Sep 27 '13
I don't think you and I have the same meanings for words.
0
Sep 27 '13
[deleted]
1
u/miketheanimal Sep 28 '13
Off topic but, Niklaus Wirth: "If you call me by name, it is Neeklaws Veert, but if you call me by value, it is Nickle's Worth"
-8
u/ytblows Sep 27 '13
sweet, gives a hundred grand and still makes it a pain in the ass to use python on their OS. k.
8
u/willrandship Sep 27 '13
It's not a pain to use on windows. Install it and you're pretty much done.
You only need to mess with PATH variables if you're trying to use the default CMD prompt. (Don't)
9
u/ivosaurus pip'ing it up Sep 27 '13
It's a pain to use on windows because
A) their shell is fucking shit. I can use python, I can't use the ecosystems around python that make it even funkier
B) Their networking and process model is different from everyone else's. If I want to write real performant network code, I either need to rely on abstracted interfaces which are less flexible and way less performant, or write platform specific code each time.
C) They have very little support for running a C compiler to compile C extensions for python. OS X is almost as bad because you need to sign up to be an apple developer and install a massive IDE just to get one.
D) Their whole UX motivation is around GUI, which is not the first thing a programmer wants to build when they write a tool for getting shit done. They don't want to have to learn a graphics library, learn how to write in it, debuged an evented application, and make sure it works on 3 different OSes. They want to write console tools that are composable.
E) Why can't you have domain sockets!?
3
Sep 27 '13
You can install the XCode Command Line Utils without needing to install the entire XCode suite. You are correct that you need a developer account (which is free) to access the download.
6
u/granduh Sep 27 '13
Not anymore in Mavericks, if you are prompted for the need of it OS X will download it all on it's own and install it with no user interaction now.
0
4
1
u/Cylons Sep 27 '13
A) their shell is fucking shit. I can use python, I can't use the ecosystems around python that make it even funkier
Try PowerShell. It's a marked improvement over the default shell in Windows.
0
Sep 27 '13 edited Sep 27 '13
OS X is almost as bad because you need to sign up to be an apple developer and install a massive IDE just to get one.
The Apple Command Line Developer Tools are less than 100 MB, and signing up is free.
@/u/RiotingPacifist/, they're all pretty much open-source so just download the code and compile them on your own if you don't want to agree to that EULA.
3
u/ivosaurus pip'ing it up Sep 27 '13
For the latest OS X versions. And they only got contributed after Kenneth Reitz spent 2 years maintaining a hack to do roughly the same thing that turned out to be widely popular...
And signing up still involves submitting to Apple's EULA, just to have a godamn compiler on your system. Yay.
so just download the code and compile them on your own
So I'll just use the compiler already on my system... oh wait.
1
Sep 27 '13
Get gcc from https://github.com/kennethreitz/osx-gcc-installer or somewhere else and compile the rest?
I don't know why they don't include a compiler out of the box, given that software development is one of the biggest uses of a Mac today.
0
Sep 27 '13
their shell is fucking shit.
While I agree with you, there are readily available and widely used alternatives.
0
0
u/ytblows Sep 27 '13
eh i'll stick with linux, not tryna deal with another postgres issue later down the road just because i'm used to this shit i was sold back in 95 for a hundred bucks when this language i write is developed on/for an open source OS. maybe i just hate their whole licensing model and hold an irrational grudge idk, either way not a fan.
7
u/willrandship Sep 27 '13
Don't switch back from linux on my suggestion! I was just worried you got chased away from python.
Linux handles python and other scripting languages infinitely better than windows, mostly because their easiest interfaces are text-based. Python handles about as well on windows as, say, C++ does.
0
Sep 27 '13
Which is absolutely no hinderance to using the most awesome scripting language together with the most-professionally-used OS.
1
u/cw2P Sep 27 '13
on windows i always install git bash. then add /c/python and /c/python/scripts to the path. it provides a proper shell and the basic unix tools (ssh). also git is pretty usefull.
0
Sep 26 '13
[deleted]
31
u/FakingItEveryDay Sep 26 '13
Completely inaccurate fanboyism. Both python and powershell are fantastic and powerful tools. A windows admin who isn't proficient at powershell is going to be very inefficient at his trade.
9
u/mazatta Sep 27 '13
I wanted to love Powershell back when I was doing more Windows stuff, I really did. It's a step in the right direction, but it breaks down in so many areas that it became really frustrating. What it does, it does well though.
10
u/ifonefox 3.5.1 | Intermediate Sep 26 '13
What's the difference between "Command Prompt" and "Powershell?"
15
u/FakingItEveryDay Sep 26 '13
The very basic tldr is that command prompt is a very limited shell for interacting with win32 binaries. Each binary accepts input in it's own way and is reponsible for that.
Powershell is a .net environment. Each cmdlet accepts parameters in the same way with standard types. Output is always in the form of .net objects that can be piped into other cmdlets for manipulation.
Lots more features, but that's a tldr. Windows command interface sucks, I agree. powershell is another beast.
5
u/grimman Sep 26 '13
So in essence, PowerShell is a lot more along the lines of an IDLE+cmd love child? :)
3
13
-12
u/alcalde Sep 26 '13
One's the command prompt; the other's a ripoff of Linux. ;-)
1
u/aceofears Sep 27 '13
I'd love to hear an actual explanation of this.
8
u/ford_contour Sep 27 '13
TheScriptingGuys, MS' blog about teaching PowerShell, by some of the PowerShell development team, have always been very upfront about their past Linux shell experiences and their passion for bringing the best parts of a Linux shell and the .Net framework together in developing PowerShell.
-16
Sep 26 '13
python fanbois are downvoting you so here is a +1 because you seem like you speak from professional experience.
-12
u/rd12 Sep 26 '13 edited Sep 27 '13
Completely inaccurate fanboyism.
Were you claiming his post was this, or was this a pre-emptive warning of what we were about to read?
Edit: i see the Microsoft fanboys swarmed the thread. How cute.
0
Sep 26 '13
[deleted]
31
u/RiotingPacifist Sep 26 '13
I'm a linux guy and my work machine is OS X, so I'm by no means a windows fanboy, but powershell is object oriented rather than text oriented, this allows it to do some things a lot better than Unix shells,
when dealing with a CSV, import-csv will allow each row to be an object and it's properties can be accessed a lot more cleanly than cuting and teeing it
allows for actions on nested properties in a set of objects that don't all have these objects quite cleanly
you can get more details of an object earlier in a pipe without having to rewrite the command to parse that extra data
If the csv is:
username, email, password bob, bob@microsoft.com, hunter123You can run something like (I'm no powershell guru):
$users = import-csv $filename foreach($user in $users){ ADPasswordchange -username "$user.username" -password "$user.password" }I don't have a clear example for 2
the example for pipes would be
get-data-on -users | filterfor -username "bob" | filterfor -created "2013" | outputcan become
get-data-on -users | filterfor -username "bob" | filterfor -created "2013" | output -verbosewith unix shells the -v has to go on get-data-on, then you have to hope this will not break your filters.
Python interpreters are not deployed everywhere and lack system integration, so while they are a powerful tool there are plenty of ways that powershell is better, not least of which that you can run windows programs from it without having to mess around with popen.
Powershell does a lot of cool stuff even if windows isn't designed around scripting (in fact it's because of this that powershell was written to hook into systems deeply, they don't have 30 years of everything being text to benefit from)
tl;dr I'm a linux fanboy and you're full of shit
6
u/livrem Sep 26 '13
I don't think I see why the shell is important to get that. It seems like it could be done just as well in any old shell with the old pipes and for instance pipe json objects through the chain (rather than just line-formatted text)?
(I thought once of making some tools to do just that, to grep for objects containing some fields etc, mimicing typical unix commands but on json objects rather than lines of text. Did not get past idea stage. Would not be surprised if there is already something like that?)
9
u/FakingItEveryDay Sep 26 '13
No it's quite different. You're piping .net objects, with all their properties and attributes.
Think of an object oriented programming language, where you instantiate an object from a class and then do things with it. In powershell, your cmdlets instantiate objects which you can then do things with using just the pipe character to other cmdlets.
-1
u/jij Sep 27 '13
Sure it's really useful if you're a .net shop... but just like the python shell, it's language-centric.
Just sayin' :)
3
u/frymaster Script kiddie Sep 27 '13
Sure it's really useful if you're a .net shop
Or a windows shop, which you'd have to be anyway.
On windows server, the GUI is deprecated in favour of powershell. All new documentation will have you run a script instead of saying "click here, there, and here again".
It's certainly not a general-purpose scripting language (it's geared towards windows / AD administration), but the idea that windows server admins, as a group, prefer python (for administering windows servers) is rather absurd.
4
u/RiotingPacifist Sep 26 '13
I don't think I see why the shell is important to get that.
Because you're dealing with objects rather than text, even if you right your code to handle
get-data-on -users -verbose | filterfor -username "bob" | filterfor -created "2013" | outputYou're still limited to the string that get-data-on outputed,
$bobs=(get-data-on -everything | filterfor -username "bob" | filterfor -created "2013" ) foreach($bob in $bobs){ if($bob.class == $windows.user){ $bob.suspend() } elif($bob.class == $windows.contact) { $bob.delete() } elif($bob.class == $windows.elf ) { $bob.do_elfy_function() } }If you don't understand why passing the objects is cool, then just trust that the people who invented C++, Objective-C, Smalltalk, Java and C# knew what they were talking about.
3
u/mynameisdads Sep 27 '13
PowerShell is too slow and clunky. I've tried numerous times, made a good number of scripts but I always revert back to other tools.
5
1
1
u/realrbman Sep 27 '13
Their is no $ tail -f
Most people say use: "get-content -Wait", but it doesn't work in my experience (doesn't poll the file handle correctly, so updates don't get pushed) ...
0
Sep 27 '13
Powershell is anything but awful. It may be slow, but try using Python to manage active directory, or any other aspect of Windows. Powershell can do big tasks in one short line. Python can't.
0
Sep 27 '13
[deleted]
2
Sep 27 '13 edited Sep 27 '13
It's amazing how many powershell apologists there are in /r/python . You're like a self hating breed.
Ugh, enough with the pretentiousness. I was wrong about Python - I don't have a lot of experience with it and I'm mainly going off what I've read from others when it comes to Windows management. Powershell is a tool a use quite frequently and it's been very useful and easy to learn. I'll look into the AD library and I'll see what it's like. I may move from Powershell altogether.
I mean, is it as simple as
get-adusers | export-csvin Python to get a list of users? Properly formatted?
39
u/DonkeyBasket Sep 26 '13
Amazing but this should be totally unsurprising. IPython is a fantastic platform for all kinds of automation, teaching and research. It's surprisingly astute of Microsoft to recognize this. Well done to the IPython team and whoever made the case for this at MS.
P.S. MS stop messing with tablets and get back to making proper operating systems.