PDA

View Full Version : python scripting: os x or windows?




twoodcc
Jun 28, 2009, 04:44 PM
not sure if this is the best place to put this, but here it goes:

so i have my mac pro running as a webserver, and hosting some php sites that are very valuable to me, as well as some other sites that are me just trying to learn more php.

i like to test out these sites with scripts. i have found that python is pretty good for doing this. please let me know if there's something better out there.

now, when running these scripts in windows 7, they work great and do exactly what i want them to do.

but when i try to run scripts in mac os x, like in applescript or appscript (python), it just ends up crashing my whole system, and i have to hold the power button down.

granted, these scripts are really just mimicking what humans would do. which can sometimes be hard to replicate. and some of these scripts can run for hours.

but is windows just better at doing this type of thing? so i just forget doing these scripts in os x? i've tried using lynx for some of them, and that doesn't crash the system, but i can't do what i'm trying to do with lynx

thanks



Ti_Poussin
Jun 28, 2009, 05:26 PM
Not sure what you trying to accomplish here. but it this is for testing purpose of your PHP code, I would recommend using unit test and run the PHP code directly. Something like PHPUnit http://phpunit.sourceforge.net/

But if you really need to do a graphical tests of click and event for the whole thing. On the Mac I would give a look at iKey http://www.scriptsoftware.com/ikey/ This can be the Holy Grail your looking for.

But if you start to love what Python can do, I suggest you to give a look at Turbogears http://turbogears.org/

A framework to make dynamic web content in Python with Ajax built-in. I used it for a project and it work wonderfully. The only problem is a stand alone server, but you can reroute it in Apache. Or simply Pylon http://pylonshq.com/

Good luck with your tests

Ti_Poussin
Jun 28, 2009, 05:29 PM
As for your script under OS X, there's probably a system level call that isn't code correctly. You may want to check the Python documentation, some call have change over the time and no longer supported, depending on the version of Python that run on both system (I guess the Windows one is more recent, Apple have an old implementation, like most of there software implementation from the linux/unix world, they still have a lot of work to do keep them up to date).

twoodcc
Jun 28, 2009, 08:15 PM
Not sure what you trying to accomplish here. but it this is for testing purpose of your PHP code, I would recommend using unit test and run the PHP code directly. Something like PHPUnit http://phpunit.sourceforge.net/

But if you really need to do a graphical tests of click and event for the whole thing. On the Mac I would give a look at iKey http://www.scriptsoftware.com/ikey/ This can be the Holy Grail your looking for.

But if you start to love what Python can do, I suggest you to give a look at Turbogears http://turbogears.org/

A framework to make dynamic web content in Python with Ajax built-in. I used it for a project and it work wonderfully. The only problem is a stand alone server, but you can reroute it in Apache. Or simply Pylon http://pylonshq.com/

Good luck with your tests

As for your script under OS X, there's probably a system level call that isn't code correctly. You may want to check the Python documentation, some call have change over the time and no longer supported, depending on the version of Python that run on both system (I guess the Windows one is more recent, Apple have an old implementation, like most of there software implementation from the linux/unix world, they still have a lot of work to do keep them up to date).


thanks for the reply! i will most definitely check out those links, and see what i can come up with.

twoodcc
Jun 28, 2009, 09:07 PM
so far, iKey seems to be working well. i've only crashed safari once, and didn't have to restart my mac b/c of the crash. thanks again for the heads up! i still might look more into python though, just to learn something