Cross Platform System Commands - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Tools & Technology (/forum-10.html)
+--- Thread: Cross Platform System Commands (/thread-2761.html)
Cross Platform System Commands - wyrmmage - Feb 22, 2008 09:24 PM
I'm planning on writing some tools to help out the other people on my team, and I want them to be cross platform if at all possible
Therefore, I need a cross-platform library that lets me do things with files and programs. Basically, I need to be able to check what the last modified date is on a file and the file's size (maybe). I'd also like to be able to just issue a command and have the file deleted, or copied to another directory, instead of reading the entire file into a buffer and then writing the buffer out to a file in the desired directory.
I also need to be able to invoke a program and pass it parameters (for example, 'converter.app -someFile.wrl').
Does anyone know of a free library that would allow me to do these things, or do I just need to buckle down and write system-dependent code?
Cross Platform System Commands - OneSadCookie - Feb 22, 2008 10:01 PM
If you write in Ruby, for example, then you don't have a problem at all -- these functions are all available in the standard library.
What language were you planning on using, and why?
Cross Platform System Commands - wyrmmage - Feb 22, 2008 11:37 PM
I actually hadn't picked a language for the project, so Ruby would probably be fine, although I've never used it. Does Java have commands to do that sort of thing? It seems like it would, and even though I've never liked Java, I could probably bear using it for this project if it simplified things.
I just realized Python probably has something like this, and I already know python. Does it? If so, could someone perhaps point me in the direction of what commands I would use so I can go about googling them for more info?
I'm also going to be parsing the information I get from the file (I'm reading in .wrl files and transferring them into my own file format, as part of the tool), so perhaps there is a language that is both good for this and also good for the file manipulating commands?
Thanks for the help so far
What language would you recommend?
BTW: congrats on 4300 posts
Cross Platform System Commands - OneSadCookie - Feb 23, 2008 12:58 AM
I'm not hugely familiar with Python, so not entirely sure what it provides. I'd be surprised if it didn't do what you need, though.
Since VRML is a text format, you'll want to use a language which makes parsing it simple. Haskell might actually not be a bad idea, though you probably didn't have that much learning in mind. Ruby comes with a parser generator (racc or something) too. Dunno what Python has.
Cross Platform System Commands - stevejohnson - Feb 23, 2008 11:05 AM
Python, Ruby, and Java all do what you want. So does BlitzMax, but you probably don't want to bother with that. Also Perl.
Cross Platform System Commands - wyrmmage - Feb 23, 2008 03:58 PM
thanks for all of the info, everyone
I've decided to attempt writing the program in Haskell, since OSC keeps recommending it in various posts around here, and I haven't learned a new language in several months
From reading over some tutorials I found, the language looks.....tricky...to say the least, so you'll probably be seeing some posts asking for help on it
Again, thanks for the help guys.