The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> Python Programming
|
Manipulating files in Production?
Discuss Manipulating files in Production? in the Python Programming forum on Dev Shed. Manipulating files in Production? Python Programming forum discussing coding techniques, tips and tricks, and Zope related information. Python was designed from the ground up to be a completely object-oriented programming language.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

May 10th, 2004, 01:17 PM
|
|
Contributing User
|
|
Join Date: Aug 2003
Posts: 72
Time spent in forums: 2 h 47 m 23 sec
Reputation Power: 10
|
|
|
Manipulating files in Production?
Hello,
I need to create a script with which i would be able to access and manipulate files from my desktop to production servers. Right now I access those files by connecting to production thrue DameWare. How would you write this script to login thrue Dameware? installing python in production is out of the question. Any help would be great.
Thanks
Random
|

May 10th, 2004, 04:21 PM
|
|
Contributing User
|
|
Join Date: Dec 2001
Location: Houston, TX
Posts: 383
Time spent in forums: 1 h 41 m 27 sec
Reputation Power: 12
|
|
|
One question - what is dameware?
|

May 10th, 2004, 04:25 PM
|
|
Contributing User
|
|
Join Date: Aug 2003
Posts: 72
Time spent in forums: 2 h 47 m 23 sec
Reputation Power: 10
|
|
|
To quote from the website "http://www.dameware.com/"
Microsoft Windows NT administration utilities incorporating a centralized interface for remote management of Windows NT/2000/XP/2003 Servers and Workstations.
Thanks for any help.
Random
|

May 10th, 2004, 05:10 PM
|
|
Contributing User
|
|
Join Date: Feb 2004
Location: London, England
|
|
I have never heard of dameware, so the following is pure speculation.
If you normally interact with dameware through a command-line program then you should be able to call the client using the system function, or a pipe. This will work fine if you just need to run a single command and capture the output.
However if you need to be more interactive then you need something like expect. Pexpect ( http://pexpect.sourceforge.net) is a pure Python port of expect, but the Windows version needs to be run under cygwin. There are other Python versions of expect that may work better on native Windows, so do a search on google.
If dameware has a C API then you could wrap it with SWIG to create a dameware python module, if this has not been done already. I did a cursory google search for "dameware and python" but it did not throw up any obvious candidates.
If there is only a GUI client to dameware then you are on your own. It is possible to control a Windows GUI with Python, but it is not for the faint hearted.
Dave - The Developers' Coach
|

May 10th, 2004, 08:49 PM
|
|
Contributing User
|
|
Join Date: Aug 2003
Posts: 72
Time spent in forums: 2 h 47 m 23 sec
Reputation Power: 10
|
|
|
Thank you for replies. I guess it's not that simple.
Random
|

May 11th, 2004, 02:24 AM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
Quote: | Originally Posted by Random installing python in production is out of the question. |
That line kinda through me  . You want a solusion in Python but dont want to install it? Little lost sorry  .
Edit: looked at the pexpect page and it looks very intersting! If it works then it should be able to do some if not all of what you want (i got the impression this is a GUI were talking about). Anyway looks fun
Good luck with the project anyway,
Mark.
__________________
programming language development: www.netytan.com – Hula
Last edited by netytan : May 11th, 2004 at 02:29 AM.
|

May 11th, 2004, 03:13 AM
|
|
|
There's no way I would try to use Python to control Dameware. Maybe, just maybe, to trigger a connection for me to use.
Editing files through Dameware with Python?
Can you mount the folders on the server as a local drive?
Code:
c:\> net use t: \\server\c$\files\stuff
Then just work with Python as if they were local files on the t: drive?
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|