> How about
>
> import tkinter
> root = tkinter.Tk()
>
> root.clipboard_clear()
> root.clipboard_append("whatever")
>
that works, thank you
--
http://mail.python.org/mailman/listinfo/python-list
Wanderer wrote:
> How
> do you handle this sort of thing in Python?
I believe that the best thing to do is a Union-Find algorithm.
Depending on the exact nature of your problem, you may also want to
check out the Hoshen-Kopelman Algorithm. Although the algorithm itself
is rather efficient, it
On 3/8/12 9:12 AM, Enrico Franchi wrote:
Wanderer wrote:
How
do you handle this sort of thing in Python?
I believe that the best thing to do is a Union-Find algorithm.
Another term this problem is finding the "connected components". Here is some
code from Stefan van der Walt for this:
On Wed, 07 Mar 2012 21:47:37 -0800, Ned Deily wrote:
> In article
> ,
> Chris Rebert wrote:
>> You generally shouldn't mess with Mac OS X's system copies of Python.
>> Typically, one installs a separate copy using MacPorts, Fink, or
>> whatever, and uses that instead.
>
> I don't understand wha
I have the same problem with python 2.6.2.
I have upgraded to 2.7.1 and the leak is gone.
--
http://mail.python.org/mailman/listinfo/python-list
Is there a version of cython.py, pyext.py that will work with c++?
I asked this question some time ago, but never got an answer.
I tried the following code, but it doesn't work correctly. If the commented
lines are uncommented, the gcc command is totally mangled.
Although it did build my 1 tes
Neal Becker, 08.03.2012 15:23:
> Is there a version of cython.py, pyext.py that will work with c++?
>
> I asked this question some time ago, but never got an answer.
>
> I tried the following code, but it doesn't work correctly. If the commented
> lines are uncommented, the gcc command is total
On 03/08/2012 09:23 AM, Neal Becker wrote:
Is there a version of cython.py, pyext.py that will work with c++?
I asked this question some time ago, but never got an answer.
I tried the following code, but it doesn't work correctly. If the commented
lines are uncommented, the gcc command is tota
Hello everyone.
This is my first post in this group.
I started learning python a week ago from the "dive into python" e-
book and thus far all was clear.
However today while reading chapter 5 about objects and object
orientation I ran into something that confused me.
it says here:
http://www.divei
SUDS version 0.4 pn x86_64 Python 2.7
I'm having a bear of a time getting HTTP Basic Authentication to work
for a SOAP request via suds. Also using an HTTP proxy server.
In WireShark I just see a request -
GET http://./services/services/JobService-0.0.1?wsdl HTTP/1.1
Accept-Encoding: identit
On Mar 7, 3:27 pm, Ian Kelly wrote:
> On Wed, Mar 7, 2012 at 1:03 PM, Ian Kelly wrote:
> > A set of defective pixels would be the probable choice, since it
> > offers efficient membership testing.
>
> Some actual code, using a recursive generator:
>
> def get_cluster(defective, pixel):
> yiel
On Thursday, March 8, 2012 4:25:06 PM UTC+1, hyperboogie wrote:
> My question is if __init__ in the descendant class overrides __init__
> in the parent class how can I call the parent's __init__ from the
> descendant class - I just overrode it didn't I?
>
> Am I missing something more fundamental
Maarten wrote:
> Alternatively you can figure out the parent class with a call to super:
This is WRONG:
> super(self.__class__, self).__init__()
You have to name the current class explicitly. Consider:
>> class A(object):
... def __init__(self):
... print "in a"
...
>>
hyperboogie wrote:
Hello everyone.
This is my first post in this group.
I started learning python a week ago from the "dive into python" e-
book and thus far all was clear.
However today while reading chapter 5 about objects and object
orientation I ran into something that confused me.
it says h
On Wed, 2012-03-07 at 19:14 +0530, janaki rajamani wrote:
> I am stuck with the brain workshop software implemented using python.
> The code involves a lot of GUI elements and i am familar only with the
> basic python programming.
> I would like to know whether there are built in classes to support
> > I am stuck with the brain workshop software implemented using python.
> > The code involves a lot of GUI elements and i am familar only with the
> > basic python programming.
> > I would like to know whether there are built in classes to support GUI
> > elements or arethey project dependant.
>
In article ,
Ned Deily wrote:
> http://www.activestate.com/activetcl/downloads
GREAT ! It seems to work.
At least, I can now get the ~ char in France from within IDLE.
A big step for manking :-)
Thanks folks,
franck
--
http://mail.python.org/mailman/listinfo/python-list
Alright, I'm simply lost about how to install these modules. I
extracted the folders from the .tar.gz files and then went into those
folders in my command prompt. I typed:
C:\Python32\python setup.py install
and for a while something was happening (I was doing the lxml one) and
then it stopped wi
On Mar 8, 3:33 pm, John Salerno wrote:
> Alright, I'm simply lost about how to install these modules. I
> extracted the folders from the .tar.gz files and then went into those
> folders in my command prompt. I typed:
>
> C:\Python32\python setup.py install
>
> and for a while something was happeni
In <21519dbf-4097-4780-874d-41d76f645...@x17g2000yqj.googlegroups.com> John
Salerno writes:
> Well, after a bit of experimentation, I got it to run, but I seem to
> have run into the same error as when I used setup.py:
> http://i271.photobucket.com/albums/jj138/JohnJSal/lxml_error.png
> Now I
On Mar 8, 3:40 pm, John Salerno wrote:
> Now I have no idea what to do.
Hmph, I suppose I should have more patience. I realized that the
easy_install for lxml only tried to install a binary version, which
doesn't exist for the version it found (the latest, 2.3.3). I just had
to look through the
I'm pulling image data from a database blob, and serving
it from a web2py app. I have to send the correct
Content-Type header, so I need to detect the image type.
Everything that I've found on the web so far, needs a file
name on the disk, but I only have the data.
It looks like the 'magic' pack
On 03/08/2012 04:55 PM, Tobiah wrote:
I'm pulling image data from a database blob, and serving
it from a web2py app. I have to send the correct
Content-Type header, so I need to detect the image type.
Everything that I've found on the web so far, needs a file
name on the disk, but I only have t
On 03/08/2012 04:40 PM, John Salerno wrote:
http://i271.photobucket.com/albums/jj138/JohnJSal/lxml_error.png
Nothing to do with Python, but you'd save us all a lot of space and
bandwidth if you learned how to copy/paste from a Windows cmd window.
If you're just doing it rarely, you can rig
On 3/7/2012 6:18 PM, Ben Finney wrote:
Steven D'Aprano writes:
On Thu, 08 Mar 2012 08:48:58 +1100, Ben Finney wrote:
I think that's a Python bug. If the latter succeeds as a no-op, the
former should also succeed as a no-op. Neither should ever get any
errors when ‘s’ is a ‘unicode’ object alr
Thanks, I had no idea about either option, since I don't use the
command prompt very much. Needless to say, the Linux console is much
nicer :)
On Thu, Mar 8, 2012 at 4:19 PM, Dave Angel wrote:
> On 03/08/2012 04:40 PM, John Salerno wrote:
>>
>>
>> http://i271.photobucket.com/albums/jj138/JohnJ
On 03/08/2012 02:11 PM, Dave Angel wrote:
> On 03/08/2012 04:55 PM, Tobiah wrote:
>> I'm pulling image data from a database blob, and serving
>> it from a web2py app. I have to send the correct
>> Content-Type header, so I need to detect the image type.
>>
>> Everything that I've found on the web
Also, I realize that I could write the data to a file
and then use one of the modules that want a file path.
I would prefer not to do that.
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
On 03/08/2012 05:28 PM, Tobiah wrote:
I should simplify my question. Let's say I have a string
that contains image data called 'mystring'.
I want to do
mime_type = some_magic(mystring)
and get back 'image/jpg' or 'image/png' or whatever is
appropriate for the image data.
Thanks!
Tobiah
> Right. The real problem is that Python 2.7 doesn't have distinct
> "str" and "bytes" types. type(bytes() returns
> "str" is assumed to be ASCII 0..127, but that's not enforced.
> "bytes" and "str" should have been distinct types, but
> that would have broken much old code. If they were dis
El 08/03/12 16:44, Adam Tauno Williams escribió:
SUDS version 0.4 pn x86_64 Python 2.7
I'm having a bear of a time getting HTTP Basic Authentication to work
for a SOAP request via suds. Also using an HTTP proxy server.
In WireShark I just see a request -
GET http://./services/services/JobS
> > Alternatively, you can put the console in quick-edit mode (I think it's
> > called, it's been a long time since I ran Windows). That's an option you
> > set on one cmd window, and it sticks for future windows.
> >
> > In quick-edit, you just right-click-drag on the cmd window to select a
> > r
On 03/08/2012 06:02 PM, Prasad, Ramit wrote:
Actually in quick-edit mode (XP and higher) you just select with
left click and then hit enter which copies it to the clipboard.
If you also enable insert mode (not sure if this is Win7 specific)
you can even right click to paste into the console, just
Dave Angel wrote:
On 03/08/2012 04:40 PM, John Salerno wrote:
http://i271.photobucket.com/albums/jj138/JohnJSal/lxml_error.png
Nothing to do with Python, but you'd save us all a lot of space and
bandwidth if you learned how to copy/paste from a Windows cmd window.
On Windows XP it is:
Mo
> I have to assume you're talking python 2, since in python 3, strings
> cannot generally contain image data. In python 2, characters are pretty
> much interchangeable with bytes.
Yeah, python 2
> if you're looking for a specific, small list of file formats, you could
> make yourself a sign
On 8-3-2012 23:34, Tobiah wrote:
> Also, I realize that I could write the data to a file
> and then use one of the modules that want a file path.
> I would prefer not to do that.
>
> Thanks
>
Use StringIO then, instead of a file on disk
Irmen
--
http://mail.python.org/mailman/listinfo/python-
On Thursday, 8 March 2012 23:40:13 UTC, Tobiah wrote:
> > I have to assume you're talking python 2, since in python 3, strings
> > cannot generally contain image data. In python 2, characters are pretty
> > much interchangeable with bytes.
>
> Yeah, python 2
>
>
> > if you're looking for a s
John Salerno wrote:
> So much work just to get a 3rd party module installed!
"New! Try out the beta release of Beautiful Soup 4. (Last updated
February 28, 2012)
easy_install beautifulsoup4 or pip install beautifulsoup4 or download
a tarball."
http://www.crummy.com/software/BeautifulSoup/
Worke
On Thursday, March 8, 2012 9:38:51 PM UTC-6, alex23 wrote:
> John Salerno wrote:
> > So much work just to get a 3rd party module installed!
>
> "New! Try out the beta release of Beautiful Soup 4. (Last updated
> February 28, 2012)
> easy_install beautifulsoup4 or pip install beautifulsoup4 or dow
Hi Janaki,
Python will mostly use either the pygtk library or pyqt library for any
rich and production quality GUI.
So you must try figuring out if either of these 2 libraries are used.
Other than this, there is tkinter which i guess comes with Python as
default.
Happy hacking.
Krishnakant.
The following is the part of my code which is running faster locally
and more slowly remotely via ssh on the same machine. Note I am trying
to generate a multi-page report.
## create plots and write to a pdf file
from scipy import *
import matplotlib.pyplot as plt
from matplotlib.backends.backend
On 09/03/2012 04:40, amar Singh wrote:
The following is the part of my code which is running faster locally
and more slowly remotely via ssh on the same machine. Note I am trying
to generate a multi-page report.
## create plots and write to a pdf file
from scipy import *
import matplotlib.pyplo
On 03/07/2012 06:44 AM, janaki rajamani wrote:
> Hi
>
> I am stuck with the brain workshop software implemented using python.
> The code involves a lot of GUI elements and i am familar only with the
> basic python programming.
> I would like to know whether there are built in classes to support GU
43 matches
Mail list logo