Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
duck monster
Dec 15, 2004

Python Webware is kind of nice for a pretty straight J2EE/Tomcat style servlet system. Nice folks too.

Also, if coding for it Think ahead, about how your doing database. This poo poo is multithreaded and therefore has gotchas.

Adbot
ADBOT LOVES YOU

duck monster
Dec 15, 2004

Triple Tech posted:

What's the Python community like? Do you guys really hate Perl? And have you ever heard of or used SQL Alchemy?

I went to one Python Users Group meeting and everyone had something nasty to say about Perl. And the presenter there was my former boss, creator of SQL Alchemy.

Don't really interact with the Python community a lot.

I guess folks who really 'think' pythonic tend to see PERL as extremely clumsy and inelegant. Sort of a huge chainsaw to pythons clean scalpel.

But most of us admit that sometimes when theres a wall, the Chainsaw will bust that hole pretty drat fast. It'll just be an ugly hole.

That and turf war nonsense.

duck monster
Dec 15, 2004

The other method is to just ask the object

code:

class ancestor:
        def method1(self):
                 print "called method1"

        def method2(self):
                 print "called method2"

class sprite1(ancestor):
        apropriatemethod = self.method1

class spite2(ancestor):
        apropriatemethod = self.method1

class sprite3(ancestor):
        apropriatemethod = self.method2


>> x = sprite1()
>> x.apropriatemethod()
called method1
>> y = sprite3()
>> y.apropriatemethod()
called method2
Note thats off the top of my head. Probably typos in there

duck monster fucked around with this message at 23:36 on Nov 12, 2007

duck monster
Dec 15, 2004

Threep posted:

Convince me to learn Python!

I somehow skipped by Python back when it was still in its youth and only recently decided that maybe I ought to give it a look.

Trouble is that I've now picked up Ruby and while it would've been easy to give up PHP or Perl in favour of Python it's a bit harder when I've already got a language I actually like and not just tolerate.

However, it seems to me that Python's maturity and much better support would be beneficial, so since this is the Python thread I'd like to hear someone with experience in both tell me why they've chosen Python.

I'm using Ruby both for Linux scripting/utilities and for web development.

I can convince you really easy. Do this tutorial;-
http://docs.python.org/tut/tut.html
It'll take you a few hours to an afternoon

At the end of it you combine that knowledge with this page;-
http://docs.python.org/modindex.html

And you are now full bottle.

Thats the convincing. If you can't program python vaguely competently in a couple of days, you probably are not a coder. Its that easy.

Its all about objects, lists, dictionaries and tuples

duck monster
Dec 15, 2004

m0nk3yz posted:

Nice, I totally missed that one. I am quite happy with what's coming down the pipe for py3k

Ah. Nice. Much more elegant than the get_foo set_foo stuff.

I'm really keen on this decorator stuff. Lots of oportunities for aspect coding type stunts.

duck monster
Dec 15, 2004

Yeah. Threading isn't really pythons strongest point. I think most people in the Python community pretty much acknowledge that.

The reason isn't so much interpreter development, its to do with module development.

Linking C libs into Python is pretty simple, but you do have to pay attention to the garbage collection. However, things get... messy... when you start threading (As they do in C). The GIL stops this messyness by putting some nice big locks in there to keep stuff sane re Garbage collection and its ilk. You certainly apreciate it when embedding python.

But it is a problem, and one that really wants some thought put into fixing.

For what its worth, I tend to use stackless python for multithreading stuff these days. That poo poo scales like crazy. I mean, insane-loving-lala crazy. Coroutines rock.

duck monster
Dec 15, 2004

Hammertime posted:

I'm googling stackless python but I'm not turning up anything that useful.

Do you have a good link or another sentence or two? Does it get around GIL?

I *really* love python, but I also *really* love parallelism at the thread level. I'm buying the django book and I want to bring python in as a language I can leverage in case RoR pisses me off too much(full time software dev).

Edit: I'm stupid, found some good links in another search, interesting stuff, downloading it now, then I'll check out the tutorials.

Home Page (with download): http://www.stackless.com/
Tutorial/walkthrough: http://members.verizon.net/olsongt/stackless/why_stackless.html

Edit2: Well, it removes much of python's threading overhead. Doesn't solve the GIL problem though, still bound to a single core. Neat idea, seems a big waste of effort though, unless I've missed something. :(

Stackless implements continuations and co-routines. Prepare for your head to explode. Basically a continuation is like a 'save point' in a game, although within the context of execution. Its sort of like saving the current state, then loving off and doing something else, so you can return later , refire execution and continue where you left off. co-routines are a species of continuation. I probably can't explain them well, so wikipedia them.

What stackless lets you do is implement 'green threads', where essentially you supply your *own* scheduler and run potentially tens of thousands of microthreads within a single thread. They scale pretty much Big-O(1) and when a thread isnt doing anything they require zero cpu time. You really can go apeshit with threads and not worry too much about the performance overhead.

A good example here would be a web server

Picture this:

code:
class testbed(servlet.servlet):
  
    def test1(self,req):
        x = 10
        self.serve("<b>Value</b> =  "+ str(x) +" "+self.simplecontinuelink('Next>'))
        x = x + 10
        self.serve("<b>Value</b> =  "+ str(x) +" "+self.simplecontinuelink('Next>'))
        x = x + 10
        self.serve("<b>Value</b> =  "+ str(x) +" "+self.simplecontinuelink('Next>'))
        return("Ah... I give up :(")
This code serves 4 web pages.
It sets x to 10 then fires off a page that says "value = x"
The page then saves its continuation and lets the server do other poo poo
When the link (Next) is pressed, it wakes up the continuation, increments x by 10, fires off another page, then falls asleep again, and so on till it gets to the return, and it closes the thread.

Now the fun part of continuations (And alas it doesnt work so well in the current stackless I *think*, is you should be able to hit the back button, and since the continuation identifier now points to the old page, it'll roll back the execution context, and re-run the code from that point in its history. Scary huh? Seaside (A smalltalk based system) uses that extensively. For multi-page forms, its erection inducing, because maintaining state gets *MUCH* easier.

It also completely flies in the face of much commonly held belief on internet best pracice. gently caress em.

The point being, is it allows you to implement cooperative multithreading in an extemely lightweight manner, that scales like a motherfucker.

And no it doesnt handle multiple cores well. Yet. I guess they are working on that. No idea about the GIL.

duck monster fucked around with this message at 08:22 on Nov 20, 2007

duck monster
Dec 15, 2004

Yup. Thats the magic of python. Dictionarys, lists and tuples. So simple, and yet so expressive. Sure you can do it in other languages, but python makes it so elegant.

Also, Py-game is a really fun library. Aeons ago I wrote a little game that I never finished based on a really spastic take on eve-online (Called something like "goonie lagsplot 2d" or something absurd). Although I never really bothered beyond about 4 or 5 pages of code it was loving fun to write what I wrote, and the prototype was actually kind of fun.

I could see it being very easy to write a 'real' 2D game in it.

What would be *real* cool would be a python version of Delphis old GLScene library. Open GL coding gets really drat cool when its turned into a first class OO library.

duck monster
Dec 15, 2004

Yeah. I tend to use pydev, partly because I basically try and use eclipse for everything. Its just what I'm used to.

Its a loving shame that boa-constructor got shanked by a dev who doesn't seem interested in letting anyone else contribute. It would of been a spectacular IDE had it been allowed to flourish.

duck monster
Dec 15, 2004

I now have this strange urge to start filling my code with clown decorators.

duck monster
Dec 15, 2004

Himmit posted:

This thread will be useful.

I got Learning Python two days ago and I'm quite amazed at how easy it have been to grasp the language this far.


Thats one of the biggest joys of python. It really aint hard. I learned python maybe ten years ago , slacking off at work one afternoon doing the tutorial. It was like a huge succession of lightbulbs going off above my head. Then it was straight over to the modules section, and before long I was cranking out all sorts of stuff. Fantastic.

The second joy was learning the fine details of the object orientation. Python is such a good language.

duck monster
Dec 15, 2004

LuckySevens posted:

Hey guys, I've started learning Python as my start to beginning to learn programming, hopefully I'll have the staying power to learn a thing or two. Is it alright if I post really newbie questions here?

Do the tutorial on the Python site in the standard documentation. Its a ripper. Any confusion over big-word stuff, pipe up in here.

When you finish it, muck around with the modules (see module help on site), of for something more fun check out the pygame module, or if its your thing, something like Django (web stuff)

duck monster
Dec 15, 2004

Ugg boots posted:

py2exe is a bitch for pygame, though, by the way (there is a like pygame2exe or something, but it's hard to configure.)

How? Every time I've used it with pygame stuff, it just sort of magically works for me. There doesn't seem to be any extra configuation required.

duck monster
Dec 15, 2004

deep square leg posted:

cLin: I don't think you can go past the official Python tutorial, at least to start with. The essential reading list linked earlier by m0nk3yz looks good, but I haven't read all of what it suggests, yet.

I think that Python is the most beautiful and clean of the languages, but it has one thing that I really hate - double underscores ("dunders") for name mangling. There has to be a prettier way to do that.

Yeah I think everyone hates that part. Its like you take a beautiful language and lay a gigantic turd into the middle of all that beauty. But....... Guido knows best. I'm sure he's sitting on his magical throne watching this and saying "Ah Ducks, you'll understand it one day <insert monty python joke>"

duck monster
Dec 15, 2004

:siren: Webware for Python is in beta for 1.0 FINALLY :siren:

This is a great stack for more traditional Tomcat style servelet style development. I love it. Its got a PSP implementation in there (Think PHP or ASP but with python) , a full persistant servlett stack, Kid templates , authentication stacks, OODB abstaction, you name it. Compared with Django and the like , this bad boys a grandfather of the scene, its been that long brewing.

http://www.webwareforpython.org/

Honestly after using this for servlett apps, just mentioning Tomcat gives me the heebee-jeebees. Its just nicer with python.

duck monster
Dec 15, 2004

I really loving wish the Python people would use an open source compiler (ie gcc) for its windows distros. It pisses me off into near nerd-rage when I need to compile poo poo for windows but woops don't own Visual studio, and I can't get it to work with the express one worth poo poo. This has been a show stopper for me numerous times now, and makes me want to summon robot-stallman to shoot motherfuckers dead.

duck monster
Dec 15, 2004

Because it then breaks compatibility with all the other stuff people have compiled in MS C++

And if you don't have the sources, your boned.

duck monster
Dec 15, 2004

Zcientista posted:

Why is that once I run a script in IDLE the text highlighting disappears? Is there any way I can turn it on again?

Really? I havent seen that before. I wonder what causes it. :(

Hey, if you get a chance, play with iPython. Its loving wonderful. If you run it on windows, be sure to set up Readline libs, but if you do its amazing, and if there was a way of making it work inside of idle, it'd make idle into gods own python environ. (Well, if I could get idle running as the shell in eclipse python, I'd probably consider that it).

duck monster
Dec 15, 2004

fletcher posted:

I'm very curious about Python. I've never used it, but can't help but see everybody praising it, while everybody puts down PHP. I figured I might as well give it a whirl, but I was wondering if anybody had a good comparison of how something is written in PHP vs what the equivalent would look like in Python, specifically geared towards web development.

PHP isn't really as bad as its made out, at least not v5 onwards. The latest Object model is actually pretty close , but not quite (in a few key ways) to python.

PHP is however a pretty focused little web language, but not really that good for much else, in comparison with other languages.

I think the more interesting comparison is Perl v Python. I had it described like this. Perl is a chainsaw, Python is the surgeons scalpel. A Chainsaw will amputate a leg much faster than a scalpel, but the scalpel will do a cleaner job of it. Now contrast and compare with cutting down a tree.

Python is elegant, and conservative. Its simple minded as well, and thats a good thing. You'll quickly come to apreciate how python achieves so much, in so small an amount a code with such a small but highly powerful number of primatives.

But its a bit more of a bitch if you want to write 'line noise' regex heavy stuff.

duck monster
Dec 15, 2004

fletcher posted:

What makes it not as good as python for a command line application? I've only done very basic things on the command line with php, but Python looks like it would be a lot more useful since it has GTK support.

Its just better focused on the task. Pythons got a very clean model, and its designed all sharp like for that sort of thing. Truth is, its a generally better language.

Not to say PHP can't do it. But there stuff php simply can't do as well, like threading , or pythons funky itterators and generators, and so on.

But PHP is a fine web language as far as I'm concerned.

duck monster
Dec 15, 2004

I just made this

code:
testarr = {     'name':'duckmonster',
                'job':'codemonkey',
                'animals': {
                                '1':'dog',
                                '2':'cat',
                                '3':'mouse'
                           },
                'fat':'your mother'
        }


def returnxml(struct,base,depth=0):
        ostr = (' ' * (depth * 3)) +'<'+str(base)+'>'
        if (hasattr(struct,'items')):
                for item in struct:
                        ostr += '\n'+returnxml(struct[item],item,depth+1) +(' ' * (depth * 3))
        else:
                ostr+=str(struct)
        ostr+='</'+str(base)+'>\n'
        return ostr

print returnxml(testarr,'test')

code:
root@webdev02:~# python test.py
<test>
   <job>codemonkey</job>

   <animals>
      <1>dog</1>

      <3>mouse</3>

      <2>cat</2>
   </animals>

   <name>duckmonster</name>

   <fat>your mother</fat>
</test>
Have fun.

Also the order it puts elements is MAGICAL just like harry potter or a unicorn.

duck monster
Dec 15, 2004

Oh I'm aware that the expectation of ordering is not a good one, but its annoying, since a handy little guide to ordering is provided by the structure provided.

duck monster
Dec 15, 2004

PnP Bios posted:

I'm using python with pySerial and wxWidgets to do some pretty sweet stuff with GPS devices. I just have to say that wx for python is amazingly simple to use. I love it to pieces.

track down boa constructor. its a bit rusty, which is a shame because it would be loving fantastic otherwise. However its a really competent gui designer and generates nice and clean code. But due to its buggyness I'd recomend once designing the gui, using something else to finish it off. Crashing and losing code sucks.

If the guy working on it wasnt so drat insular and let it open up a bit, it could be a 'killer app' in the python world as a full delphi-like system.

duck monster
Dec 15, 2004

I can't help thinking that if you need 150 worksheets, you havent really put enough thought into how the data is being represented. Could this be easier done with a disposable database, maybe in an MS Access container so the client can open it up and noodle around with some macroed up forms and poo poo?

Anyway, if its the way its gotta be, wheres the leak? Pythons reference counted, so if you get circular references or whatever, you can lose memory with stuff if your not careful. Manually delete objects when your finished and see how that works out. If its at the Excel side, you might be poo poo out of luck, but if its at the database side, I'd suggest getting all funky with cursors and break the processing up a bit.

duck monster fucked around with this message at 20:24 on Mar 11, 2008

duck monster
Dec 15, 2004

Mighty Germ posted:

does python not have a do ... while looping structure?
If not, is there a way I can emulate it without having to write my code blocks twice?

code:

keep_looping_bitch = true

while keep_looping_bitch:
     #
     # code
     #
     keep_looping_bitch = not (condition)
should emulate
code:
repeat:
     #
     #
     #
until (condition)

duck monster
Dec 15, 2004

Mighty Germ posted:

In the interactive interpreter, you can do this
code:
>>> import sys
>>> print sys.__doc__     
This module provides access to some objects used or maintained by the
interpreter and to functions that interact strongly with the interpreter.

Dynamic objects:

argv -- command line arguments; argv[0] is the script pathname if known
path -- module search path; path[0] is the script directory, else ''
modules -- dictionary of loaded modules
...etc...
Replace sys with whatever module you're looking for. Can also be used for functions.

As for books, I've never read Learning Python, but the 'Programming' series of books are usually more in-depth than the 'Learning' series.

or use the helper function

help(<thing>)

where thing can be a module, object, function , class, or whatever. combine with dir(<thing>) to peek into somethings internal organs, and you've got all your documentation right there.

That said, I personally find the documentation on the python website excelent.

duck monster
Dec 15, 2004

outlier posted:

A database security / access question, for which I want a Python solution:

So I have this small to medium sized database, for which I've written an access wrapper in SqlAlchemy. The wrapper handles searches, addition and deletion and so on, and lies between the actual database and the web services that will use it. So far so good.

The complexity comes in terms of different access levels. Not all rows should be accessible to all users, some users will have access to all of them, some to restricted sets: a fairly classic access control problem that I'd like to solve in the software layer. However, I haven't found a great deal of prior art in SqlAlchemy or Python. Any pointers? I'd hate to have to write a whole ACL library just for this.

I tend to use decorators.

Like just make a decorator that encapsulates an @acl type function.

However, yes, views are another way of tilting at the issue. I just suspect it could get a bit sticky if you get too complicated with them.

duck monster
Dec 15, 2004

Lancer383 posted:

Not sure why you're having that issue with the print command -- have you tried using sys.stdout.write(string)? In your example it would be:

code:
import sys

name = raw_input("What is your name?")
sys.stdout.write(name + " is a stupid name.")

What would you gain from that?

Anyway. Try this;-

code:
import sys

name = raw_input("What is your name?").rstrip()
print name , " is a stupid name."
the .rstrip() strips the carriage return off the string before passing it into name.

duck monster
Dec 15, 2004

Can someone fix that fugging faq.

Python was not designed as a teaching language. It was designed as a scripting language for Andrew Tannenbaum's Amoeba Operating system, which is where I first heard of it many many moons ago.

duck monster
Dec 15, 2004

bosko posted:

Has anyone gotten PayPal IPN working with Python? For the life of me I can't figure out what I am doing wrong when I have simply taken the idea from another (working) script and used it in my own.

I am not getting errors, it just seems PayPal cannot verify my payment and therefore nothing is happening unless the user explicitly clicks on "Return to Merchant" which then everything is grand, but not every user clicks that link

This is a mix of django/python but the relevant stuff is in Python

PP_URL = https://www.paypal.com/cgi-bin/webscr

code:
newparams = {}
    for key in request.POST.keys():
        newparams[key] = request.POST[key]

    newparams['cmd'] = '_notify-validate'

    params = urlencode(newparams)

    req = urllib2.Request(PP_URL)
    req.add_header("Content-type", "application/x-www-form-urlencoded")
    fo = urllib2.urlopen(PP_URL, params)

    ret = fo.read()
    if ret != 'VERIFIED':
        return HttpResponse('Could not verify PayPal Payment')


# Other code to store information into cart

return HttpResponseRedirect('....') # Redirects the user if everything was A-OK
Any ideas what I could be doing wrong? Thanks in advance.

Paypal are the devil. Do not trust your business to those cunts. Seriously, I blame their worthless system for my current unemployment.

duck monster
Dec 15, 2004

Flea110 posted:

I've spent the last week or so writing a battle simulator for the board game Axis & Allies. I'm fairly new to programming, and it's my first program that uses classes.

I'd appreciate any constructive criticism, or any other advice or opinions.

http://pastebin.com/f741d6759

Its not bad, but I get the feeling your still sort of writing structured code just wrapped in objects. Its still a valid way of coding, but its not the best way.

Heres how to look at objects and do it right;-

Disclaimer: I'm an OO Design zealot, so take this with moderation if you don't want to grow an absurd neckbeard and start developing erections at the mere mention of smalltalk.

An object is a little black box, that you can make lots of copies of, and it has properties and methods. Methods being best thought of as "code that happens when an object is sent a message" (You send the message by calling the method). All understood right? One needn't care whats *in* the black box, as long as the properties and methods behave as expected. A black box is a model of a thing, an object , so to speak. Your program is an object. The Countries are objects, the board pieces are objects. The players are objects And so on.

So you might for instance write a country object that has a property like "who is occupying me?" and "How many troops are here". And then perhaps add methos like "add_troops([list of troop objects],player,where_troops_came_from)" or "send_troops([list of troop objects],player,where_troops_go_to)", then maybe methods like "calculate_sovereignty" and "make_dudes_fight" or whatever

and so on until you have a model of how a country in the game follows the rules and gains/loses sovereignty and so on.

Then you do the same for troops/units

And add a player object (maybe you make this first)

and finally add a game object that controls and contains all the other guys.

With all that finished you might then create some objects that interact with the user.

It does sound like more work, but once you get the hang of it, its really intuitive, and it becomes second nature, and it fits neatly with the sort of methodologies you might work with in the 'serious programming world' like unit testing and UML and poo poo like that.

duck monster
Dec 15, 2004

ATLbeer posted:

Has anyone had a good experience with a messaging package?

I have used the XMLRPC library and I LOVE it.. I really want to use the library but, I would like some sort of central logging of all messages that have gone through the system for debugging and error checking since it's going to be transactional system. I guess I could funnel all the XMLRPC requests through a handler which would log the message and pass it along to the appropriate system but, that seems like a cheap hack and a bottle neck.

A Jabber server seems like the only solution but, I can't seem to bring my self to be a fan of the libraries out there. They all seem to be a bit too "un-pythonic" and obtuse.

Anyone have any experience in a client-server-client messaging system for Python that you've liked to work with or do you believe I'm just stuck hacking up a Pythonic wrapper for an existing Jabber wrapper?

The XML-RPC library is astonishingly effective and simple to use.

poo poo. Its a shame you didn't ask this 6-7 months ago, I wrote an awesome system that did precisely this. Central logging system with a web interface, switchable logging levels, all sorts of statistics, and a big bag of interfaces to talk to it in various languages. (PHP, Python, Perl, C). The boss let me LGPL it all, but when I quit the job I never took a copy of the code, and I did my usual and burnt the bridge with a flamethrower, so I probably can't get it for you.

But heres how it basically worked;- Make a simple daemon (just descend from Simple xml server class) that takes messages, and poo poo them into a database. Get out Django, or poo poo even PHP if you wish, an punk out a little web interface to it. An then just make a little includable library to catch errors and fwd them across to the daemon.

duck monster
Dec 15, 2004

Centipeed posted:

For this exercise, can't I just store the list in a text file with simple markup? A database seems like overkill, even it is is only SQLite.

Yes, and your idea is fine. Make a base class that has a __str__ function that shits out a pickle of the data. Put the classes in a hash indexed by , I dunno, whatever you think a good scheme to key it all is, and then to save and load it, just do something like

open file ()
for each record in the hash :
print the record to the file <--- __str__() will handle the fun
end for
close file ()

(excuse the pseudocode, I'm trying to avoid shifting grammar in my head from my work atm)

and then just reverse that to load it in.

If you want you can even just pickle the hash , and it ought traverse into the objects and poo poo them into a file.

But thats probably bad form.

On a side note, you used to be able to do this really well with pascal (write an array of records directly to a file) , which made me kind of amused at the 'pascal is hard for file handling!' people (sure it was, in the 1960s!) as at least with the turbo variants, nothing came close to it.

duck monster
Dec 15, 2004

Man. I should one of these days, sit down and write a tutorial for absolute programming newbies.

duck monster
Dec 15, 2004

Kire posted:

I read "A byte of python" and "thinking like a computer scientist," two of the intro-to-python docs recommended on the main website. Does anybody have further reading recommendations for someone still getting into programming and Python? Some simple projects I should try to do?

Grab a copy of Django and gently caress around with that.

duck monster
Dec 15, 2004

Getting psycopg2 postgresql library working on OS/X is an utter slut of a task. Apple really needs to provide canonical packages for fundamental stuff like this.

duck monster
Dec 15, 2004

Because I have a mac in front of me , and not a linux or windows box. v:shobon:v

But yes, the state of python on the mac is shameful at the moment. The internet is full of people saying "Use MacPython its the unofficial standard". No, theres an official standard that apple supplies, and you break your computers head if you dont

Now I have Apple python, MacPython, ports python and Fink python all due to a 3 day long quest to get loving psycopg2 installed. End solution;- Reverted to the apple python (so xcode isnt broken) modify the poo poo out of the compile script and rebuild psycopg2 from a tarball.

Also the postgresql install shat itself so I had to manually install that too :smithicide:

duck monster fucked around with this message at 03:52 on Sep 29, 2008

duck monster
Dec 15, 2004

tbradshaw posted:

Well, part of being on OSX is that you have a full UNIX workstation at your finger tips. You should install MacPython, but do so in your home directory. I'd recommend creating a "local" directory in your home directory, and using that as the root for all of your personal software installations.

After installing python in your home directory, liberal use of virtualenv and easy_install should make things pretty trivial.

Except that literally every unix on the market except for the mac has a coherent policy on package management. I love the mac, but its package management has more in common with loving slackware than anything modern. Download tarball, compile and pray the gods will be benevolant. And no, easy_install will usually light on fire the minute its got to compile something and it becomes apparent that Apple puts things in different places to bsd's or SysV's. Reminder there are about 5 distros of python out there for the mac, none of which are compatible.

duck monster
Dec 15, 2004

outlier posted:

Point taken. I'd prefer to use a single build of Python myself, except for Zope's lunk-headed attitude of versions (i.e. only runs on Python 2.4 for obscure reasons, internal modules are incredibly picky about the versions of other modules they will work with). And granted, no package installer with help you with versioning in Python.

On a side note, when I started working with Python on Windows was when I was astonished how hard it was to develop with. What, I have to get a special installer for half the packages I want? What if the developer hasn't been arsed to compile one as yet? Now _that's_ difficult ...

Oh god.... One of the angriest emails I ever wrote was something to the effect of "Why the gently caress are you compiling free software with an unfree compiler? USE GCC!!!!!!!!" because I was blocked from using so many libraries due to the need for Visual studio.

Adbot
ADBOT LOVES YOU

duck monster
Dec 15, 2004

ahem

http://www.andlinux.org/

Basically installs linux as a windows process. Note: Not a VM, its a linux kernel that runs on windows, and it all works rather well. Similar sort of experience to parallells on the mac I guess.

edit: Or just run parallells on a mac :hellyeah:

  • Locked thread