Step 1: Analyze the function \( f(x) \).
The function \( f(x) = (\sin x)^{\pi} - \pi \sin x + \pi \) involves the sine function raised to a power and also includes linear and constant terms. We need to examine its behavior over the interval \( (0, \frac{\pi}{2}) \).
Step 2: Check the behavior of \( f(x) \) in \( (0, \frac{\pi}{2}) \).
For \( x \in (0, \frac{\pi}{2}) \), \( \sin x \) increases from 0 to 1, and the term \( (\sin x)^{\pi} \) is a concave increasing function. However, the term \( -\pi \sin x \) will decrease, and the constant term \( \pi \) will slightly counteract this behavior. Specifically, for small \( x \), \( f(x) \) will be negative.
Step 3: Conclusion.
Thus, \( f(x)<0 \) for some values of \( x \in (0, \frac{\pi}{2}) \), so the correct answer is \( \boxed{(D)} \).