arguments (5,635)


python - Calling a function of a module by using its name(a string)

python - Calling a function of a module by using its name(a string)

What is the best way to go about calling a function given a string with the function's name in a Python program. For example, let's say that I have a module foo,and I have a string whose content is "b…


F# curried function

Anyone have a decent example, preferably practical/useful, they could post demonstrating the concept?…


ruby on rails - Ruby mixins and calling super methods

Ok, so I've been refactoring my code in my little Rails app in an effort to remove duplication, and in general make my life easier(as I like an easy life). Part of this refactoring, has been to mov…


JNI and Java: ant calling make or make calling ant?

I'm just about to make my first trip into the world of JNI(Java Native Interface) to provide file system change notifications from platform specific C/C++ code to Java. That is unless someone sugges…


linux - Bash Pipe Handling

Does anyone know how bash handles sending data through pipes? cat file.txt | tail-20 Does this command print all the contents of file.txt into a buffer, which is then read by tail? Or does this comm…



python - What's the best way to parse command line arguments?

What's the easiest,tersest,and most flexible method or library for parsing Python command line arguments?…


windows - How can I pass arguments to a batch file?

I need to pass an ID and a password to a batch file at the time of running rather than hardcoding them into the file. Here's what the command line looks like: test.cmd admin [email protected]>test-log.txt…


java - Best Apache Ant Template

Every time I create a new project I copy the last project's ant file to the new one and make the appropriate changes(trying at the same time to make it more flexible for the next project). But since…


XNA Unit Testing

So I'm interested in hearing different thoughts about what is the best way to go about unit testing XNA Game/Applications. Astute googlers can probably figure out why I'm asking, but I didn't want t…


How do you generate dynamic(parametrized) unit tests in python?

I have some kind of test data and want to create a unit test for each item. My first idea was to do it like this: import unittest l=[["foo", "a", "a",],["bar", "a", "b"],["lee", "b", "b"]] class…




with function example python command multiple how pass line parameters