Jun 21, 2010, 07:35 PM | |
JJ1 Stuff -- Improve my Python
miscjj1.py
blockset.py I'm working on my first Python program. So far, if you give it a folder it will convert every JJ1 BLOCKS file therein to a 256-color .png for use in whatever you like. Some code is based on Stijn's JJ2 stuff, and I refer heavily to DD's various file format documentations. Since I'm very new to Python, if you know it, I'd love some instruction for how to improve this, be it formatting alone or actual optimization. If not, hopefully you want to extract some JJ1 sets. |
Jun 22, 2010, 11:54 AM | |
I worked with Python for a quarter in school. If you have any questions, feel free to ask me. Honestly, I think Python is not the best programming language to use, however.
__________________
Yes, I am, in fact, ALWAYS the one to blame for everything. And none of your are full of yourself. Good job. Do you like Stijn? Take my poll! ![]() ![]() Windows is not a virus. A virus is small and efficient... Note to Stijn: how am i even getting away with this |
Jun 22, 2010, 12:28 PM | |
Go on...
|
Jun 22, 2010, 12:58 PM | |
Depends on the application, and personally I'd say Python is one of the best choices for something like this, though admittedly I don't have enough knowledge of it to correct anything in Violet's code.
|
Jun 22, 2010, 04:20 PM | |
To be fair, I've been programming with Multimedia Fusion/etc. for ~15 years, plus a vague understanding of Javascript/C-like-stuff and I've had some practice with Python doing Django over the last year or so, although that was all very specific stuff and I didn't know any of the basic concepts behind what I was doing.
Sometime between my executing it in the first place and now, I managed to introduce some sort of error into this such that it stops working after reading one blocks file. ![]() |
Jun 22, 2010, 08:09 PM | |
I'm not sure, I never have really worked with Python to do hard-code. However, in my experiences, Python has been very fussy with me. It's not very extensive, I've noticed. After working with Visual Basic, I've just found Python doesn't work with me in terms of object-oriented programming. Mostly because of the way it handles values (especially when it comes to floating points). You also can't define a function in a line, you have to give it a name. This always led me to have to go back and re-do my code, forgetting that all functions had to be defined before actually coding them. And don't mention lambda, that's just a shortcut...
I mean, all-in-all, perhaps I shouldn't have made that comment. These are my issues with Python. However, for what you're using it for, it should work out fine. But extensive programming, not exactly.
__________________
Yes, I am, in fact, ALWAYS the one to blame for everything. And none of your are full of yourself. Good job. Do you like Stijn? Take my poll! ![]() ![]() Windows is not a virus. A virus is small and efficient... Note to Stijn: how am i even getting away with this |
Jun 24, 2010, 12:36 PM | |
I don't think there is such a thing as an all-round best programming language, but there are definetely languages that are nicer to use than others and purposes where specific languages are the best.
Some examples: With VB when trying to make large complex programs you soon end up running into various limitations, but it's excellent for quick hacks and virtually impossible to shoot yourself in the foot with. On the other hand, C/C++ are incredibly powerful but have no end of ways to trip up even experienced programmers. On python: I've only used it a few times so I've not really explored it yet. I think my main gripes with it were the too-free coding style (I prefer languages where interfaces are solidly defined) and the quality of the API/library. On the whole, it's a nice scripting language but I'd hesitate before using it for a large project and I'm more likely to brew up something in VB if it's a small one-off or similar. |
![]() |
«
Previous Thread
|
Next Thread
»
Thread Tools | |
|
|
All times are GMT -8. The time now is 07:36 AM.
Jazz2Online © 1999-INFINITY (Site Credits). Jazz Jackrabbit, Jazz Jackrabbit 2, Jazz Jackrabbit Advance and all related trademarks and media are ™ and © Epic Games. Lori Jackrabbit is © Dean Dodrill. J2O development powered by Loops of Fury and Chemical Beats. Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Original site design by Ovi Demetrian. DrJones is the puppet master. Eat your lima beans, Johnny.