Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Calling exe on network drive
Post: RE: Calling exe on network drive

(Jan-21-2022, 11:23 AM)ibreeden Wrote: That is a pity. I am not sure but could it be you are executing your script with pythonW.exe? This is a version without terminal window and so without stdin, s...
GrahamL General Coding Help 4 2,559 Jan-21-2022, 12:01 PM
    Thread: Calling exe on network drive
Post: RE: Calling exe on network drive

(Jan-21-2022, 09:04 AM)ibreeden Wrote: Try this: d = r"x:\RequirmentsEditorInstall.exe" Unfortunately I get the same result
GrahamL General Coding Help 4 2,559 Jan-21-2022, 09:50 AM
    Thread: Calling exe on network drive
Post: Calling exe on network drive

Hi I am trying to call an exe on a network drive d = "x:\\\RequirmentsEditorInstall.exe" subprocess.run([d, '/silent', ])When this runs I get the following Tr...
GrahamL General Coding Help 4 2,559 Jan-20-2022, 03:33 PM
    Thread: add Escape charcters in string
Post: RE: add Escape charcters in string

Thanks for the replies I now have the correct string (I think) But when run as part of an Azure Devops pipeline I get permission denied when calling subprocess? Here is my code programFi...
GrahamL General Coding Help 3 1,185 Jan-20-2022, 01:15 PM
    Thread: add Escape charcters in string
Post: add Escape charcters in string

Hi I am trying to call an application from a python script in an Azure Devops pipeline I build a string to the app path cmd = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\...
GrahamL General Coding Help 3 1,185 Jan-20-2022, 10:45 AM
    Thread: Finding files matching pattern
Post: Finding files matching pattern

Hi From a given folder I want to find all files matching this pattern *Tests.dll In addition these files must be in a directory called Release In my directory tree there are also folders called Releas...
GrahamL General Coding Help 1 1,297 Jan-14-2022, 11:03 AM
    Thread: gettin flask to call script periodically
Post: gettin flask to call script periodically

As in the title I want a script to get called periodically I have this script at the bottom of an html file <script> setInterval("ajaxd()",1000); function ajaxd() { $(...
GrahamL Web Scraping & Web Development 1 2,234 Jan-08-2021, 01:51 PM
    Thread: Reload flask current page
Post: RE: Reload flask current page

(Jan-08-2021, 08:19 AM)kashcode Wrote: I suggest reload some page parts with ajax call to backed, this call to backed can be with some interval. function fetchdata(){ $.ajax({ url: 'fetch_detail...
GrahamL Web Scraping & Web Development 2 5,150 Jan-08-2021, 08:31 AM
    Thread: Reload flask current page
Post: Reload flask current page

Hi I am developing a Flask app that communicates with a back end via pipes. I need to reload the current page of the Flask app when an update is received from the back end, but cannot see how to do t...
GrahamL Web Scraping & Web Development 2 5,150 Jan-08-2021, 08:03 AM
    Thread: All pipe instances are busy
Post: All pipe instances are busy

Hi I am trying to use pipes to communicate between 2 python apps On the server side I create a named pipe self.server_pipe = win32pipe.CreateNamedPipe(r'\\.\pipe\DataUpdate', ...
GrahamL Networking 0 3,041 Jan-07-2021, 12:05 PM
    Thread: Duplex pipes
Post: Duplex pipes

Hi I have created to projects for a client and server user named pipes by following the code here Server and Client Everything works correctly But I need full duplex so either side can read and write...
GrahamL General Coding Help 0 1,769 Dec-16-2020, 09:44 AM
    Thread: finding and deleting json object
Post: finding and deleting json object

Hi I have this JSON- { "ticker_tape_1": [ { "id": 1, "Title": "Message 1", "txt": "This is message 1", "start_date": "01/04/2020", ...
GrahamL General Coding Help 1 4,853 Dec-10-2020, 03:09 PM
    Thread: bytes to json
Post: RE: bytes to json

That was it - thanks
GrahamL General Coding Help 9 3,238 Dec-04-2020, 12:13 PM
    Thread: bytes to json
Post: RE: bytes to json

Here is my sending code s = '{"success": "true", "status": 200, "message": "Hello"}' win32file.WriteFile(handle, str.encode(json.dumps(s)))
GrahamL General Coding Help 9 3,238 Dec-04-2020, 11:59 AM
    Thread: bytes to json
Post: RE: bytes to json

How can access the result as a json object result, data = win32file.ReadFile(p, 65535) json_data = json.loads(data) print(json_data['success']) - This gives TypeError: string indices must be integer...
GrahamL General Coding Help 9 3,238 Dec-04-2020, 11:22 AM
    Thread: bytes to json
Post: RE: bytes to json

Hi Yes this works, but I am reading from a pipe using result, data = win32file.ReadFile(p, 65535)This gives me the string b'"{\\"success\\": \\"true\\", \\"status\\": 200, \\"message\\": \\"Hello\\"}...
GrahamL General Coding Help 9 3,238 Dec-04-2020, 10:44 AM
    Thread: bytes to json
Post: RE: bytes to json

I still get TypeError: string indices must be integers
GrahamL General Coding Help 9 3,238 Dec-04-2020, 09:53 AM
    Thread: bytes to json
Post: bytes to json

Hi I am trying to send json data over a pipe but cannot get it quite right Send mesages = [{"id": "1", "txt": "message 1", "start_date": "2014-02-09", "start_time": "16:20", "duration": "01:00"}] ...
GrahamL General Coding Help 9 3,238 Dec-04-2020, 09:07 AM
    Thread: IPC on windows
Post: IPC on windows

Hi I have 2 Python programs that need 2 way communication on Windows 10 What is the recommended way of doing this - I can find some Unix based examples but not for Windows Thanks
GrahamL Networking 0 2,014 Dec-02-2020, 09:56 AM
    Thread: Shceduling jobs
Post: Shceduling jobs

Hi I need to run some tasks for different periods and to be able to detect when the job has finished. I have seen a few libraries but wondered which is the best way to achieve this. Some guidance wou...
GrahamL General Coding Help 2 1,652 Nov-30-2020, 12:23 PM

User Panel Messages

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