Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. mcherm

    delete all files in a dir created last week

    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...
  2. mcherm

    Problem Opening File

    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.
  3. mcherm

    Newbie: Is Python well supported (looking into future)

    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...
  4. mcherm

    execute unix shell command with python

    No problem! Next time it'll probably be me with a question YOU have the answer to. These things come around. -- Michael Chermside
  5. mcherm

    execute unix shell command with python

    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...
  6. mcherm

    goto

    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...
  7. mcherm

    execute unix shell command with python

    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...
  8. mcherm

    execute unix shell command with python

    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...
  9. mcherm

    execute unix shell command with python

    Here's an example: import os os.system("rm badfile.txt") If you need to see the output from your command, try using the os.popen functions.
  10. mcherm

    New WebSphere install gives errors connecting to DB2

    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...
  11. mcherm

    New WebSphere install gives errors connecting to DB2

    > 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!
  12. mcherm

    New WebSphere install gives errors connecting to DB2

    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...
  13. mcherm

    getopt - won't allow an option to have param, or NOT have param

    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.
  14. mcherm

    New WebSphere install gives errors connecting to DB2

    > 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...
  15. mcherm

    New WebSphere install gives errors connecting to DB2

    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...
  16. mcherm

    New WebSphere install gives errors connecting to DB2

    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...
  17. mcherm

    New WebSphere install gives errors connecting to DB2

    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...

Part and Inventory Search

Back
Top