Re: event handling in pyuthon

2010-02-09 Thread Tiago Katcipis
On Tue, Feb 9, 2010 at 5:20 AM, Bujji  wrote:

> hi all,
> any event handling mechanisms in python ?
> i want event handler examples in python
>

dont know if it is this that you are looking for:

http://home.gna.org/py-notify/


>
>
> Thanks
> Bujji
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Cross-platform way to retrieve the current (Operative system) DNS server IP address in python

2010-04-27 Thread Tiago Katcipis
maybe this helps you:

http://pypi.python.org/pypi/netifaces/0.3

best regards,
Katcipis

On Tue, Apr 27, 2010 at 7:49 PM, joamag  wrote:

> On 24 Abr, 14:50, DarkBlue  wrote:
> > On Apr 22, 4:55 pm, joamag  wrote:
> >
> > > Does anybody know a cross platform way to retrieve the default DNS
> > > server IP address in python ?
> >
> > > Thanks !
> > > João
> >
> > import os,urllib2,re
> >
> > def getIpAddr():
> > """
> > Function for parsing external ip adress by pinging dyndns.com
> > """
> > 
> > External_IP=urllib2.urlopen('http://checkip.dyndns.com/').read(
> )
> > m = re.search(r"(([0-9]+\.){3}[0-9]+)", External_IP)
> > my_IP= m.group(1)
> > return my_IP
> >
> > print('Current Ip from DynDns :  %s ') % getIpAddr()
> >
> > this gets you your ip address
> >
> > hope it helps.
>
> Hi,
>
> It's not my ip address that I want to discover... I want to discover
> my default dns server ip address.
> This ip is stored in an operative system basis.
>
> Dos anyone know how to get it ?
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Portability--Not very portable?

2010-08-06 Thread Tiago Katcipis
On Fri, Aug 6, 2010 at 12:28 AM, W. eWatson  wrote:

> On 8/5/2010 7:45 PM, geremy condra wrote:
>
>> On Thu, Aug 5, 2010 at 6:50 PM, W. eWatson
>>  wrote:
>>
>>> In my on-again-off-again experience with Python for 18 months,
>>> portability
>>>
>>> seems an issue.
>>>
>>> As an example, my inexperienced Python partner 30 miles away has gotten
>>> out
>>> of step somehow. I think by installing a different version of numpy than
>>> I
>>> use. I gave him a program we both use months ago, and he had no trouble.
>>> (We
>>> both use IDLE on 2.5). I made a one character change to it and sent him
>>> the
>>> new py file. He can't execute it. I doubt he has changed anything in the
>>> intervening period.
>>>
>>
>> Portability doesn't mean you can use different versions of your
>> dependencies and be A-OK. It should be fairly obvious that if the
>> behavior of your dependencies changes, your code needs to change to
>> ensure that it demonstrates the same behavior. Portability also
>> doesn't mean that any given one-character change is valid, so that may
>> be your issue as well.
>>
>>  A further example. Months ago I decided to see if I could compile a
>>> program
>>> to avoid such problems as above. I planned to satisfy that need, and see
>>> if
>>> I could distribute some simple programs to non-Python friends. I pretty
>>> well
>>> understand the idea,and got it working with a small program. It seemed
>>> like
>>> a lot of manual labor to do it.
>>>
>>
>> What, why were you compiling a program? And why not just use distutils?
>>
>> Geremy Condra
>>
>
> I checked the one char change on my system thoroughly. I looked around on
> some forums and NGs 4 months ago, and found no one even had a simple
> "compiled program" available to even demonstrate some simple example.
>
> I would think there are some small time and big time Python players who
> sell executable versions of their programs for profit?
>
> disutils. Sounds familiar. I'm pretty sure I was using Py2Exe, and disutils
> might have been part of it.
>

And what was hard to do with Py2Exe? i used it on relatively complex college
work using QT and the worse i had to do was include a "sip" option to make
Py2Exe work with PyQT. But the setup.py script that generates the .exe
(automatically) was ridiculously small and simple (
https://svn.inf.ufsc.br/katcipis/python/FormaisGUI/src/setup.py).

For me compiling a python program into an .exe always was pretty easy
(already made it at my work with a prototype, that one was quite complex, i
just had some problem with the netifaces module).


>
> So how does one keep a non-Python user in lock step with my setup, so these
> problems don't arise? I don't even want to think about having him uninstall
> and re-install. :-) Although maybe he could do it without making matters
> worse.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://www.getgnulinux.org/windows
-- 
http://mail.python.org/mailman/listinfo/python-list