Alan/Jim:
It's good to hear some pragmatic advice.
This particular module has 8 small functions that share common data
(structures, primarily in arrays and vectors). I tried passing array_G as a
parameter but that doesn't work because everything in the function remains
local and I cannot ge
"Varsha Purohit" <[EMAIL PROTECTED]> wrote
> I have an application where i need to run a python script from
> wxpython gui. I am calling the script from the button click event.
> And
> the moment button is pressed the python script should be executed.
This comes up from time to time and is
Thanks for the help its working now !!!
On Nov 13, 2007 7:34 PM, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Varsha Purohit wrote:
> > Hello,
> > I have an application where i need to run a python script from
> > wxpython gui. I am calling the script from the button click event. And
> > the mo
Varsha Purohit wrote:
> Hello,
> I have an application where i need to run a python script from
> wxpython gui. I am calling the script from the button click event. And
> the moment button is pressed the python script should be executed.
If you can import the script and call the required fun
>> okay, i tried. so why are globals bad and what problems
>> do they solve?
The biggest complaint I have with the original example is that you've
writen code to "do stuff" with array G, yet that code cannot directly
be used to do the same stuff to some other array. In this sense, th
Da'Nivek wrote:
> Hey there,
>
> I'm trying to learn python to use in Maya
> Would it be appropriate to post a question here?
You can certainly post a question...if it is too Maya-specific you may
have better luck on a Maya list. We are good at Python, maybe not so
good at Maya.
Kent
jim stockford wrote:
> okay, i tried. so why are globals bad and what problems
> do they solve?
Wikipedia has a decent list:
http://en.wikipedia.org/wiki/Global_variable
Kent
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/lis
Hello,
I have an application where i need to run a python script from
wxpython gui. I am calling the script from the button click event. And
the moment button is pressed the python script should be executed.
thanks,
Varsha Purohit,
Graduate Student
___
> okay, i tried. so why are globals bad and what problems
> do they solve?
now, my OS theory may be a bit rusty -- pls correct me where i'm
wrong, but from what i recall, one reason they're bad is because they
take up "unneeded" amount of memory. in a traditional stack model --
think C, assem
Thank you. That works great!
On Nov 13, 2007 7:18 PM, Eike Welk <[EMAIL PROTECTED]> wrote:
> Hello Bryan!
>
> On Wednesday 14 November 2007 00:18, Bryan Fodness wrote:
> > I see how to do it in a one-dimenstional array, but do not know the
> > syntax for the multi-dimensional case.
> >
> > >from
Hello Bryan!
On Wednesday 14 November 2007 00:18, Bryan Fodness wrote:
> I see how to do it in a one-dimenstional array, but do not know the
> syntax for the multi-dimensional case.
>
> >from numpy import *
>
> a = zeros((60,40), int)
>
> fields = {}
> field = 10
> fields[field] = '30A', 5
>
> iy
On Nov 13, 2007, at 3:11 PM, Alan Gauld wrote:
> Rather than answer your question directly can I ask, do
> you know *why* wiser heads say global is bad? What
> problems does using global introduce? What problems
> does it solve?
i'll try:
globals are good because they provide common data to
Hi,
Thanks. I have used the following code
http://www.ipsl.jussieu.fr/~jmesce/Taylor_diagram/Miscelaneous/model_vs_data_comp_stat.py
ajay
--- Alan Gauld <[EMAIL PROTECTED]> wrote:
> "Ajaya Mohan R. S." <[EMAIL PROTECTED]> wrote
>
> > I am trying to run a code for plotting Taylor
> diagra
"Ajaya Mohan R. S." <[EMAIL PROTECTED]> wrote
> I am trying to run a code for plotting Taylor diagram,
> ending up with the following errors. How do I fix
> these errors? Help appreciated.
Without any sight of the code that caused them its hard
to give sensible answers. We can only suggest gene
I see how to do it in a one-dimenstional array, but do not know the
syntax for the multi-dimensional case.
from numpy import *
a = zeros((60,40), int)
fields = {}
field = 10
fields[field] = '30A', 5
iy = int(fields[field][1])
ix = int(fields[field][0].rstrip('AB'))
for j in range(iy):
pu
Hello Alan,
It is a file having colour data grid.. just like any simple ascii
file and i need to manipulate the numbers with colours. But at this
stage i am not much bothered with colurs i can associate it with
simple RGB value for all different numbers. ex. of such simple file
can be like thi
"Dinesh B Vadhia" <[EMAIL PROTECTED]> wrote
> Consider a data structure (say, an array) that is operated
> on by a bunch of functions eg.
>
> def function_A
> global array_G
> def function_B
> global array_G
> etc...
> On the other hand, wiser heads say that the use of 'global'
> is b
Hey there,
I'm trying to learn python to use in Maya
Would it be appropriate to post a question here?
thanks
Nivek
3D Artist
Kevin Nield
http://www.kevinnield.com
AIM: nanoennui
Hello,
I've written a script which conducts several subprocess calls and then
ultimately calls a shell script which runs even more programs... my script
is using subprocess to execute a few sed calls, and then execute the script.
I'm getting strange behavior:
Here's a snippet of my script (any ge
Hi,
I am trying to run a code for plotting Taylor diagram,
ending up with the following errors. How do I fix
these errors? Help appreciated.
best,
Ajay
Read observation data...
Read 'mri_cgcm2_3_2a' model output...
Compute comparison statistics...
Error treating model: mri_cgcm2_3_2a
Error: 'modu
On Nov 13, 2007 4:01 PM, Stephen Nelson-Smith <[EMAIL PROTECTED]> wrote:
> >>> server = NNTP('news.gmane.org')
>
> What's wrong with that then?
server, apparently:>>> s.group("gmane.discuss")
('211 11102 10 11329 gmane.discuss', '11102', '10', '11329', 'gmane.discuss')
>>> server.group("gmane.disc
Kent Johnson wrote:
> Dinesh B Vadhia <[EMAIL PROTECTED]> wrote:
>
>> Consider a data structure (say, an array) that is operated on by a bunch of
>> functions
>>
>> The described way is to place the statement 'global' in line 1 of each
>> function. On the other hand, wiser heads say tha
Dinesh B Vadhia <[EMAIL PROTECTED]> wrote:
> Consider a data structure (say, an array) that is operated on by a bunch of
> functions
>
> The described way is to place the statement 'global' in line 1 of each
> function. On the other hand, wiser heads say that the use of 'global' is bad
Consider a data structure (say, an array) that is operated on by a bunch of
functions eg.
def function_A
global array_G
do stuff with array_G
return
def function_B
global array_G
do stuff with array_G
return
def function_C
global array_G
do stuff with array_G
On Nov 13, 2007 2:13 PM, Stephen Nelson-Smith <[EMAIL PROTECTED]> wrote:
> ought it to be straightforward to write a client that does this task?
Well:
>>> server = NNTP('news.gmane.org')
>>> resp, count, first, last, name =
server.group("gmane.linux.redhat.enterprise.announce")
Traceback (most r
Hello all,
I wish to pull all the articles for one particular newsgroup to a
local machine, on a regular basis. I don't wish to read them - I will
be parsing the contents programatically. In your view is it going to
be best to use an 'off-the-shelf' news reader, or ought it to be
straightforward
On Nov 13, 2007 7:06 PM, bob gailer <[EMAIL PROTECTED]> wrote:
> Aditya Lal wrote:
> > [snip]
>
> > for i in a[:] will make i point to the elements of the list
> To be more precise:
> a[:] is a copy of the list
> the for statement assigns each list element in turn to i. Assign is not
> exactly the
Aditya Lal wrote:
> [snip]
> for i in a[:] will make i point to the elements of the list
To be more precise:
a[:] is a copy of the list
the for statement assigns each list element in turn to i. Assign is not
exactly the same as point.
___
Tutor maillis
"Johnston Jiaa" <[EMAIL PROTECTED]> wrote
> methods.html>, but do not see how to get the coordinates of the
> mouse
> on the canvas.
Any mouse event will give you the coordinates within the event data.
Trapping the mouse Movment will ensure you track the current position,
> Also, after I get t
"Bryan Fodness" <[EMAIL PROTECTED]>
> f = open('TEST1.MLC')
> fields = {}
> for line in f:
> the_line = line.split()
> if the_line:
>if the_line[0] == 'Field':
> field = int(the_line[-1])
>elif the_line[0] == 'Leaf':
> fields[field] = the_line[-1]
>
> which, sort of works, b
30 matches
Mail list logo