How to integrate code with buttons, txt and user input

CodeLite installation/troubleshooting forum
Pleiades
CodeLite Curious
Posts: 2
Joined: Sun Apr 29, 2018 9:08 am
Genuine User: Yes
IDE Question: c++
Contact:

How to integrate code with buttons, txt and user input

Post by Pleiades »

Hi,

I'm building a program which predicts very large M Prime Numbers. I like the GUI CodeLite Ide. Anyway I wish to integrate this code with the gui. But I don't know how to make a button process the a number in the input window or txt file from Codelite. Here is the code I wrote which does modular math on Mersenne Numbers.

Code: Select all

KB = 1024
MB = 1024 * 1024
 #Mod 12 for Mersenne check to confirm a 7
 # except for numbers 2 & 3
def Mod_M_checker(file):
    iszero = True
    res = 0
    for s in file:
        n = int(s)
        if iszero and n:
            iszero = False
        res = (res + n % 12)  
    if iszero:
        return 0
    else:
        return res if res else 0
 
if __name__ == '__main__':
    with open('127.txt', buffering=1*MB) as bigggg:
        dr = Mod_M_checker(bigggg)
    print(dr)
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to integrate code with buttons, txt and user input

Post by eranif »

There is no support for Python in CodeLite
Make sure you have read the HOW TO POST thread
Pleiades
CodeLite Curious
Posts: 2
Joined: Sun Apr 29, 2018 9:08 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: How to integrate code with buttons, txt and user input

Post by Pleiades »

eranif wrote:There is no support for Python in CodeLite
Hi eranif,

Thanks for a quick reply, maybe you can help me with some c++ code which works with code lite for my project?
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to integrate code with buttons, txt and user input

Post by eranif »

Sorry, this forum is for CodeLite issues only. If you seek C++ help, please search for C++ forums
Make sure you have read the HOW TO POST thread
Post Reply