User Profile

Collapse

Profile Sidebar

Collapse
Bryan Kumataka
Bryan Kumataka
Last Activity: Dec 14 '10, 06:55 PM
Joined: Dec 1 '10
Location: Buffalo Grove, IL, USA
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Bryan Kumataka
    replied to Need help with execfile()
    I just want to access the variables. I do not need to run it.
    See more | Go to post

    Leave a comment:


  • Bryan Kumataka
    replied to Need help with execfile()
    In my situation I can not use import because import does not work within the module mystuff() which is why I'm trying to get execfile() to work. It is my understanding that it should work in a function like mystuff().
    I have another larger program that I'm trying to get to work by using execfile(). This program is a record and playback type of program using serial communication. I have several folders that contains a setup file for configuring...
    See more | Go to post

    Leave a comment:


  • Bryan Kumataka
    started a topic Need help with execfile()

    Need help with execfile()

    I'm trying to use execfile() in a Python program, but I do not know why it works in one situation and not work in another. I'm really new to Python and so I do not have enough experience to figure this out. Plus I'm not a programmer.

    In this situation, it does not work:
    #file1.py
    mynums=[1,2,3]

    #file2.py
    def mystuff():
    <tab>execfile(' file1.py')
    <tab>print mynums

    mystuff()...
    See more | Go to post
    Last edited by Bryan Kumataka; Dec 1 '10, 01:49 AM. Reason: line spacing was wrong
No activity results to display
Show More
Working...