l0b0 / mian

Mine analysis - Graph blocks to height in a Minecraft save game
https://github.com/l0b0/mian/wiki
GNU General Public License v3.0
14 stars 4 forks source link

Use optparse to parse options. #17

Closed Fenixin closed 13 years ago

Fenixin commented 13 years ago

As the number of options for mian increase the handling in main is going to be harder. Why not using optparse?

http://docs.python.org/library/optparse.html?highlight=optparse#module-optparse

What do you think?

l0b0 commented 13 years ago

Looks good - Do you have time to try it out?

Fenixin commented 13 years ago

Yes, but I'm finishing something new for mian before trying this.

pepijndevos commented 13 years ago

Sounds great, I think all the proposals for command line options should wait on this.

Fenixin commented 13 years ago

I'm going to give a try to optparse now.

pepijndevos commented 13 years ago

Since there are at least 3 people working on mian now, I think we should make labels for ourselves, and assign them to an issue we're working on.

Fenixin commented 13 years ago

cool, great idea.

Maybe we should divide the code in different files (mian.py nbt.py plot.py), so different works are easier merged. What do you think?

pepijndevos commented 13 years ago

I think this is something to add to the OO ticket, but it is a sound plan.

Fenixin commented 13 years ago

pull request done.

The new stuff is in my branch optparse. Test it please!

l0b0 commented 13 years ago

Umm, this is obsolete from 2.7, to be replaced by argparse. But I'll still merge if it's simpler than the current solution.

Fenixin commented 13 years ago

Mmmh... true, but I think is going to last a lot, 2.7 is going to be here for a long time (I hope so).

Fenixin commented 13 years ago

Hey! Just curious, how is this going?

l0b0 commented 13 years ago

Sorry, I've been on a bit of a programming holiday lately, and this summer is looking real busy. Can't promise anything, but maybe this weekend.

Fenixin commented 13 years ago

Sorry, I don't want to rush.

Maybe, if you are not going to be able to do things here for a long time you can add to the contributors list to @pepijndevos, so we can keep doing things here (I would offer myself, but I'm sure both you are much better programmers than I am). Is just an idea, don't feel forced to.

pepijndevos commented 13 years ago

I believe I already have access to this repo. So if it's okay with Victor, I could merge some stuff. I do think that GTD is more important that Python knowledge, so I'd grant you access, because you seem to be much more active ATM than Victor and me.

I can't do anything right now, but after I merged pepijndevos/PyMouse#8 and wrote some pepijndevos/Begame I can have a look at Mian.

l0b0 commented 13 years ago

@pepijndevos: Sounds good; running the stuff through pep8 and massaging it a bit should take care of any low-hanging fruit, and should be plenty for this kind of commit.

Fenixin commented 13 years ago

:) ... Ok. I'll do my best.

pepijndevos commented 13 years ago

I'm sorry guys, I haven't yet done anything on Mian. Meanwhile, I haven't played Minecraft in weeks, so Mian has little priority for me now.

l0b0 commented 13 years ago

Long time no Minecraft coding, but I've merged the pull request. If someone has the time to test it and put up a note here, I can close the issue and create a new PyPI release.

Fenixin commented 13 years ago

I've just tested it and doesn't work at the moment, I'll try to fix this in the next days.

Fenixin commented 13 years ago

AFAIK this is fixed right now.