Recommend me a scripting language
Recommend me a scripting language
Currently I'm using MS batch scripts for almost everything and AutoHotKey when I need something more advanced (i.e. maths ).
However, I'm dealing more and more with Unicode file names and these languages don't support them. Using short names sometimes helps, but sometimes it doesn't and it's not always feasible anyway.
So I'm looking for a language:
-with Unicode support
-portable
-standalone, no need to run apache in background etc.
TIA for your help.
However, I'm dealing more and more with Unicode file names and these languages don't support them. Using short names sometimes helps, but sometimes it doesn't and it's not always feasible anyway.
So I'm looking for a language:
-with Unicode support
-portable
-standalone, no need to run apache in background etc.
TIA for your help.
Re: Recommend me a scripting language
AutoIt is a natural candidate if you used AutoHotkey. AutoHotkey really needs to support unicode soon if it want to stay a viable choice.
Re: Recommend me a scripting language
Great answer, thanksinfimum wrote:AutoIt is a natural candidate if you used AutoHotkey. AutoHotkey really needs to support unicode soon if it want to stay a viable choice.
ADDED: Though some higher level language would be better
-
- Posts: 21
- Joined: Thu Jun 19, 2008 8:33 am
- Location: Philadelphia area
Re: Recommend me a scripting language
AutoIt will do what you're asking for.
If you decide to kick it up to the next level, Python is the ultimate portable solution. Furthermore, the Movable Python implementation is built by Michael Foord such that the development environment is kept on the jump drive too. Python has no real boundaries of any kind and is easy to learn. You may want to scope it out at http://www.voidspace.org.uk/python/movpy/ It comes with a great IDE. Once you make the decision to learn it, it is amazing how powerful and versatile it is. It integrates with AutoIt too. It is a brilliantly written language. If you're not familiar with it, it is known as a scripting language because of how tight your code is and that it is natively interpreted, but it can be compiled if you like. It is a full, object oriented programming facility.
If you decide to kick it up to the next level, Python is the ultimate portable solution. Furthermore, the Movable Python implementation is built by Michael Foord such that the development environment is kept on the jump drive too. Python has no real boundaries of any kind and is easy to learn. You may want to scope it out at http://www.voidspace.org.uk/python/movpy/ It comes with a great IDE. Once you make the decision to learn it, it is amazing how powerful and versatile it is. It integrates with AutoIt too. It is a brilliantly written language. If you're not familiar with it, it is known as a scripting language because of how tight your code is and that it is natively interpreted, but it can be compiled if you like. It is a full, object oriented programming facility.
Re: Recommend me a scripting language
I wanted to learn Python, because I read a lot of good things about it. But I lacked motivation.fpelletier wrote:AutoIt will do what you're asking for.
If you decide to kick it up to the next level, Python is the ultimate portable solution. Furthermore, the Movable Python implementation is built by Michael Foord such that the development environment is kept on the jump drive too. Python has no real boundaries of any kind and is easy to learn. You may want to scope it out at http://www.voidspace.org.uk/python/movpy/ It comes with a great IDE. Once you make the decision to learn it, it is amazing how powerful and versatile it is. It integrates with AutoIt too. It is a brilliantly written language. If you're not familiar with it, it is known as a scripting language because of how tight your code is and that it is natively interpreted, but it can be compiled if you like. It is a full, object oriented programming facility.
Now I downloaded movpy, managed to install and run it, learning language starts tomorrow.
BTW IDE sucks IMO, I'll use my text editor.
Re: Recommend me a scripting language
i dont know how to use these but i've heard good things about ruby http://www.ruby-lang.org/ and google's Go http://golang.org/
Re: Recommend me a scripting language
Thank you too.-.- wrote:i dont know how to use these but i've heard good things about ruby http://www.ruby-lang.org/ and google's Go http://golang.org/
I'll see Python and if it doesn't work the way I want, I'll try Ruby too.
Google is a no-go for me.
-
- Posts: 21
- Joined: Thu Jun 19, 2008 8:33 am
- Location: Philadelphia area
Re: Recommend me a scripting language
m^(2), did you try the Stani editor (SPE)? Actually, movepy comes with three editors, SPE, Idle, and Pythonwin. Idle is a command line editor for lack of a better description. Pythonwin and SPE are both graphical IDEs. Pythonwin is a text editor with a few conveniences. SPE is the most robust IDE that I have found that is not a commercial product. It is geared exclusively for Python coding. It never occured to me to offer Movepy up as a candidate for this website, but it is completely self-contained and portable.
Try this, run movepyw.exe--this will run a launcher. From the menubar, choose configure-> Quick Launch. Fill out the dialog box for button 1 as, Name: SPE IDE, File: lib/_spe/SPE.pyw, make sure "b" is checked, and Console is On, and then OK. Now click on button 1. SPE should launch after a momentary black window. Until you set up Python, you should do it this way as it was written in python and runs through it.
Hey, one other thought, have you researched PowerBatch? It is the new batch language from Microsoft. It too is fully capable now. It has a greater learning curve, but it is an option for those with Vista or Windows 7 as it comes native with those O/Ss. It is also object oriented now and .NET aware so it understands the namespace architecture. Consider the great tools that Nir Soffer creates. I believe he is writing with .NET C#, LINQ and WMI. PowerBatch and Python can make use of LINQ and WMI too.
Last, if you try Python and want to dabble in it, Microsoft now supports Python, as much as it resisted for so long, by creating a version called IronPython which now uses the CLR and a new DLR (dynamic language runtime). Microsoft even has provided a free editor for developing in IronPython. I throw these out there so you are aware of them and can research them in your own time.
Try this, run movepyw.exe--this will run a launcher. From the menubar, choose configure-> Quick Launch. Fill out the dialog box for button 1 as, Name: SPE IDE, File: lib/_spe/SPE.pyw, make sure "b" is checked, and Console is On, and then OK. Now click on button 1. SPE should launch after a momentary black window. Until you set up Python, you should do it this way as it was written in python and runs through it.
Hey, one other thought, have you researched PowerBatch? It is the new batch language from Microsoft. It too is fully capable now. It has a greater learning curve, but it is an option for those with Vista or Windows 7 as it comes native with those O/Ss. It is also object oriented now and .NET aware so it understands the namespace architecture. Consider the great tools that Nir Soffer creates. I believe he is writing with .NET C#, LINQ and WMI. PowerBatch and Python can make use of LINQ and WMI too.
Last, if you try Python and want to dabble in it, Microsoft now supports Python, as much as it resisted for so long, by creating a version called IronPython which now uses the CLR and a new DLR (dynamic language runtime). Microsoft even has provided a free editor for developing in IronPython. I throw these out there so you are aware of them and can research them in your own time.
Re: Recommend me a scripting language
I already have a batch that starts movepy(w) with IDE, w/out showing the dialog (which I see no use for)...though I don't think I'll be using it anyway, since Programmer's Notepad works very well.fpelletier wrote:m^(2), did you try the Stani editor (SPE)? Actually, movepy comes with three editors, SPE, Idle, and Pythonwin. Idle is a command line editor for lack of a better description. Pythonwin and SPE are both graphical IDEs. Pythonwin is a text editor with a few conveniences. SPE is the most robust IDE that I have found that is not a commercial product. It is geared exclusively for Python coding. It never occured to me to offer Movepy up as a candidate for this website, but it is completely self-contained and portable.
Try this, run movepyw.exe--this will run a launcher. From the menubar, choose configure-> Quick Launch. Fill out the dialog box for button 1 as, Name: SPE IDE, File: lib/_spe/SPE.pyw, make sure "b" is checked, and Console is On, and then OK. Now click on button 1. SPE should launch after a momentary black window. Until you set up Python, you should do it this way as it was written in python and runs through it.
I just went to try SPE, but I already went through size optimizations and wxPython is out, I won't bother since I already have a good solution.
I've been thinking about PowerBatch, but I really, really dislike .NET. Since there are alternatives, I'm not going to use it anytime soon.fpelletier wrote:Hey, one other thought, have you researched PowerBatch? It is the new batch language from Microsoft. It too is fully capable now. It has a greater learning curve, but it is an option for those with Vista or Windows 7 as it comes native with those O/Ss. It is also object oriented now and .NET aware so it understands the namespace architecture. Consider the great tools that Nir Soffer creates. I believe he is writing with .NET C#, LINQ and WMI. PowerBatch and Python can make use of LINQ and WMI too.
Last, if you try Python and want to dabble in it, Microsoft now supports Python, as much as it resisted for so long, by creating a version called IronPython which now uses the CLR and a new DLR (dynamic language runtime). Microsoft even has provided a free editor for developing in IronPython. I throw these out there so you are aware of them and can research them in your own time.
Thanks for your input!
Re: Recommend me a scripting language
I'm currently rewriting a script to Python...and have a major issue.
It does a lot of file work...and a lot of this work fails.
On every failed operation Python throws an exception, so my code looks almost like:
I could rewrite it to something like:
But it's still no joy, cleaner, but may crash when something unexpected happens, not to say that it takes more work.
Can't I just tell Python to ignore the exceptions and proceed?
EDIT:
One more way, I'm using it for now:
Still no good, but better than the ones before.
It does a lot of file work...and a lot of this work fails.
On every failed operation Python throws an exception, so my code looks almost like:
Code: Select all
try:
call os function
except:
pass
try:
call os function
except:
pass
(...)
Code: Select all
if something:
call os function
if something:
call os function
Can't I just tell Python to ignore the exceptions and proceed?
EDIT:
One more way, I'm using it for now:
Code: Select all
def noE(x):
try:
x
except:
pass
-
- Posts: 21
- Joined: Thu Jun 19, 2008 8:33 am
- Location: Philadelphia area
Re: Recommend me a scripting language
m^(2),
Given this scenario, it appears that you are on the right track. I don't see a more elegant solution.
Given this scenario, it appears that you are on the right track. I don't see a more elegant solution.
Re: Recommend me a scripting language
At 3AM noE seemed to work, but now it doesn't.
I left it with those try-except blocks...
Anyway, I'm done with porting my first script. It grew from 4.2 to 5.2 KB in this transition, mostly because of exception handling, more complicated piping and more white spaces ...so overall about the same as batch.
I have to say that for now I'm somewhat disappointed with Python...I expected it to be more productive with what I'm doing and standard library is extremely messy.
I'll continue to learn it though, it should be better with bigger things.
I left it with those try-except blocks...
Anyway, I'm done with porting my first script. It grew from 4.2 to 5.2 KB in this transition, mostly because of exception handling, more complicated piping and more white spaces ...so overall about the same as batch.
I have to say that for now I'm somewhat disappointed with Python...I expected it to be more productive with what I'm doing and standard library is extremely messy.
I'll continue to learn it though, it should be better with bigger things.