You look to have an unmatched parenthesis in your second line of code, is that correct?
Anyway, assuming your drawing code works, and the syntax is correct, I would say you are drawing the same circle 4 times.
If you want a different circle each time, try to incorporate the variable i in the...
import sys
sys.path.append("/new/path")
file("filename", "r")
OR
import os
os.chdir("/new/path")
file("filename", "r")
OR
file("/new/path/filename", "r")
I think he wanted to print '24' rather than 'tmin1tmin2'. Here's one way to do it.
for n in range (1,2):
tmin1=10
tmin2=14
exec 'tasa = %s + %s' %('tmin' + str(n), 'tmin' + str(n+1))
print tasa
Thanks for your reply. However, I was looking for a solution in line with the problem I presented. My requirements are that the Python script needs to execute a shell script to set environment variables. The environment variable list is dynamic, so I cannot simply set the variables on the...
I have a LINUX bash shell script that sets environment variables. I need to execute this script through Python. I've tried to use os.system and subprocess.call, but each time, the shell script seems to modify the environment variables in a subshell and exits.
How can I run a LINUX shell...
Thanks for the replies everyone, but nothing has worked so far.
The equal sign is not valid syntax for defining an alias in tcsh, so that did not help.
Hi, feherke,
I thought I mentioned I was using tcsh.
I tried the syntax you provided, but I was unable to get it working in tcsh. Do you have a solution for my particular shell?
Thanks.
From the command line I can execute the following with success:
ps | awk '{print $1}'
It prints the first column of a ps listing as expected. However, if I bind this command to an alias, it does not handle the "$1" variable correctly. I've tried escaping the variable with a backslash, single...
I know Perl, but I don't know Tk. I have a Perl script that someone else wrote. When it runs, there is a GUI with an Exit button.
Rather than click the Exit button, I want to assign a keyboard shortcut to exit the GUI. Can someone tell me how to add this functionality to the Perl script?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.