User Profile

Collapse

Profile Sidebar

Collapse
vajratkarviraj
vajratkarviraj
Last Activity: Dec 21 '07, 09:37 AM
Joined: Jun 15 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • vajratkarviraj
    started a topic regarding arrays/matrices...

    regarding arrays/matrices...

    hey all... im using python 2.5 with Tkinter (if any1 wants 2 know)...

    earlier i had queried about how to make a matrix in this forums and i got an excellent reply in which the code for making a 2d matrix was as :

    Code:
    class Matrix(object):
        def __init__(self, rows, cols):
            self.rows = rows
            self.cols = cols
            # initialize matrix and fill with zeroes
    ...
    See more | Go to post

  • vajratkarviraj
    replied to radio button again!
    anybody??? nobody's got a solution?? the main difficulty i am facing is how to effectively use button.configur e(state=NORMAL) or button.configur e(state=DISABLE D)... help will really be appreciated guys... thanks...
    See more | Go to post

    Leave a comment:


  • vajratkarviraj
    started a topic radio button again!

    radio button again!

    Hi,
    Am using Tkinter. Suppose I have 4 radio buttons (value 1,2,3 & 4) arranged in a single column. I want radio 2 to have a normal state and radio 4 to have a disabled state when radio 1 is selected. And radio 2 - disabled, radio 4 - normal when radio 3 is selected (i.e. vice versa). My main question here is how do i get to know the state(i.e. normal or disabled) of a radio button as a feedback? thanx in advance
    See more | Go to post

  • vajratkarviraj
    replied to radio button problems :(
    Hello all again...
    Hey I managed to find a solution to the problem :)... but would welcome alternative suggestions. For public scrutiny the code is :

    Code:
    from Tkinter import *                                                       1
        
    root = Tk()
    
    v1=IntVar()
    v2=IntVar()
    
    button1=Radiobutton(root, text="1", value=1, variable=v1)
    button2=Radiobutton(root, text="2",
    ...
    See more | Go to post

    Leave a comment:


  • vajratkarviraj
    started a topic radio button problems :(

    radio button problems :(

    Hi all,
    I'm using Python 2.5.1 and TkInter.
    Hey here is the problem. Suppose I have 4 radio buttons (lets say values 1,2,3 and 4). They arranged in 2 columns (Each of the 2 columns has 2 radio buttons). I want to produce a specific action whenever I select a total of 2 radio buttons (and click on the "Submit" button), 1 from each column. Suppose say 1 and 3 are selected it should print 'a'. If 1 and 4, then print 'b' and similarly...
    See more | Go to post

  • m using TkInter... sry for not mentioning....
    See more | Go to post

    Leave a comment:


  • vajratkarviraj
    started a topic command for making text look embedded

    command for making text look embedded

    hello ppl
    i hav a radio button ... and i want it to make certain text beneath it appear wen a user clicks on it... whenit is not selected tht text should appear embossed/embedded in the window[i hope u know what i mean]... so i want 2 know what command attribute i shud giv 2 tht radio button... can u pls help me out?
    See more | Go to post

  • vajratkarviraj
    replied to Pmw.Notebook packaging
    ok ok... sorry for breaching terms and conditions... my mistake.... and yes i was talking about this notebook... u can see the link here.... http://pmw.sourceforge.net/doc/NoteBook.html
    See more | Go to post

    Leave a comment:


  • vajratkarviraj
    started a topic Pmw.Notebook packaging

    Pmw.Notebook packaging

    hey is it possible 2 package notebook with py2exe for distribution of my program 2 other ppl...? or packaging it wont even be necessary??? if so can sum1 send me a sample .py file on <removed> or send me an informative link....
    See more | Go to post
    Last edited by bartonc; Jul 26 '07, 08:13 PM. Reason: email address removed per site rules

  • vajratkarviraj
    started a topic recursiveness using bool...

    recursiveness using bool...

    I hav a code like this

    Code:
    i=0
    while i<n:
        xold.data[0][i]=float(self.enINITGUESS.get());   #INITGUESS is an initial value
        xnew.data[0][i]=xold.data[0][i];
        i=i+1
    i=0
    flag = 1
    if True:
        flag=0
        for i in range (n):                  # all this is for improving my xnew
            j=0
            temp=0
            while j<i:
    ...
    See more | Go to post

  • vajratkarviraj
    started a topic nested functions in python

    nested functions in python

    i hav created a function(say solve(parameter s)) within a function(say display(paramet ers)).... then the python code goes sumwat like this:
    Code:
     
    def display(parameter1, parameter2):
       
    {code of display}
          
    solve(parameter3, parameter4):
    
      
    {code of solve and it gives me its output in the form of a number}
          
    #now i want to return control to display
    ...
    See more | Go to post

  • vajratkarviraj
    started a topic bools in python

    bools in python

    question from a newbie:
    can somebody help me in converting this c++ code to python...
    [CODE=c]
    bool flag;
    do{
    flag=0;
    for(int i=0;i<n;i++){
    double s1=xold[i];
    double s2=xnew[i];
    e[i]= s1-s2;
    if (e[i]<0) {e[i]=0-e[i];}
    if(e[i]>prec){flag=1 ;}

    for(int i=0;i<n;i++){
    xold[i]=xn...
    See more | Go to post

  • vajratkarviraj
    started a topic passing an int/float via f.write()

    passing an int/float via f.write()

    hey guys is it possible 2 do so??? as in like i want 2 write numbers from 1 to 1000 in a file f.txt say.... using the while loop im stuck... as the indexing variable for incrementing the numbers to 1000 ITSELF gets printed if i use '' or "" or '\j' or "\j"...

    also is there an easy way of converting this c++ code 2 a python code [without suing swig].... its basically arrays....
    [CODE=c]
    float a[6][6];...
    See more | Go to post
    Last edited by bartonc; Jul 8 '07, 08:36 PM. Reason: Added [CODE=c][CODE] tags.

  • Bartonc appreciate ur help a lot... thanx... but thr's not a word of matplotlib in thr... basically the whole pain is tht matplotlib's modules or watever they r called arnt being put in the dist folder... see i'll put in my .py script also... mebbe tht mite help... here it is ........ letsc.py:
    [CODE=python]from Tkinter import *


    class GUIFramework(Fr ame):
    """This is the GUI"""...
    See more | Go to post
    Last edited by bartonc; Jun 15 '07, 08:49 PM. Reason: Added [CODE=python][CODE] tags.

    Leave a comment:


  • regarding making an exe (of a package using matplotlib) using py2exe

    i hav python2.5, matplotlib0.90. 1, and py2exe for python 2.5 all on windows xp... i hav a python program(letsc.p y) which uses the matplotlib package... and i want 2 make an exe of it for distribution on other comps... i used py2exe... i wrote a setup.py whose contents are :
    [CODE=python]
    from distutils.core import setup
    import py2exe
    import matplotlib

    setup(console=['letsc.py'],
    options={
    'py2exe':...
    See more | Go to post
    Last edited by bartonc; Jun 15 '07, 06:05 PM. Reason: Added [CODE=python][CODE] tags.
No activity results to display
Show More
Working...