#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    27
    Rep Power
    0

    Question py2exe - How to call function which accept object as argument in .exe file?


    Hii To all,

    I am using python 2.3.3 and py2exe 0.5.0. I am finding one difficulty here. I developed script with one function, which acccepts class object as argument and work on that object and return new object(of same class) to calling programe.

    The class is defined in module that i am importing. The problem when i created .exe using py2exe, i am not able to call that function with or without class object as argument.

    Please anybody can give me guidance for that. Even i tried to create simple script with function which prints "HELLO". Then generate .exe. When i am executing it it is not printing it.

    What could be problem? is there some calling convention to use?

    Thanks in advance.

    DevHims
  2. #2
  3. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    From your post it sounds like you have a basic configuration problem with the setup.py script - you could post it here.

    Have you tried my script?
    http://forums.devshed.com/t137769/s....ghlight=py2exe
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    27
    Rep Power
    0

    Question


    Hii Grim,

    Let me explin in brief what i am doing. I have three .py files.

    first .py file " Use In.txt file and generate object of class MyList" . Class MyList and its methods are defined in MyFlow.py file.

    Second .py file " which can be any python file with function that accept Object of class MyList, perform some operation on it and return new objcet of class MyList."

    Third .py file " which accepts object of class MyList and generate 'Out.txt' file. "

    class MyList is imported by all three files. Now i want to make one .exe file which utilize all three files. So, input to .exe file is In.txt file and output will be 'out.txt' file.

    or three different .exe files from each of .py file and use to perform same functionality. I am not sure which will possible. You sholu suggest me way to do this.

    Second, if i will convert second .py file into .exe file, then how it will accept object of class mylist.

    Please provide some input. Thanks Buddy.

    DevHims

IMN logo majestic logo threadwatch logo seochat tools logo