Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: need to skip password prompt, continue...
Post: RE: need to skip password prompt, continue...

You are DA MAN bowlofred! it works great now!!! I do not know where you found it - 'badpassword /PERSISTENT:NO' I was searching the net for more than a day... Thank you!
tester_V General Coding Help 2 159 Oct-19-2021, 05:49 PM
    Thread: need to skip password prompt, continue...
Post: need to skip password prompt, continue...

Good morning! I'm scanning a list of hosts to see a host has a specific directory and if not "continue' to the next host. I thought I would use try/except but it did not work if the host asked for a p...
tester_V General Coding Help 2 159 Oct-19-2021, 04:13 PM
    Thread: time function does not work
Post: RE: time function does not work

Tanks snippsat! I have never about "oguru an dlogger", it might be very useful too..
tester_V General Coding Help 4 265 Oct-17-2021, 05:48 PM
    Thread: time function does not work
Post: RE: time function does not work

Thank you buran! I do not know why I did not see it myself... Thank you for the coaching!
tester_V General Coding Help 4 265 Oct-16-2021, 07:19 AM
    Thread: time function does not work
Post: time function does not work

Greetings! I'm trying to use 'functions in my code. I want to add a timestamp for each different operation my code executes. I made a function and I thought each time I'll call it I'll get a differe...
tester_V General Coding Help 4 265 Oct-16-2021, 02:20 AM
    Thread: Problem executing a script on a remote host
Post: RE: Problem executing a script on a remote host

Update. Here is a file I'm trying to execute remotely. It runs fine, no errors if executed manually, no errors. but if called remotely it does nothing. **sad** I'm not sure how to debug it. **cry** ...
tester_V General Coding Help 3 273 Sep-26-2021, 04:25 AM
    Thread: Problem executing a script on a remote host
Post: RE: Problem executing a script on a remote host

Update. found why I had an error when creating a process. The script was missing the Python directory. Also added 'process terminate' to the script. But still the same problem. When Python script is ...
tester_V General Coding Help 3 273 Sep-25-2021, 07:45 AM
    Thread: Problem executing a script on a remote host
Post: RE: Problem executing a script on a remote host

I found a different script online to 'remote' to a host. it is better. import wmi, time ip = 'xx.xx.xx.xxx' username = "user" password = "password!" SW_SHOWNORMAL = 1 from socket import * print ("Esta...
tester_V General Coding Help 3 273 Sep-24-2021, 06:26 PM
    Thread: Problem executing a script on a remote host
Post: Problem executing a script on a remote host

Greetings! I have a remote host(windows) and a system(windows based) connected to it by a private network. The host has Python 27 on it. Once a day a Python script runs (scheduled run) on it, It is m...
tester_V General Coding Help 3 273 Sep-24-2021, 04:57 AM
    Thread: Have to use Python 2.x to find "yesterday' files
Post: RE: Have to use Python 2.x to find "yesterday' fil...

You are correct! The file name inconsistency is just a typo... I also do not have much skills in programming.... I thought I will get the real dates from all files that have 'Monitor.' in names by u...
tester_V General Coding Help 6 382 Sep-19-2021, 12:26 AM
    Thread: Have to use Python 2.x to find "yesterday' files
Post: RE: Have to use Python 2.x to find "yesterday' fil...

My bad! Sorry for the confusion! The Second snipped I posted works fine, I just do not have a "yesterday' "file in the directory. Sorry again! I really appreciate your help and the coaching that is ...
tester_V General Coding Help 6 382 Sep-18-2021, 09:13 PM
    Thread: Have to use Python 2.x to find "yesterday' files
Post: RE: Have to use Python 2.x to find "yesterday' fil...

Dead_EyE, that is a great snippet you are sharing, thank you! I think I will end up using it as is. Still would like to fix my own code, I made changes to it... it still does not work, for some reas...
tester_V General Coding Help 6 382 Sep-18-2021, 09:03 PM
    Thread: Have to use Python 2.x to find "yesterday' files
Post: Have to use Python 2.x to find "yesterday' files

Greetings! I'm trying to identify (and later copy) some files, the problem is the systems I must use have only Python 2.7 installed. I managed to get the timestamp of the files I'm scanning and the 'y...
tester_V General Coding Help 6 382 Sep-18-2021, 02:28 AM
    Thread: continue if 'subprocess.call' failes
Post: RE: continue if 'subprocess.call' failes

I changed 'capture_output=False': 'subprocess.run("net use U: "+"\\\\"+itm+"\\c$\\SMTS\\TDR_Logs", shell=True, timeout=2, capture_output=False)'and removed 'break' except subprocess.TimeoutExpired: ...
tester_V General Coding Help 11 643 Aug-26-2021, 12:16 AM
    Thread: continue if 'subprocess.call' failes
Post: RE: continue if 'subprocess.call' failes

I do not want to overuse my welcome but it seems the code still hangs up if encounter a 'bad' host. I waited for a 20sec or mote and then hit 'enter' after that it prints out: 'Server 'Someserver' too...
tester_V General Coding Help 11 643 Aug-26-2021, 12:09 AM
    Thread: continue if 'subprocess.call' failes
Post: RE: continue if 'subprocess.call' failes

Now it is a different error and it is complaining about the "capture_output)" Error: AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 349, in call with Popen(*popenargs, **kwargs) ...
tester_V General Coding Help 11 643 Aug-25-2021, 10:51 PM
    Thread: continue if 'subprocess.call' failes
Post: RE: continue if 'subprocess.call' failes

I just tried: subprocess.call("net use U: "+"\\\\"+itm+"\\c$\\SMTS\\TDR_Logs", shell=True, timeout=10)it still asks for the "The password is invalid for" Then produces errors and exits. Last error: ...
tester_V General Coding Help 11 643 Aug-25-2021, 10:32 PM
    Thread: continue if 'subprocess.call' failes
Post: RE: continue if 'subprocess.call' failes

I'm not sure if it is the right way to write the code but It does work. I tried your suggestion: subprocess.call(["net", "use", "U:", "/delete", "/yes"])It works too but I still have the same messag...
tester_V General Coding Help 11 643 Aug-25-2021, 09:53 PM
    Thread: continue if 'subprocess.call' failes
Post: continue if 'subprocess.call' failes

Hello! I'm pulling out logs from remote hosts to my server for processing. The server has a faceless account and all the Hosts have it added as an admin(admin group). Sometimes, a new Host has a bad c...
tester_V General Coding Help 11 643 Aug-25-2021, 08:56 PM
    Thread: Still do not get how Python iterates over a file
Post: RE: Still do not get how Python iterates over a fi...

Well, I hope someday I'll be able to do the same you do... Thank you again! I really appriciate it!
tester_V General Coding Help 13 938 Aug-22-2021, 05:27 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020