Python Script not responding Announcing the arrival of Valued Associate #679: Cesar Manara ...

If u is orthogonal to both v and w, and u not equal to 0, argue that u is not in the span of v and w. (

Generate an RGB colour grid

How to Make a Beautiful Stacked 3D Plot

Delete nth line from bottom

Fantasy story; one type of magic grows in power with use, but the more powerful they are, they more they are drawn to travel to their source

Wu formula for manifolds with boundary

Withdrew £2800, but only £2000 shows as withdrawn on online banking; what are my obligations?

For a new assistant professor in CS, how to build/manage a publication pipeline

Why wasn't DOSKEY integrated with COMMAND.COM?

Why aren't air breathing engines used as small first stages?

Is it common practice to audition new musicians one-on-one before rehearsing with the entire band?

What does "lightly crushed" mean for cardamon pods?

Where are Serre’s lectures at Collège de France to be found?

Can an alien society believe that their star system is the universe?

Is it fair for a professor to grade us on the possession of past papers?

If a contract sometimes uses the wrong name, is it still valid?

Why do we bend a book to keep it straight?

What font is "z" in "z-score"?

Can you use the Shield Master feat to shove someone before you make an attack by using a Readied action?

Has negative voting ever been officially implemented in elections, or seriously proposed, or even studied?

Using audio cues to encourage good posture

Using et al. for a last / senior author rather than for a first author

How to react to hostile behavior from a senior developer?

Do square wave exist?



Python Script not responding



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!Calling an external command in PythonWhat are metaclasses in Python?Finding the index of an item given a list containing it in PythonDifference between append vs. extend list methods in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?How to get the current time in PythonHow can I make a time delay in Python?Understanding Python super() with __init__() methodsDoes Python have a string 'contains' substring method?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















(I am a total beginner regarding programming)
I have written a python GUI to run batch files that can activate different Gamemodes in CSGO on a local Steam server. When I run the script everything works, but after I execute a command, the Programm does not respond anymore.



import tkinter as tk
import subprocess

def startA():
subprocess.call([r'D:CSGO_serverArms_race.bat'])
def startCa():
subprocess.call([r'D:CSGO_serverCasual.bat'])
def startCo():
subprocess.call([r'D:CSGO_serverCompetitive.bat'])
def startDea():
subprocess.call([r'D:CSGO_serverDeathmatch.bat'])
def startDem():
subprocess.call([r'D:CSGO_serverDemolition.bat'])
def startQ():
subprocess.call([r'D:CSGO_serverQuit.bat'])

root = tk.Tk()
root.title("Settings")
frame = tk.Canvas(root)
frame.pack()

Armsrace = tk.Button(frame,
text="Arms_race",
fg="red",
command=startA)
Armsrace.pack(side=tk.BOTTOM)

Casual = tk.Button(frame,
text="Casual",
fg="red",
command=startCa)
Casual.pack(side=tk.BOTTOM)

Competitive = tk.Button(frame,
text="Competitive",
fg="red",
command=startCo)
Competitive.pack(side=tk.BOTTOM)

Deathmatch = tk.Button(frame,
text="Deathmatch",
fg="red",
command=startDea)
Deathmatch.pack(side=tk.BOTTOM)

Demolition = tk.Button(frame,
text="Demolition",
fg="red",
command=startDem)
Demolition.pack(side=tk.BOTTOM)

Stop = tk.Button(frame,
text="Stop Server",
fg="red",
command=startQ)
Stop.pack(side=tk.BOTTOM)


root.mainloop()


Did I just fotget a loop?(but I have already a loop there, so how would I have to do this then?)
Or is it something completly diffrent?



Thanks in advance
(also sorry for not putting the code as sample code)










share|improve this question













migrated from superuser.com 15 hours ago


This question came from our site for computer enthusiasts and power users.














  • 1





    Perhaps your .bat scripts aren't exiting?

    – glibdud
    14 hours ago











  • as @glibdud said - subprocess may start .bat and never ends - and then mainloop can't work. You may try to start subprocess in thread or you can try to add & in command to run it in background r'D:CSGO_serverQuit.bat &' maybe it will works. You can also try to use & inside .bat. But I'm not sure if & works on Windows - I use Linux.

    – furas
    13 hours ago


















0















(I am a total beginner regarding programming)
I have written a python GUI to run batch files that can activate different Gamemodes in CSGO on a local Steam server. When I run the script everything works, but after I execute a command, the Programm does not respond anymore.



import tkinter as tk
import subprocess

def startA():
subprocess.call([r'D:CSGO_serverArms_race.bat'])
def startCa():
subprocess.call([r'D:CSGO_serverCasual.bat'])
def startCo():
subprocess.call([r'D:CSGO_serverCompetitive.bat'])
def startDea():
subprocess.call([r'D:CSGO_serverDeathmatch.bat'])
def startDem():
subprocess.call([r'D:CSGO_serverDemolition.bat'])
def startQ():
subprocess.call([r'D:CSGO_serverQuit.bat'])

root = tk.Tk()
root.title("Settings")
frame = tk.Canvas(root)
frame.pack()

Armsrace = tk.Button(frame,
text="Arms_race",
fg="red",
command=startA)
Armsrace.pack(side=tk.BOTTOM)

Casual = tk.Button(frame,
text="Casual",
fg="red",
command=startCa)
Casual.pack(side=tk.BOTTOM)

Competitive = tk.Button(frame,
text="Competitive",
fg="red",
command=startCo)
Competitive.pack(side=tk.BOTTOM)

Deathmatch = tk.Button(frame,
text="Deathmatch",
fg="red",
command=startDea)
Deathmatch.pack(side=tk.BOTTOM)

Demolition = tk.Button(frame,
text="Demolition",
fg="red",
command=startDem)
Demolition.pack(side=tk.BOTTOM)

Stop = tk.Button(frame,
text="Stop Server",
fg="red",
command=startQ)
Stop.pack(side=tk.BOTTOM)


root.mainloop()


Did I just fotget a loop?(but I have already a loop there, so how would I have to do this then?)
Or is it something completly diffrent?



Thanks in advance
(also sorry for not putting the code as sample code)










share|improve this question













migrated from superuser.com 15 hours ago


This question came from our site for computer enthusiasts and power users.














  • 1





    Perhaps your .bat scripts aren't exiting?

    – glibdud
    14 hours ago











  • as @glibdud said - subprocess may start .bat and never ends - and then mainloop can't work. You may try to start subprocess in thread or you can try to add & in command to run it in background r'D:CSGO_serverQuit.bat &' maybe it will works. You can also try to use & inside .bat. But I'm not sure if & works on Windows - I use Linux.

    – furas
    13 hours ago














0












0








0








(I am a total beginner regarding programming)
I have written a python GUI to run batch files that can activate different Gamemodes in CSGO on a local Steam server. When I run the script everything works, but after I execute a command, the Programm does not respond anymore.



import tkinter as tk
import subprocess

def startA():
subprocess.call([r'D:CSGO_serverArms_race.bat'])
def startCa():
subprocess.call([r'D:CSGO_serverCasual.bat'])
def startCo():
subprocess.call([r'D:CSGO_serverCompetitive.bat'])
def startDea():
subprocess.call([r'D:CSGO_serverDeathmatch.bat'])
def startDem():
subprocess.call([r'D:CSGO_serverDemolition.bat'])
def startQ():
subprocess.call([r'D:CSGO_serverQuit.bat'])

root = tk.Tk()
root.title("Settings")
frame = tk.Canvas(root)
frame.pack()

Armsrace = tk.Button(frame,
text="Arms_race",
fg="red",
command=startA)
Armsrace.pack(side=tk.BOTTOM)

Casual = tk.Button(frame,
text="Casual",
fg="red",
command=startCa)
Casual.pack(side=tk.BOTTOM)

Competitive = tk.Button(frame,
text="Competitive",
fg="red",
command=startCo)
Competitive.pack(side=tk.BOTTOM)

Deathmatch = tk.Button(frame,
text="Deathmatch",
fg="red",
command=startDea)
Deathmatch.pack(side=tk.BOTTOM)

Demolition = tk.Button(frame,
text="Demolition",
fg="red",
command=startDem)
Demolition.pack(side=tk.BOTTOM)

Stop = tk.Button(frame,
text="Stop Server",
fg="red",
command=startQ)
Stop.pack(side=tk.BOTTOM)


root.mainloop()


Did I just fotget a loop?(but I have already a loop there, so how would I have to do this then?)
Or is it something completly diffrent?



Thanks in advance
(also sorry for not putting the code as sample code)










share|improve this question














(I am a total beginner regarding programming)
I have written a python GUI to run batch files that can activate different Gamemodes in CSGO on a local Steam server. When I run the script everything works, but after I execute a command, the Programm does not respond anymore.



import tkinter as tk
import subprocess

def startA():
subprocess.call([r'D:CSGO_serverArms_race.bat'])
def startCa():
subprocess.call([r'D:CSGO_serverCasual.bat'])
def startCo():
subprocess.call([r'D:CSGO_serverCompetitive.bat'])
def startDea():
subprocess.call([r'D:CSGO_serverDeathmatch.bat'])
def startDem():
subprocess.call([r'D:CSGO_serverDemolition.bat'])
def startQ():
subprocess.call([r'D:CSGO_serverQuit.bat'])

root = tk.Tk()
root.title("Settings")
frame = tk.Canvas(root)
frame.pack()

Armsrace = tk.Button(frame,
text="Arms_race",
fg="red",
command=startA)
Armsrace.pack(side=tk.BOTTOM)

Casual = tk.Button(frame,
text="Casual",
fg="red",
command=startCa)
Casual.pack(side=tk.BOTTOM)

Competitive = tk.Button(frame,
text="Competitive",
fg="red",
command=startCo)
Competitive.pack(side=tk.BOTTOM)

Deathmatch = tk.Button(frame,
text="Deathmatch",
fg="red",
command=startDea)
Deathmatch.pack(side=tk.BOTTOM)

Demolition = tk.Button(frame,
text="Demolition",
fg="red",
command=startDem)
Demolition.pack(side=tk.BOTTOM)

Stop = tk.Button(frame,
text="Stop Server",
fg="red",
command=startQ)
Stop.pack(side=tk.BOTTOM)


root.mainloop()


Did I just fotget a loop?(but I have already a loop there, so how would I have to do this then?)
Or is it something completly diffrent?



Thanks in advance
(also sorry for not putting the code as sample code)







python






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 15 hours ago









Philipp KleinheiderPhilipp Kleinheider

1




1




migrated from superuser.com 15 hours ago


This question came from our site for computer enthusiasts and power users.









migrated from superuser.com 15 hours ago


This question came from our site for computer enthusiasts and power users.










  • 1





    Perhaps your .bat scripts aren't exiting?

    – glibdud
    14 hours ago











  • as @glibdud said - subprocess may start .bat and never ends - and then mainloop can't work. You may try to start subprocess in thread or you can try to add & in command to run it in background r'D:CSGO_serverQuit.bat &' maybe it will works. You can also try to use & inside .bat. But I'm not sure if & works on Windows - I use Linux.

    – furas
    13 hours ago














  • 1





    Perhaps your .bat scripts aren't exiting?

    – glibdud
    14 hours ago











  • as @glibdud said - subprocess may start .bat and never ends - and then mainloop can't work. You may try to start subprocess in thread or you can try to add & in command to run it in background r'D:CSGO_serverQuit.bat &' maybe it will works. You can also try to use & inside .bat. But I'm not sure if & works on Windows - I use Linux.

    – furas
    13 hours ago








1




1





Perhaps your .bat scripts aren't exiting?

– glibdud
14 hours ago





Perhaps your .bat scripts aren't exiting?

– glibdud
14 hours ago













as @glibdud said - subprocess may start .bat and never ends - and then mainloop can't work. You may try to start subprocess in thread or you can try to add & in command to run it in background r'D:CSGO_serverQuit.bat &' maybe it will works. You can also try to use & inside .bat. But I'm not sure if & works on Windows - I use Linux.

– furas
13 hours ago





as @glibdud said - subprocess may start .bat and never ends - and then mainloop can't work. You may try to start subprocess in thread or you can try to add & in command to run it in background r'D:CSGO_serverQuit.bat &' maybe it will works. You can also try to use & inside .bat. But I'm not sure if & works on Windows - I use Linux.

– furas
13 hours ago












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55731159%2fpython-script-not-responding%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55731159%2fpython-script-not-responding%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

Tribunal Administrativo e Fiscal de Mirandela Referências Menu de...

looking for continuous Screen Capture for retroactivly reproducing errors, timeback machineRolling desktop...