matplotlib on osx 10.6

2011-10-07 Thread luca72
hello i try to install matplotlib on osx 10.6 , i have also installed freetype libpng and numpy but i get this error: BUILDING MATPLOTLIB matplotlib: 1.1.0 python: 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)]

Re: Deleting files on a shared server

2011-10-07 Thread Tim Golden
On 07/10/2011 02:14, Josh English wrote: This is a follow-up to some questions I posted a month or two ago. I have two programs running on various Windows XP boxes, sharing several resource files on a Windows 2003 server. It's a mapped drive on the workstations to a shared folder. I am using a l

Re: database connection

2011-10-07 Thread Gabriel Genellina
En Fri, 07 Oct 2011 02:18:04 -0300, masood shaik escribió: can u please tell me how we can connect to database without changing the permission of db file using sqlite3 The OS user who executes the Python script must have read (and write, usually) access to the database file - *any* OS us

Re: How to inspect slot wrappers arguments in Python?

2011-10-07 Thread Gabriel Genellina
En Sat, 01 Oct 2011 12:13:45 -0300, julian bilcke escribió: I would like to get the list of parameters I need to initialize an AST node. I'm trying to use the `inspect` module, however it seems I can't use it on a built-in (native?) class, or else I misunderstood. [...] >>> import

Thread handling issue

2011-10-07 Thread Paul
I'm wondering what the best solution for this problem is. I've got a wxpython app, in one part a user makes some selections then opens a dialog to select where to output. At which point the app starts a thread processing their selection while they're choosing an output location, hopefully ready

Re: Thread handling issue

2011-10-07 Thread Tim Golden
On 07/10/2011 09:29, Paul wrote: I'm wondering what the best solution for this problem is. I've got a wxpython app, in one part a user makes some selections then opens a dialog to select where to output. At which point the app starts a thread processing their selection while they're choosing an

Python selenium web driver

2011-10-07 Thread Yesudian Rajkumar Johnkoilpillai
Hi, I am looking into using Selenium 2.0 for launching Firefox and browse few sites. I am using Python APIs to talk to webdriver on Ubuntu 11.04. I am basically trying to follow the steps mentioned at http://pypi.python.org/pypi/selenium . When I run the program, it throws error as below. yesudia

Re: sending ftp file list to mail???

2011-10-07 Thread Gabriel Genellina
En Fri, 07 Oct 2011 03:23:57 -0300, selahattin ay escribió: hi all. I want to get my ftp list and send the list to my mail adress... my codes are And your problem is...? -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list

Re: sending ftp file list to mail???

2011-10-07 Thread Gabriel Genellina
En Fri, 07 Oct 2011 03:23:57 -0300, selahattin ay escribió: hi all. I want to get my ftp list and send the list to my mail adress... my codes are baglanti = FTP("ftp.guncelyorum.org") baglanti.login("**", "***") print baglanti.dir() posta = MIMEMultipart() def posta_olustur():

Re: socket.getsockname is returning junk!!

2011-10-07 Thread Gabriel Genellina
En Wed, 05 Oct 2011 08:56:08 -0300, Wong Wah Meng-R32813 escribió: I am migrating my application from python 1.5.2 to 2.7.1. One of the existing code breaks. The getsockname method from socket object somehow returns me with some number which I deem as junk, rather than the listening port

Re: A tuple in order to pass returned values ?

2011-10-07 Thread Jean-Michel Pichavant
Steven D'Aprano wrote: Jean-Michel Pichavant wrote: In a general manner, ppl will tend to use the minimum arguments required. However, do not pack values into tuple if they are not related. How would you return multiple values if not in a tuple? Tuples are *the* mechanism for returni

RE: socket.getsockname is returning junk!!

2011-10-07 Thread Wong Wah Meng-R32813
Thanks. Someone pointed out that this could be due to a corrupted build, which I revisited the process. I included -lxnet in the linking process of the build, and this problem is resolved. The -lxnet was stated in README file for HP-UX Itanium build, which I somehow dropped it out in the middle

Re: Thread handling issue

2011-10-07 Thread Paul
Tim Golden timgolden.me.uk> writes: > > On 07/10/2011 09:29, Paul wrote: > > I'm wondering what the best solution for this problem is. > > > > I've got a wxpython app, in one part a user makes some selections then > > opens a > > dialog to select where to output. At which point the app starts

Re: A tuple in order to pass returned values ?

2011-10-07 Thread Cameron Simpson
On 07Oct2011 11:43, Jean-Michel Pichavant wrote: | namedtuple sounds great (if you don't use unpacking :o) ), too bad | it is available only from python 2.6. It is easy enough to roll your own. Here's some example code with several flaws (it claims tuplehood, but is actually a list; it is not im

Re: A tuple in order to pass returned values ?

2011-10-07 Thread Peter Otten
Cameron Simpson wrote: > On 07Oct2011 11:43, Jean-Michel Pichavant wrote: > | namedtuple sounds great (if you don't use unpacking :o) ), too bad > | it is available only from python 2.6. > > It is easy enough to roll your own. Or use Raymond Hettinger's implementation: http://code.activestate.

Testing properties that are date-related

2011-10-07 Thread Tim Chase
Are there best practices for testing dates that are properties which take the current date into consideration? I have something like class Foo: def _get_year_range(self): return (self._min_year, self._max_year) def _set_year_range(self, year): if isinstance(year, tuple):

Re: Testing properties that are date-related

2011-10-07 Thread Peter Otten
Tim Chase wrote: > Are there best practices for testing dates that are properties > which take the current date into consideration? I have something > like > >class Foo: > def _get_year_range(self): >return (self._min_year, self._max_year) > def _set_year_range(self, year):

Re: Testing properties that are date-related

2011-10-07 Thread Tim Chase
On 10/07/11 07:38, Peter Otten wrote: Are there best practices for testing dates that are properties which take the current date into consideration The problem is that the behavior of the window_date function depends on the current date (the function makes a guess about adding the century if the

Re: passing multiple string to a command line option

2011-10-07 Thread Miki Tebeka
Seems like self.ptype is a type that has __init__ with no arguments (other than self). You can add "print type(self.ptype)" as first line of "convert" to see what type it is (or place a breakpoint there). -- http://mail.python.org/mailman/listinfo/python-list

Re: Testing properties that are date-related

2011-10-07 Thread Ethan Furman
Tim Chase wrote: On 10/07/11 07:38, Peter Otten wrote: Are there best practices for testing dates that are properties which take the current date into consideration The problem is that the behavior of the window_date function depends on the current date (the function makes a guess about adding

Re: Thread handling issue

2011-10-07 Thread Tim Golden
On 07/10/2011 11:15, Paul wrote: My first thought was to use a flag but wouldn't the new thread see the cancel flag and stop as well? I could set it back but then any other threads might have been busy and not seen it while the flag was on. The thread goes through the selection and does a few qu

Re: Testing properties that are date-related

2011-10-07 Thread Tim Chase
On 10/07/11 09:45, Ethan Furman wrote: Tim Chase wrote: On 10/07/11 07:38, Peter Otten wrote: def setUp(self): foo.window_date = functools.partial(foo.window_date, around=date(2011, 1, 1)) it worked like a charm. Another option is injection: import foo def window_date(...)

Re: passing multiple string to a command line option

2011-10-07 Thread Mahmood Naderan
That print command generated a lot of errors. Since that error in my first post is related to the python code in simulator, I emailed them and consulted for help. Seems that it is going to be fixed Thanks for your kindness :)   // Naderan *Mahmood; - Original Message - From: Miki

Re: help

2011-10-07 Thread Redcat
On Fri, 07 Oct 2011 15:59:55 +, X1 wrote: > I have this program that fails: > > $ vapt > Traceback (most recent call last): > File "/usr/local/bin/vapt", line 3, in > from vapt import vapt > File "/usr/lib/python2.6/site-packages/vapt/__init__.py", line 11, in > > __import__(nam

unsupported operand type(s) for pow(): 'unicode', 'long', 'long': Pycrypto

2011-10-07 Thread Kayode Odeyemi
Hello everyone, I'm writing a fairly large app which uses Oauth (python-oauth2). I am trying to generate a public/private key pair on user supplied parameters (whitespaced-delimited strings basically). When trying to encrypt the key, I'm getting the "unsupported operand type(s) for pow(): 'unicod

Re: unsupported operand type(s) for pow(): 'unicode', 'long', 'long': Pycrypto

2011-10-07 Thread Ian Kelly
On Fri, Oct 7, 2011 at 11:16 AM, Kayode Odeyemi wrote: > Hello everyone, > > I'm writing a fairly large app which uses Oauth (python-oauth2). I am trying > to generate a > public/private key pair on user supplied parameters (whitespaced-delimited > strings basically). > > When trying to encrypt th

Re: help

2011-10-07 Thread Redcat
> Thanks, > I have the Tk module installed, but the program still fails. Probably it > is a problem of path? That would be my guess - that the Tk module is installed somewhere other than where OpenGL.Tk is looking for it. -- http://mail.python.org/mailman/listinfo/python-list

Re: unsupported operand type(s) for pow(): 'unicode', 'long', 'long': Pycrypto

2011-10-07 Thread Kayode Odeyemi
On Fri, Oct 7, 2011 at 7:23 PM, Ian Kelly wrote: > On Fri, Oct 7, 2011 at 11:16 AM, Kayode Odeyemi wrote: > > Hello everyone, > > > > I'm writing a fairly large app which uses Oauth (python-oauth2). I am > trying > > to generate a > > public/private key pair on user supplied parameters > (whites

RE: Thread handling issue

2011-10-07 Thread Prasad, Ramit
-Original Message- From: python-list-bounces+ramit.prasad=jpmorgan@python.org [mailto:python-list-bounces+ramit.prasad=jpmorgan@python.org] On Behalf Of Paul Sent: Friday, October 07, 2011 3:29 AM To: python-list@python.org Subject: Thread handling issue I'm wondering what the be

Re: Advise on using logging.getLogger needed.

2011-10-07 Thread Vinay Sajip
On Oct 2, 11:12 pm, "Steven W. Orr" wrote: > I hope I don't sound like I'm ranting :-( You don't, but neither is it absolutely clear what you're trying to achieve. BTW the term "root logger" in the logging docs refers to a logger internal to the logging package, and not to a logger that you creat

deepcopy does not work for A subclassed list

2011-10-07 Thread txismis unzetabarrenetxeagoikolea
This is the issue I have created a mylist class by subclassing a List, added several attributes to mylist , and overrided the append method which takes into account one of the new attributes. mylist class is functional and works as I planned, but when I try to deepcopy objects from mylist I

[ANN] pypiserver 0.3.0 - minimal pypi server

2011-10-07 Thread Ralf Schmitt
Hi, I've just uploaded pypiserver 0.3.0 to the python package index. pypiserver is a minimal PyPI compatible server. It can be used to serve a set of packages and eggs to easy_install or pip. pypiserver is easy to install (i.e. just easy_install pypiserver). It doesn't have any external dependen

Memory

2011-10-07 Thread Frank Ruiz
Quick question, What is the best way for pulling resource information for a system running linux? Was wondering if there was a python only way. Methods I am aware of are: 1. Parsing contents of /proc 2. Running a system command like free, or dmidecode and parsing the output. Is there any other

Re: Dabo 0.9.4 Released!

2011-10-07 Thread Ed Leafe
On Oct 6, 2011, at 12:18 PM, Neal Becker wrote: > What is it? Sorry, I guess I should have included that. We've been around for so long I sometimes assume that everyone knows what Dabo is. Dabo is a framework for building desktop applications. It is strongly geared toward datab

Re: Memory

2011-10-07 Thread Christian Heimes
Am 07.10.2011 21:39, schrieb Frank Ruiz: > Quick question, > > What is the best way for pulling resource information for a system > running linux? Was wondering if there was a python only way. > > Methods I am aware of are: > > 1. Parsing contents of /proc > 2. Running a system command like free

Re: recommend a graphics library for plotting by the pixel?

2011-10-07 Thread Adam Funk
On 2011-10-04, Ian Kelly wrote: > On Tue, Oct 4, 2011 at 3:56 AM, Adam Funk wrote: >> I'd like to create a window with a "pause" button and a large plotting >> area, in which I'd like to draw a polygon, detect the pixel >> coördinates of a mouse click, and then start setting the colors of >> pixe

Re: recommend a graphics library for plotting by the pixel?

2011-10-07 Thread Adam Funk
On 2011-10-05, Westley Martínez wrote: > On Wed, Oct 05, 2011 at 02:29:38PM +0100, Adam Funk wrote: >> I only know PyGame because we did an exercise in recreating the old >> breakout game and messing around with it at a local Python group. >> >> I was under the mistaken impression from that exer

Re: deepcopy does not work for A subclassed list

2011-10-07 Thread MRAB
On 07/10/2011 20:29, txismis unzetabarrenetxeagoikolea wrote: This is the issue I have created a mylist class by subclassing a List, added several attributes to mylIst , and overrided the append method which takes into account one of the new attributes. mylist class is functional and works as I

Re: Thread handling issue

2011-10-07 Thread Cameron Simpson
On 07Oct2011 10:15, Paul wrote: | Tim Golden timgolden.me.uk> writes: | > On 07/10/2011 09:29, Paul wrote: | > > My problem is if the user doesn't select an output location and cancels the | > > dialog to go back to the selection I want to terminate the thread to avoid the | > > user opening an

Re: deepcopy does not work for A subclassed list

2011-10-07 Thread Terry Reedy
On 10/7/2011 4:37 PM, MRAB wrote: On 07/10/2011 20:29, txismis unzetabarrenetxeagoikolea wrote: Any ideas about how to make the copy module to behave as expected. The documentation talks about defining a "__deepcopy__" method. Specifically, in the copy module doc "In order for a class to d

Re: help

2011-10-07 Thread Terry Reedy
On 10/7/2011 12:56 PM, Redcat wrote: On Fri, 07 Oct 2011 15:59:55 +, X1 wrote: I have this program that fails: $ vapt Traceback (most recent call last): File "/usr/local/bin/vapt", line 3, in from vapt import vapt File "/usr/lib/python2.6/site-packages/vapt/__init__.py", line 11

Re: unsupported operand type(s) for pow(): 'unicode', 'long', 'long': Pycrypto

2011-10-07 Thread Terry Reedy
On 10/7/2011 2:54 PM, Kayode Odeyemi wrote: pow() needs params in non-unicode. pow() need 2 or 3 numbers as args. The function that calls it must turn the (2.x) string into a number, either with hash() or its own hash function. That latter function probably want integers code in range(256).

The hyper fused upper part of Nike Air

2011-10-07 Thread jerser-2009
The hyper fused upper part of Nike Air Max displays the humanity of the designer because of its lightweight, breathability and a feeling of plusher fitness. The mesh inner collar, and the soft springy cushion http://www.outlet-nike-air-max.com/inside can protect the feet against most possible injur

Re: Deleting files on a shared server

2011-10-07 Thread Gabriel Genellina
En Fri, 07 Oct 2011 04:45:32 -0300, Tim Golden escribió: On 07/10/2011 02:14, Josh English wrote: To delete the files, I am using os.unlink. One lock file refuses to disappear, even though I have code at both application startup and shutdown (on the OnInit and OnExit methods to the wxPython