|
does python have a decent way to run commands and get their exit status
|
# ? Oct 23, 2013 00:35 |
|
|
# ? Jun 5, 2024 23:09 |
|
Nomnom Cookie posted:centos has perl 5.10 is that good enough to do things with that is an excellent perl; ignore the naysayers
|
# ? Oct 23, 2013 00:37 |
|
USSMICHELLEBACHMAN posted:if you're writing perl you might as well just write bash this is so stupid it drools. perl is exactly what you want to be using and 5.10 is fine.
|
# ? Oct 23, 2013 00:38 |
|
Nomnom Cookie posted:does python have a decent way to run commands and get their exit status i dont know i'm sure it does ruby does you can do %x[program argument argument argument] and it escapes everything for you and just works. plus it has like 20 other methods of executing commands for if you want to block or not block them or get their pid or w/e
|
# ? Oct 23, 2013 00:38 |
|
Nomnom Cookie posted:does python have a decent way to run commands and get their exit status code:
|
# ? Oct 23, 2013 00:39 |
|
Stringent posted:this is so stupid it drools. there's help for people like you. look up the perl stockholm victims foundation
|
# ? Oct 23, 2013 00:40 |
|
Mido posted:
i found subprocess.check_call all by myself! it looks like exactly what i want for replacing bash -e
|
# ? Oct 23, 2013 00:42 |
|
USSMICHELLEBACHMAN posted:i dont know i'm sure it does ruby has a million things and I'm not going to remember them all
|
# ? Oct 23, 2013 00:46 |
|
you only need to remember the ones oyu like
|
# ? Oct 23, 2013 00:47 |
|
Nomnom Cookie posted:i found subprocess.check_call all by myself! it looks like exactly what i want for replacing bash -e if you're looking for a scripting language for server janitoring you're really doing yourself a disservice not going with perl. as much for the community and libraries as the language itself, since that's primarily what it's used for. i realize it isn't very cool, but it is effective.
|
# ? Oct 23, 2013 00:49 |
|
also i don't like ruby
|
# ? Oct 23, 2013 00:49 |
|
Nomnom Cookie posted:also i don't like ruby the feeling is mutual
|
# ? Oct 23, 2013 00:50 |
|
Stringent posted:if you're looking for a scripting language for server janitoring you're really doing yourself a disservice not going with perl. i don't want to janitor servers just write my workflow scripts in something better than bash
|
# ? Oct 23, 2013 00:51 |
|
perl 5 has copied lots of ruby poo poo but better (its not ruby for one). it will also have a mop in a year or two. for hipsters who use ruby because its a fad there will be perl 6
|
# ? Oct 23, 2013 00:52 |
|
quote:it will also have a mop in a year or two. computer janitors don't need a mop it's just an expression you idiot
|
# ? Oct 23, 2013 00:54 |
|
Nomnom Cookie posted:i don't want to janitor servers just write my workflow scripts in something better than bash python is easy to read when you return to it and is very sane for workflow poo poo
|
# ? Oct 23, 2013 00:54 |
|
Nomnom Cookie posted:i don't want to janitor servers just write my workflow scripts in something better than bash you said throwaway earlier, what's your workflow?
|
# ? Oct 23, 2013 00:54 |
|
but once your python poo poo starts growing into like 5 class monstrosities that break into 12 different files you're gonna start not enjoying all the duck typing bullshit when your poo poo breaks unless you unit test the gently caress out of whatever awful thing you're doing
|
# ? Oct 23, 2013 00:55 |
|
Mido posted:but once your python poo poo starts growing into like 5 class monstrosities that break into 12 different files you're gonna start not enjoying all the duck typing bullshit when your poo poo breaks he already said his monstrosities are in java
|
# ? Oct 23, 2013 00:56 |
|
USSMICHELLEBACHMAN posted:computer janitors don't need a mop it's just an expression you idiot your meta object protocol is a piece of poo poo
|
# ? Oct 23, 2013 00:57 |
|
you mgiht need a mop after using perl for a week and blowing your brains out all over your cube
|
# ? Oct 23, 2013 00:58 |
|
i need to clean up my spoken language i get all feisty when i talk about computer sh-... stuff
|
# ? Oct 23, 2013 00:58 |
|
Stringent posted:you said throwaway earlier, what's your workflow? repetitive dev tasks, they're usually different for each project. this month i need to build, deploy a war, restart 4 tomcats, and load test data multiple times a day. currently that sort of thing gets a bash script. i say throwaway because these scripts are write-once and tailored to the repetitive dev task of the month
|
# ? Oct 23, 2013 00:59 |
|
why use bash when perl is installed on everything even if you hate perl at least its not bash
|
# ? Oct 23, 2013 01:01 |
|
Nomnom Cookie posted:repetitive dev tasks, they're usually different for each project. this month i need to build, deploy a war, restart 4 tomcats, and load test data multiple times a day. currently that sort of thing gets a bash script. i say throwaway because these scripts are write-once and tailored to the repetitive dev task of the month i use python to automate a lot of string parsy poo poo because messing* iwth strings is relatively sane in python, ergo i parse a bunch of xml files and move info around to basically compile resources for game stuff i do so i have a whole little toolchain of temporary/barely reusable scripts edit: language
|
# ? Oct 23, 2013 01:03 |
|
Nomnom Cookie posted:repetitive dev tasks, they're usually different for each project. this month i need to build, deploy a war, restart 4 tomcats, and load test data multiple times a day. currently that sort of thing gets a bash script. i say throwaway because these scripts are write-once and tailored to the repetitive dev task of the month well, if you just want to make system calls same as bash, perl's the way to go. if you think you'd like to use libraries steer clear because cpan can be a real pita.
|
# ? Oct 23, 2013 01:04 |
|
Mido posted:i use python to automate a lot of string parsy poo poo because messing* iwth strings is relatively sane in python, ergo i parse a bunch of xml files and move info around to basically compile resources for game stuff i do oh god nonononono string parsing is what perl is loving for!!!!
|
# ? Oct 23, 2013 01:06 |
|
Stringent posted:well, if you just want to make system calls same as bash, perl's the way to go. cpan owns
|
# ? Oct 23, 2013 01:06 |
|
perl is great at string parsing the problem is that once your'e doing parsing those strings you cant do anything useful with them because you're stuck in perl
|
# ? Oct 23, 2013 01:07 |
|
prefect posted:cpan owns until you need an older version of something
|
# ? Oct 23, 2013 01:08 |
|
uG posted:perl at least its not bash this reading perl code is somewhat entertaining to me (maybe because I never had to really work with it) but reading bash scripts is just painful
|
# ? Oct 23, 2013 01:11 |
|
Stringent posted:oh god no gently caress off im not talking about parsing strings im talking about working with them contorting them, slamming them together, moving poo poo around once you have them
|
# ? Oct 23, 2013 01:11 |
|
Mido posted:no gently caress off yes, perl owns for this
|
# ? Oct 23, 2013 01:13 |
|
Mido posted:but once your python poo poo starts growing into like 5 class monstrosities that break into 12 different files you're gonna start not enjoying all the duck typing bullshit when your poo poo breaks yep
|
# ? Oct 23, 2013 01:23 |
|
Stringent posted:if you think you'd like to use libraries steer clear because cpan can be a real pita. this is the dumbest thing in this thread
|
# ? Oct 23, 2013 01:29 |
|
uG posted:this is the dumbest thing in this thread its a matter of taste i admit. perl's got a lot of great libraries with great testing and probably a higher average level of code quality than python or ruby. that said, i find gem and pip about a billion times easier to work with than cpan, especially across multiple machines. ymmv v0v
|
# ? Oct 23, 2013 01:42 |
|
personally i write all my string janitoring scripts in c
|
# ? Oct 23, 2013 01:47 |
|
Mr SuperAwesome posted:personally i write all my string janitoring scripts in c
|
# ? Oct 23, 2013 02:03 |
|
perl, Python, and ruby are all much more similar than they are different. They're all slow, they share a lot of the same awful implementation problems, they all have half baked type systems They're all better for cj poo poo than bash. I don't care which one you use just don't use bash/ksh. People who get butthurt bout the trivial differences between scripting languages should be tied down and forced to debug ksh code. A full 40 hour work week for every time they bring it up.
|
# ? Oct 23, 2013 02:15 |
|
|
# ? Jun 5, 2024 23:09 |
|
perl loving sucks for text manipulation what the gently caress are you gibbering fools blathering on about, INSANITY, theres no way to even manipulate a loving text file at ALL in perl. its worthless leftover glue garbage from slackware autists who couldnt possibly fathom writing a shell script more than four lines long. throw it in the trash
|
# ? Oct 23, 2013 02:16 |