Yes... it's definitely possible.
You'll want to combine the following:
* Some way of looping over the files in that directory.
I would recommend using os.walk (new in Python 2.3).
For an example of using os.walk, see
http://www.python.org/doc/current/lib/os-file-dir.html
(bottom...
If you can create and post a "test case" - the simplest script you can get which still demonstrates the problem, then it'll be far easier to identify and fix the problem.
Yes, Python is alive and well, and has been adopted and supported by a number of large organizations. (Not that big organizations are more important, but they tend to calm fears that it's "just some hobbiest".) Here are a few links to convince you...
Can I using python execute more than one command with the shell?
Well, there's this:
os.system( "command_one" )
os.system( "command_two" )
which is easy, and works fine. But I presume you already thought of that. How to do multiple commands depends on what shell you...
I agree with sebsauvage... you need to learn something called "structured programming", which was invented in the 1960s. His links should be helpful.
To get you started, here's how I would write your second example in Python:
# This is the main loop. It runs forever
while True...
Ah... I'm not surprised to hear that "mv" was just an example. Fine... then you probably DO want to use os.popen(), and you certainly don't want to use idea (2). But my example of using Python's "%" operator to interpolate values into strings is probably what you're looking...
Three points:
(1) To make your above code work, you need to realize that the os.popen() function takes one argument, the string to be executed. (Actually, it takes 2 other optional arguments (type "help(os.popen)" for details), but you're not using those.) What you typed was...
AHA! SOLVED IT!
The solution was to do 3 things all while logged in as the user who "owns" the DB2 install.
(1) Install as that user.
(2) After the install, the very next login must be that user.
(3) The first time the WebSphere server service is started, the current user must be that...
> You can change the line:
>
> install.initial.config=true
> to:
> install.initial.config=false
Certainly a worthwhile experiment. Unfortunately, I just tried it and it didn't help. But I appreciate the assistance!
Ok, I really appreciate the help, but it doesn't look like this is my problem.
On Windows, the installer for WebSphere will install DB2 for you (that's one of the steps). There is a pair of settings in the WebSphere config file (C:\WebSphere\AppServer\bin\admin.config) which look like this...
Well, I am not an expert on getopt, but I did go in and peruse the source code, and I *think* it isn't possible to have a switch where the argument is optional. Sorry... that's the best I could do.
> Have you created your database?
Well, I'm not quite sure what you mean. I didn't actively do anything to "create the database", but I DID run the WebSphere installer (which also installed DB2). How do the database tables that WebSphere uses come into existance? Shouldn't WebSphere...
In my continued attempt to dribble out any bits of information that might be helpful, I tried following fearo's advice and running $WAS_HOME/bin/adminserver.bat instead of starting up the service. It still didn't work, but I got a slightly different error:
[02.10.10 15:37:04:477 EDT] 5573ea9d...
A few additional points I should have mentioned:
[li] I'm running on Win2000
[li] I DID successfully run C:\SQLLIB\java12\usejdbc2.bat before trying to start WebSphere.
[li] I DID create a separate user to be the "owner" under which DB2 and WebSphere ran. This user IS a member of the...
I perform a fresh install of WebSphere 4.0 AE on my machine (and it installs DB2 as part of that process). After the install, I attempt to start the "IBM WS AdminServer 4.0" I get an error in the tracefile specifying that:
[code]Failure to create a data source...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.