cRPG

cRPG => Announcements => Topic started by: Espu on November 29, 2011, 05:38:48 pm

Title: Python autoupdater
Post by: Espu on November 29, 2011, 05:38:48 pm
Alternate auto-updater for servers and other special people. Version 0.1, try it and give feedback.

http://infinitum.dyndns.org/share/dev/crpg_autoupdater.py

If you don't know what this .py magic is or don't know how to run it, you're probably better off not trying it for now.
Title: Re: Python autoupdater
Post by: Graf_Hodenschaf on November 29, 2011, 05:42:12 pm
Everybody knows that py stands for paraguay  8-)
Title: Re: Python autoupdater
Post by: FRANK_THE_TANK on November 30, 2011, 01:18:32 pm
Some one tell the AEF chumps! AHHHH!!! Time to roll back the clock I guess :}\
Title: Re: Python autoupdater
Post by: CoWorm on November 30, 2011, 01:39:28 pm
Works like a charm. Love you Espu!
Title: Re: Python autoupdater
Post by: Serfonz on November 30, 2011, 01:40:04 pm
Appeared to work perfectly on Nordmen. (Probably cause worm did it and not me)

Inb4 server falls apart.
Title: Re: Python autoupdater
Post by: CoWorm on November 30, 2011, 01:41:07 pm
Oops. Server fell apart.  :rolleyes:
Title: Re: Python autoupdater
Post by: bredeus on November 30, 2011, 02:04:42 pm
thanks Espu. Gosh How i hate Python
Title: Re: Python autoupdater
Post by: Tennenoth on November 30, 2011, 02:06:46 pm
Interesting being able to get a look at the back-end stuff of cRPG there, always wanted to see how your code looks.
Title: Re: Python autoupdater
Post by: Espu on November 30, 2011, 04:13:30 pm
Well that's pretty much 100% separate from everything else. :P
Title: Re: Python autoupdater
Post by: chadz on November 30, 2011, 04:32:03 pm
It's a bit less documented than the rest of the code, but it's still an OK example.
Title: Re: Python autoupdater
Post by: Espu on November 30, 2011, 05:30:33 pm
Added an option (-w), WSE files are copied there after update.
Title: Re: Python autoupdater
Post by: Kafein on December 01, 2011, 01:26:41 pm
It's a bit less documented than the rest of the code, but it's still an OK example.

Return statements all over the place... while 1 loops... uurgh

This code reassures me about the fact that I still hate python. Doesn't help you doing what you want at all. Instead, it says "Yeah you can do that, you can write anything anyway, I don't care". Furthermore, horrible readability (guess where 5-nested loops/conditions finish when you can only rely on indentation... Okay that's uncommon)

Apart from that, pretty decent.
Title: Re: Python autoupdater
Post by: Espu on December 01, 2011, 03:25:36 pm
Version 0.1. You're free to implement it in your favorite language and/or with better style.
Title: Re: Python autoupdater
Post by: Jacko on December 01, 2011, 04:02:24 pm
Witchcraft!
Title: Re: Python autoupdater
Post by: Kafein on December 01, 2011, 07:34:41 pm
Version 0.1. You're free to implement it in your favorite language and/or with better style.

You seem offended  :(

That wasn't my intention  :(

-> you don't need top code style for a few hundred lines ^^
Title: Re: Python autoupdater
Post by: Espu on December 01, 2011, 09:13:14 pm
:(
Title: Re: Python autoupdater
Post by: Tennenoth on December 01, 2011, 11:28:55 pm
:(

Shouldn't you change your avatar as well now?

Also, nonetheless i'm always interested in how other people code thing and since when I had to use Python for half a semester at uni my code was pretty basic despite netting me 98% (chip in with some narcasisstic bragging rights there) for the unit and i'm always interested in the "boundries" so to speak of how where the language will actually let you go.
I've asked before but I don't remember getting an answer, but what do you program the rest of the mod with? I'd assume one of the C's since I have a higher statistical chance of getting the right one with that! ;)
Title: Re: Python autoupdater
Post by: Kafein on December 02, 2011, 01:42:36 am
Shouldn't you change your avatar as well now?

Also, nonetheless i'm always interested in how other people code thing and since when I had to use Python for half a semester at uni my code was pretty basic despite netting me 98% (chip in with some narcasisstic bragging rights there) for the unit and i'm always interested in the "boundries" so to speak of how where the language will actually let you go.
I've asked before but I don't remember getting an answer, but what do you program the rest of the mod with? I'd assume one of the C's since I have a higher statistical chance of getting the right one with that! ;)


I think it's python, too. At least, many Warband scripts are in python.
Title: Re: Python autoupdater
Post by: cmp on December 02, 2011, 04:24:34 am
No, Python is just used as an intermediary compiler. The M&B scripting language consist of sequences (of items, operations, troops...).
Title: Re: Python autoupdater
Post by: Tomas_of_Miles on December 02, 2011, 04:29:34 am
Interesting insight into coding. I am interested in writing programs and stuff (I am a Java noob though). I would love to see more jargon thrown about though with opinions on different approaches to things. Fascinating.
Title: Re: Python autoupdater
Post by: HatsuneMiku on December 03, 2011, 01:50:53 am
This is written for Python 2.7 isn't it?
Fuck, I hate CentOS.
Title: Re: Python autoupdater
Post by: Garrus on December 03, 2011, 08:48:08 pm
Return statements all over the place... while 1 loops... uurgh

This code reassures me about the fact that I still hate python. Doesn't help you doing what you want at all. Instead, it says "Yeah you can do that, you can write anything anyway, I don't care". Furthermore, horrible readability (guess where 5-nested loops/conditions finish when you can only rely on indentation... Okay that's uncommon)

Apart from that, pretty decent.

How is coding style related to Python, which is a multi-paradigm language ?
It looks like you invest too much energy into hating, instead of reading at least a beginner tutorial :)
If you think Python is madness, you didn't see Haskell or Clean yet.
This code is obviously is not about maintainability or handling extrem cases, it just solves the problem.
Title: Re: Python autoupdater
Post by: Kafein on December 03, 2011, 08:54:50 pm
How is coding style related to Python, which is a multi-paradigm language ?
It looks like you invest too much energy into hating, instead of reading at least a beginner tutorial :)
If you think Python is madness, you didn't see Haskell or Clean yet.
This code is obviously is not about maintainability or handling extrem cases, it just solves the problem.

I know, it's not about the coding style. I just don't like the Python syntax. Especially the lack of braces. I really like some aspects of it though. I'm more like a OO extremist so I like smalltalk, which isn't really a language that "gets things done" at all. I heard plenty of good things about Haskell, and it seems interesting. But never tried it.

As I said, this code is very small and does what it's written for, good enough.
Title: Re: Python autoupdater
Post by: Airith on June 13, 2012, 08:45:59 am
This broke recently. The remote_filelist retrieved is CVS, while the .gz version of the filelist.txt is equal sign value separated. I got mine working (didn't know Python, went from neutral to not a fan), but why have two different types?
Title: Re: Python autoupdater
Post by: kono yaro! on June 13, 2012, 10:16:49 am
itt nerds