Re: Tkinter GUI freezing, used Thread then encountered RuntimeError: threads can only be started once

2023-01-10 Thread MRAB
On 2023-01-11 00:13, Cameron Simpson wrote: On 10Jan2023 18:32, MRAB wrote: I don't like how you're passing Thread...start as an argument. IMHO, it would be better/cleaner to pass a plain function, even if the only thing that function does is to start the thread. Yes, and this is likely the

Re: Tkinter GUI freezing, used Thread then encountered RuntimeError: threads can only be started once

2023-01-10 Thread Cameron Simpson
On 10Jan2023 18:32, MRAB wrote: I don't like how you're passing Thread...start as an argument. IMHO, it would be better/cleaner to pass a plain function, even if the only thing that function does is to start the thread. Yes, and this is likely the thing causing the cited exception "threads c

Re: Tkinter GUI freezing, used Thread then encountered RuntimeError: threads can only be started once

2023-01-10 Thread MRAB
On 2023-01-10 14:57, Abhay Singh wrote: Here is the entire code snippet of the same. Please help def change_flag(top_frame, bottom_frame, button1, button2, button3, button4, controller): global counter, canvas, my_image, chosen, flag, directory canvas.delete('all') button5['state'] = DISABLED

Tkinter GUI freezing, used Thread then encountered RuntimeError: threads can only be started once

2023-01-10 Thread Abhay Singh
Here is the entire code snippet of the same. Please help def change_flag(top_frame, bottom_frame, button1, button2, button3, button4, controller): global counter, canvas, my_image, chosen, flag, directory canvas.delete('all') button5['state'] = DISABLED counter += 1 chosen, options_text = func

problem in freezing python script...

2009-12-09 Thread Jebagnana Das
Hello all, I'm using cxfreeze to freeze the python script in my ubuntu 9.04 machine. Now when i tried to execute the binary in mandriva 2008 the error message is.. File "/usr/local/lib/python3.1/site-packages/cx_Freeze/initscripts/Console3.py", line 27, in File "test.py", line 7,

Re: Freezing python files into executables

2009-11-05 Thread Aahz
In article , Mike Driscoll wrote: > >Something that you might want to try in the future is GUI2Exe, which >allows you to play with a whole slew of freezing modules: Does GUI2Exe work from just the command-line? I spent a fair amount of time getting rid of the Mac GUI .pkg creator a

Re: Freezing python files into executables

2009-11-03 Thread Rami Chowdhury
On Tue, 03 Nov 2009 11:15:39 -0800, Girish Venkatasubramanian wrote: Hello, I have been using freeze.py on 32 bit linux distributions without a problem. But recently I tried to do the same on RHEL5 x86_64 and ran into some issues. 1) When I ran the script, I got Error: needed directory /usr/

Re: Freezing python files into executables

2009-11-03 Thread Mike Driscoll
th a whole slew of freezing modules: http://code.google.com/p/gui2exe/ I've been using it to make executables on Windows through it's py2exe implementation. --- Mike Driscoll Blog: http://blog.pythonlibrary.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Freezing python files into executables

2009-11-03 Thread Rami Chowdhury
On Tue, 03 Nov 2009 11:57:17 -0800, Girish Venkatasubramanian wrote: I checked and ls /usr/lib64/python2.4/config/ returns config.c config.c.in install-sh libpython2.4.a Makefile makesetup python.o Setup Setup.config Setup.local so I am guessing the python-devel installation went off OK, fro

Re: Freezing python files into executables

2009-11-03 Thread Girish Venkatasubramanian
Hi Rami, Thanks for pointing this out. I did see that point - but apart from installing python-devel (which has created and populated /usr/lib64/python2.4/...) I am not sure what I should do - is there some setting in python where I can ask it to look at lib64 instead of lib? Thanks. On Tue, Nov 3

Re: Freezing python files into executables

2009-11-03 Thread M.-A. Lemburg
Rami Chowdhury wrote: > On Tue, 03 Nov 2009 11:15:39 -0800, Girish Venkatasubramanian > wrote: > >> Hello, >> I have been using freeze.py on 32 bit linux distributions without a >> problem. But recently I tried to do the same on RHEL5 x86_64 and ran >> into some issues. >> >> 1) When I ran the sc

Re: Freezing python files into executables

2009-11-03 Thread M.-A. Lemburg
Girish Venkatasubramanian wrote: > Hey Marc-Andre, > Ummm - I have installed python-devel.x86_64 and checked that the > /usr/lib64/python2.4/ is populated - anything else I can/shuld do to > check/ensure the the devel rpm is installed? If you have the config/ sub-dir in there, things should be fin

Re: Freezing python files into executables

2009-11-03 Thread Girish Venkatasubramanian
Will try that. Meanwhile I went ahead and used cx_freeze and that seems to work OK. Thanks for your help Rami and Marc-Andre. On Tue, Nov 3, 2009 at 12:31 PM, Rami Chowdhury wrote: > On Tue, 03 Nov 2009 11:57:17 -0800, Girish Venkatasubramanian > wrote: > >> I checked and ls /usr/lib64/python2

Re: Freezing python files into executables

2009-11-03 Thread Girish Venkatasubramanian
Hey Marc-Andre, Ummm - I have installed python-devel.x86_64 and checked that the /usr/lib64/python2.4/ is populated - anything else I can/shuld do to check/ensure the the devel rpm is installed? Thanks. On Tue, Nov 3, 2009 at 11:32 AM, M.-A. Lemburg wrote: > Rami Chowdhury wrote: >> On Tue, 03 No

Freezing python files into executables

2009-11-03 Thread Girish Venkatasubramanian
uot; which installed python-devel.i386 and python-devel.x86_64. Then when I tried freezing, it worked but make barfed up a bunch of errors during ld like /usr/bin/ld: warning: i386 architecture of input file `/usr/lib/python2.4/config/libpython2.4.a(rangeobject.o)' is incompatible with i38

Re: Freezing python files into executables

2009-11-03 Thread Girish Venkatasubramanian
I checked and ls /usr/lib64/python2.4/config/ returns config.c config.c.in install-sh libpython2.4.a Makefile makesetup python.o Setup Setup.config Setup.local so I am guessing the python-devel installation went off OK, from what you say. I looked at the freeze.py code and I see your point. But f

Freezing pycrypto

2009-10-28 Thread mk
Hello everyone, I'm trying to freeze PyCrypto on Linux (using freeze.py) and having trouble with it, can you help me? PyCrypto is used by paramiko (ssh client module). I have added following in the Modules/Setup while building Python (This has to be done because freeze.py requires that all c

Re: multiprocessing and freezing on Windows

2009-07-18 Thread SK
Thanks Gabriel. Posted as: http://bugs.python.org/issue6461 The multiprocessing author has tentatively confirmed the bug. -- http://mail.python.org/mailman/listinfo/python-list

Re: multiprocessing and freezing on Windows

2009-07-05 Thread Gabriel Genellina
En Sat, 04 Jul 2009 22:15:43 -0300, SK escribió: To add a bit more information, I found that I needed to patch get_command_line in multiprocessing/forking.py [...] Is packaging with multiprocessing supposed to be this hard? If so, some documentation is needed. Shouldn't be so hard, I presume

Re: multiprocessing and freezing on Windows

2009-07-04 Thread SK
To add a bit more information, I found that I needed to patch get_command_line in multiprocessing/forking.py replacing: if getattr(sys, 'frozen', False): return [sys.executable, '--multiprocessing-fork'] else: prog = 'from multiprocessing.forking import main

multiprocessing and freezing on Windows

2009-07-02 Thread SK
Is there a method for freezing a Python 2.6 app using multiprocessing on Windows using PyInstaller or py2exe that works? It is trying to call my executable instead of python.exe when the process starts and passes it --multiprocessing-fork . Adding a freeze_support() to my main doesn't help.

Freezing Python Apps on Linux?

2007-03-20 Thread Greg Copeland
I seem to recall several different applications which can create standalone binaries for python on Linux. I know freeze.py and cx_Freeze.py exist. Are these still the preferred methods of creating a stand alone binary out of a python application on Linux? Greg -- http://mail.python.org/mailman

Re: httplib, threading, wx app freezing after 4 hours

2006-07-27 Thread Dermot Doran
According to the "wxPython in Action" book using the wx.CallAfter function in a non-gui thread is a safe way for threads to call functions that will then update the gui in the gui thread.   Cheers!!   Dermot.   On 23/07/06, Mark rainess <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote:> Mark rain

Re: httplib, threading, wx app freezing after 4 hours

2006-07-23 Thread Mark rainess
[EMAIL PROTECTED] wrote: > Mark rainess wrote: > [...] >> It runs perfectly for about 4 hours, then freezes. >> I'm stuck. How do I debug this? > [...] >> Can anyone suggest techniques to help me learn what is going on. > > By inspection: "errcode" is undefined; I expect you stripped the > example

Re: httplib, threading, wx app freezing after 4 hours

2006-07-23 Thread bryanjugglercryptographer
Mark rainess wrote: [...] > It runs perfectly for about 4 hours, then freezes. > I'm stuck. How do I debug this? [...] > Can anyone suggest techniques to help me learn what is going on. By inspection: "errcode" is undefined; I expect you stripped the example a bit too far. If it is set to somethi

Re: httplib, threading, wx app freezing after 4 hours

2006-07-22 Thread Nick Vatamaniuc
Mark, httplib will block waiting for a server connection. I am not sure if that is your problem but you could try a quick and dirty workaround of recording a timestamp of the last data transfer and then have a timer in a separate thread and if too much time passed, restart the retrieval thread and

httplib, threading, wx app freezing after 4 hours

2006-07-22 Thread Mark rainess
The program displays images from a motion jpeg webcam. (Motion jpeg is a bastardization of multi-part mime.) It runs perfectly for about 4 hours, then freezes. I'm stuck. How do I debug this? (Using: Python 2.4.3, wxPython 2.6.3.2, Windows 2

Re: Freezing Python with jythonc

2006-06-26 Thread tac-tics
> What am I doing wrong? Nevermind, I figured it out. -classpath overwrites the classpath not augments. I needed to use -classpath ".;jython.jar" and it works fine. -- http://mail.python.org/mailman/listinfo/python-list

Freezing Python with jythonc

2006-06-26 Thread tac-tics
I've got a nice jython application that I wish to freeze. After playing around with flag settinsg on jythonc, I managed to get it to compile without warnings or errors, but when I try to run my main class file, I keep getting the error: Exception in "main" thread, NoClassDefFoundError. When I just

Re: Freezing a static executable

2006-06-05 Thread Serge Orlov
Will Ware wrote: > I am trying to freeze a static executable. I built a static Python > executable this way: > ./configure --disable-shared --prefix=/usr/local > make > make install > Even that didn't give me a really static executable, though: AFAIK it's not supported because the inte

Freezing a static executable

2006-06-04 Thread Will Ware
I am trying to freeze a static executable. I built a static Python executable this way: ./configure --disable-shared --prefix=/usr/local make make install Even that didn't give me a really static executable, though: $ ldd /usr/local/bin/python linux-gate.so.1 => (0xe000

Re: Freezing

2006-01-14 Thread Mike Meyer
[EMAIL PROTECTED] writes: > Mike Meyer: >>Actually, I like the "len" model, which would be a new builtin that uses the >>__freeze__ method.< > Well, I presume this is a matter of personal tastes and consistency > too. This time I appreciate the freeze() too, but probably some people > can think th

Re: Freezing

2006-01-13 Thread James Stroud
[EMAIL PROTECTED] wrote: > Dicts and sets require immutable keys, like tuples or frozensets Not really... def freeze(anobj): """returns a new hashable object""" import copy try: hash(anobj) except: pass else: return copy.deepcopy(anobj) class FrozenType(type): def __new__(c

Re: Freezing

2006-01-13 Thread bearophileHUGS
ynamic subsets allowed) and frozen subsets aren't much useful. >So why build a mechanism to automate a process that no one uses?< You are right, frozedicts aren't much useful. Maybe that freezing protocol was useful for user defined objects too. >Also note that Guido has said

Re: Freezing

2006-01-12 Thread Mike Meyer
could provide 2 methods: freeze and > frozen, the former would freeze the object in place (e.g. freeze the > object it's applied to) while the later would return a frozen copy of > the object it's applied to. Freezing in place is problematical. For this to work as intended

Re: Freezing

2006-01-12 Thread Raymond Hettinger
were created to support sets of sets, yet even that doesn't come-up often. There seems to be a disease going around and those infected become irresistibly fascinated with freezing. After developing a resistance to practical applications, the infection becomes feverish resulting in delirious pr

Re: Freezing

2006-01-12 Thread bearophileHUGS
The first line of that example has to be: s = |set([1, 3, 5])| But I don't know/remember why set() can't accept many values like max/min: max([1,2,5]) max((1,2,5)) max(1,2,3) Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Freezing

2006-01-12 Thread Xavier Morel
[EMAIL PROTECTED] wrote: > The first line of that example has to be: > > s = |set([1, 3, 5])| > > But I don't know/remember why set() can't accept many values like > max/min: > > max([1,2,5]) > max((1,2,5)) > max(1,2,3) > > Bye, > bearophile > How about just providing a freeze method on `obje

Freezing

2006-01-12 Thread bearophileHUGS
different. This freezing can be shallow or deep (recursive). Example: s = |set(1, 3, 5)| d1 = |{s:1}| d2 = {d1:1} The "|" binary xor can become written "XOR", like the AND, OR, NOT. The &^~ so become free to be used for other purposes, operator overloading, etc (silly exampl

Re: No encodings after freezing

2005-05-23 Thread "Martin v. Löwis"
mmf wrote: > text_new = text.encode('utf_8') [...] > But everytime I run this binary the utf-8 encoding cannot be found. > (Also any other encoding like iso8859_15 cannot be found...) > > What am I doing wrong? Codecs are modules (in the encodings package). So if the codecs you need aren't frozen

No encodings after freezing

2005-05-23 Thread mmf
Hi. I have the following script (for example): #!/usr/bin/python text = 'Hallo' text_new = text.encode('utf_8') print text_new The I tried to "freeze" this script with cx_freeze 3.0.1 (command ./FreezePython example.py). Everything worked finde, a binary was created correctly. But everytime I r

Re: Freezing python application

2005-04-13 Thread Roman Yakovenko
Sorry for previous post - hit the wrong button Hi. I would like to freeze python application on linux. There are a few tools that make the job to be done: freeze ( comes with python ) cx_Freeze Gordon McMillan's installer I have one problem with all of them: they require python to be

Freezing python application

2005-04-13 Thread Roman Yakovenko
Hi. I would like to freeze python application on linux. There are a few tools that make the job to be done: freeze ( comes with python ) cx_Freeze Gordon McMillan's installer Is it possible to freeze python application on linux in such way that it doesn't depends on python installed on cu

Re: Freezing a mutable (was Re: lambda)

2005-01-21 Thread Antoon Pardon
Op 2005-01-21, Bengt Richter schreef <[EMAIL PROTECTED]>: > On 20 Jan 2005 14:07:57 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: > > Would you like a dictionary that acts as you want and takes care of all > problems internally, and accepts keys and values of any type without wrapping > or other mo

Re: Freezing a mutable (was Re: lambda)

2005-01-20 Thread Bengt Richter
On 20 Jan 2005 14:07:57 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: >Op 2005-01-20, Nick Coghlan schreef <[EMAIL PROTECTED]>: >> Antoon Pardon wrote: >>> I missed that you would use it with the idiom: dct[x.frozen()] >> >> The list itself isn't hashable with this approach, so you don't have much

Re: Freezing a mutable (was Re: lambda)

2005-01-20 Thread Antoon Pardon
Op 2005-01-20, Nick Coghlan schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: >> I missed that you would use it with the idiom: dct[x.frozen()] > > The list itself isn't hashable with this approach, so you don't have much > choice. I wasn't particularly clear about that point, though. > >> I hav

Re: Freezing a mutable (was Re: lambda)

2005-01-20 Thread Nick Coghlan
Antoon Pardon wrote: I missed that you would use it with the idiom: dct[x.frozen()] The list itself isn't hashable with this approach, so you don't have much choice. I wasn't particularly clear about that point, though. I have two problems with this approach. 1) It doesn't work when you get your

Re: Freezing a mutable (was Re: lambda)

2005-01-20 Thread Antoon Pardon
ust compare equal to >> the key in the dictionary to get at the same entry. So if you freeze >> a list and its copy but then mutate them differently, they no longer >> are equal and so wont get you at the same entry. > > The trick is that the result of the freezing operatio

Freezing a mutable (was Re: lambda)

2005-01-20 Thread Nick Coghlan
list and its copy but then mutate them differently, they no longer are equal and so wont get you at the same entry. The trick is that the result of the freezing operation is cached until such time as you explicitly unfreeze the object. Output: x: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] y: [0, 1, 2, 3, 4, 5, 6