×

Discussion Board

Search:

Type: Posts; User: docGroup14; Keyword(s):

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    6,344

    Re: add file from glob to listbox

    thanks very much for the help mate.

    why is it that although it is encoded as utf-8, it cannot be displayed?

    if i use decode will i then get unicode?

    and im guessing map(unicode, fileList)...
  2. Replies
    2
    Views
    6,344

    add file from glob to listbox

    hi guys, very quick question.

    how can i add files from a glob command to a listbox?



    fileList = []

    os.chdir("c:\\Nokia\\Images")
    for file in glob.glob("*.jpg"):
  3. Replies
    9
    Views
    4,826

    Re: did i break my phone?

    yeah im going to use that, but i dont like it :(

    edit: the reason i dont like it, is that it requires a busy wait or a timer waiting until the gps has finished.
  4. Replies
    9
    Views
    4,826

    Re: did i break my phone?

    ah the reason i didn't want to use something like this is because if the gps thread takes longer than 30 seconds to complete, then another thread will still be made. when you told me to use...
  5. Replies
    9
    Views
    4,826

    Re: did i break my phone?

    thanks Y.A.K i will give it a shot. my dumb error was that im testing for mac_address == ''

    but i tried to load something into mac_address, and if there was an exception i just wrote "pass". when...
  6. Replies
    9
    Views
    4,826

    Re: did i break my phone?

    oh crap, sorry for wasting your time was a really dumb error on my part.
  7. Replies
    9
    Views
    4,826

    Re: did i break my phone?

    btSocket = socket.socket(socket.AF_BT, socket.SOCK_STREAM) #create bluetooth socket
    if mac_address == '':
    address,services = socket.bt_discover() #search bluetooth devices
    print...
  8. Replies
    9
    Views
    4,826

    Re: did i break my phone?

    hi, thanks for the reply. i did manage to run bt_discover from some other code so you are right it is indeed a code error.

    here is the code, it crashes, i think because of multiple threads. Y.A.K...
  9. Replies
    9
    Views
    4,826

    did i break my phone?

    hi guys, been messing about as you can probably tell from my previous posts but now i think i may have broken something!

    my phone will no longer connect bluetooth from the python interpreter. it...
  10. Replies
    11
    Views
    8,357

    Re: thread questions

    1 final question if i may:
    if i were to use another thread is there anyway to get the pid of the new thread so i can use thread synchronisation (i.e. wait on the pid of the new thread)?

    the...
  11. Replies
    11
    Views
    8,357

    Re: thread questions

    thanks, i had noticed that during testing. I will see how it goes and may use another thread.

    thanks for the help

    docGroup14
  12. Replies
    11
    Views
    8,357

    Re: thread questions

    thanks for the info, the only reason i wanted to use threads was because i want the gps program to run in the background, and i wish for users to be able to use other functions of my program while it...
  13. Replies
    11
    Views
    8,357

    Re: thread questions

    hi, thanks for the help so far. but when i use timer.cancel the whole app closes even though there is a lock waiting for the exit key to be pressed.

    any ideas on what might be happening?

    thanks...
  14. Replies
    11
    Views
    8,357

    Re: thread questions

    thanks - much appreciated
  15. Replies
    11
    Views
    8,357

    Re: thread questions

    cheers, that seems like a decent way to do it :)

    while you are here, could you tell me how I would go about passing a variable to a thread. For example if I wanted to pass "lock" to a thread when...
  16. Replies
    1
    Views
    4,366

    Re: socket.recv problem

    just to let you know, this was solved by putting the connect and readData in one big method, instead of split up. Not sure why this solves it, but hey!!
  17. Replies
    11
    Views
    8,357

    thread questions

    hi guys,

    sorry for all the questions recently.
    I want my main program to call a thread which will check gps data from a bluetooth gps device every 30 seconds. I can do this, however I can't kill...
  18. Replies
    1
    Views
    4,366

    socket.recv problem

    hi guys,

    i am having a problem with socket.recv.



    def readAndSend():
    global btSocket
    data_received = 0
    while(data_received == 0): #while there is not data, monitor channel
  19. Replies
    4
    Views
    4,284

    Re: writing text to a file

    excellent,

    thanks for the help
  20. Replies
    4
    Views
    4,284

    Re: writing text to a file

    ah thanks, i will try that now.

    one question: if i convert mac_address to a string then read it in from the file. can i use it in
    btsocket.connect(mac_address)?
  21. Replies
    4
    Views
    4,284

    writing text to a file

    hi guys,

    i have this code:


    mac_address = (address, services.values()[0])
    if appuifw.query(u"Do you want to always connect to this device?", "query") == True:
    f =...
  22. Replies
    0
    Views
    4,180

    catch camera lens open

    hi guys,

    i am trying to make an app which uses the camera, however if the lens cover is opened then the phone switches to the camera app, but i'd like it to stay in my app.
    is there any way to...
Results 1 to 22 of 22
×