Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Run multiple process using subprocess
Post: RE: Run multiple process using subprocess

(Nov-24-2021, 08:19 PM)Shiri Wrote: This part I got Thanks , but my doubt is in the if condition where both the scripts use different process name (process1.py searches for the process name and kill...
ghoul General Coding Help 3 3,918 Nov-28-2021, 10:58 AM
    Thread: Problem with input after function
Post: RE: Problem with input after function

(Nov-28-2021, 12:19 AM)luilong Wrote: keyboard.add_hotkey('enter', intro_menu_key_enter) What exactly are you trying to do? Do you really need the above?
ghoul General Coding Help 10 4,164 Nov-28-2021, 10:52 AM
    Thread: Programming as a not so smart guy
Post: RE: Programming as a not so smart guy

Personally, I find it that the more experienced someone is, the better they are at programming. And, well, this is probably assuming average intelligence.
ghoul Bar 1 1,842 Nov-27-2021, 02:05 PM
    Thread: Preparing an Installation with Python
Post: RE: Preparing an Installation with Python

(Nov-27-2021, 01:12 PM)JgKSuperstar Wrote: Hi, I want to create a project in python and I want to make money from this project I am creating. The question I'm going to ask is; I don't want the custo...
ghoul News and Discussions 2 2,683 Nov-27-2021, 01:56 PM
    Thread: Django __init__() got an unexpected keyword argument 'any'
Post: RE: Django __init__() got an unexpected keyword ar...

You probably meant to pass 'many' and not 'any' to the serializer. class UserList(APIView): def get(self, request, format=None, users=None): users = CustomUser.objects.all() seria...
ghoul Web Scraping & Web Development 2 5,610 Nov-26-2021, 05:34 PM
    Thread: Web Scraper with BeautifulSoup4 sometimes no Output
Post: RE: Web Scraper with BeautifulSoup4 sometimes no O...

Well, for me it does not seem to work at all. **dodgy**
ghoul General Coding Help 2 1,974 Nov-26-2021, 11:37 AM
    Thread: Run multiple process using subprocess
Post: RE: Run multiple process using subprocess

(Nov-24-2021, 02:23 PM)Shiri Wrote: How do I run my script proces1.py and process2.py into a single script to check if both the process are running and if so kill and restart the process again(I am ...
ghoul General Coding Help 3 3,918 Nov-24-2021, 04:05 PM
    Thread: How to run a particular file in subprocess
Post: RE: How to run a particular file in subprocess

(Nov-24-2021, 09:12 AM)Shiri Wrote: Thank you on the feedback, a quick question how can I run multiple process (want to run simultaneously by passing arguments) using the subprocess.call ? You might...
ghoul General Coding Help 5 1,808 Nov-24-2021, 09:29 AM
    Thread: How to run a particular file in subprocess
Post: RE: How to run a particular file in subprocess

(Nov-24-2021, 08:42 AM)Shiri Wrote: I tried to add something like this for above script .Does this make sense to call sys.argv inside subprocess.call time.sleep(5) cmd='python /Desktop/Test/Script/...
ghoul General Coding Help 5 1,808 Nov-24-2021, 08:58 AM
    Thread: How to run a particular file in subprocess
Post: RE: How to run a particular file in subprocess

(Nov-23-2021, 02:45 PM)Shiri Wrote: I am trying to check if the process is running by giving the process name and if there i am trying to kill and i want to restart the process again. So inside subp...
ghoul General Coding Help 5 1,808 Nov-24-2021, 08:25 AM
    Thread: simple task in python
Post: RE: simple task in python

(Nov-22-2021, 06:15 PM)Rapito Wrote: Write a program that takes input of 8 numbers from the keyboard, and adds them to a list. The screen displays their sum, the maximum and minimum of them. Sort th...
ghoul Homework 4 2,234 Nov-22-2021, 06:22 PM
    Thread: Catching a crash within a library code
Post: RE: Catching a crash within a library code

Now this thread makes me wonder whether it would be possible to catch an exception if the library code does not propagate it.
ghoul General Coding Help 9 3,250 Nov-22-2021, 10:08 AM
    Thread: Convert string to path using Python 2.7
Post: RE: Convert string to path using Python 2.7

(Nov-20-2021, 08:51 AM)Gribouillis Wrote: Also, what is this PC where you can't install Python 3? Get a new one. Python 3 has been around since 2009, and producing Python 2 code is just a waste of t...
ghoul General Coding Help 10 6,572 Nov-20-2021, 09:25 AM
    Thread: creating two points (x,y) and adding them together..
Post: RE: creating two points (x,y) and adding them toge...

You probably want this to create the points: def createPoints(): x1 = int(input ('Enter a value x of point a ')) y1 = int(input ('Enter a value y of point a ')) x2 = int(input ('Enter a v...
ghoul General Coding Help 2 3,235 Nov-20-2021, 07:22 AM
    Thread: printing a string in reverse
Post: RE: printing a string in reverse

(Nov-20-2021, 12:54 AM)bowlofred Wrote: If it's a string, then you can create a reversed string by slicing with a -1 step.. >>> x = "foobar" >>> print(x[::-1]) raboof That looks s...
ghoul General Coding Help 2 1,581 Nov-20-2021, 05:08 AM
    Thread: Debian 10 Buster Environment - Python 3.x (MariaDB 10.4.21) | Working Connector?
Post: RE: Debian 10 Buster Environment - Python 3.x (Mar...

(Nov-20-2021, 03:57 AM)BrandonKastning Wrote: Is this the correct output for a working MySQL connector within Python 3.9.9? brandon@FireDragon:~/Python/sgml.bs4$ python w3.mysql.python.connector.py...
ghoul Web Scraping & Web Development 9 4,391 Nov-20-2021, 04:55 AM
    Thread: Debian 10 Buster Environment - Python 3.x (MariaDB 10.4.21) | Working Connector?
Post: RE: Debian 10 Buster Environment - Python 3.x (Mar...

Works for me with: mysql-connector-python==8.0.27And mariadb version 10.3.31 mysql Ver 15.1 Distrib 10.3.31-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2Not sure this is relevant but al...
ghoul Web Scraping & Web Development 9 4,391 Nov-19-2021, 12:29 PM
    Thread: Split string
Post: RE: Split string

Came up with this: line = "kpwpoejxx as lskdl456" words = line.split(" ") last_word = words[-1] for index in range(len(last_word)): if last_word[index].isdigit(): words[-1] = last_word...
ghoul General Coding Help 2 1,914 Nov-19-2021, 10:27 AM
    Thread: What should i do, for this code to work -> description
Post: RE: What should i do, for this code to work -> des...

It is not exactly clear what you are trying to do from your code and your explanation does not help much either but: This does not look right You can loop using a while loop: if question == str(): ...
ghoul General Coding Help 2 1,488 Nov-18-2021, 01:22 PM
    Thread: compiling numpy, getting C source
Post: RE: Issue with program not passing to other elif c...

Not sure this would qualify as a fractal. [Image: https://cboard.cprogramming.com/attachme...timage-jpg] If yes, then that was my first fractal, written in C++, from just six years ago.
ghoul News and Discussions 10 3,777 Nov-18-2021, 11:13 AM

User Panel Messages

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