Re: resolving module name conflicts. (pytz version 2010b)

2011-11-11 Thread Gelonida N
On 11/12/2011 01:42 AM, Steven D'Aprano wrote: > On Fri, 11 Nov 2011 23:11:38 +0100, Gelonida N wrote: > >> Pytz is only imported by one module, so I wondered if there were any >> tricks to 'change sys.path' prior to importing pytz > > sys.path is just a list of paths. You can import the sys modu

Re: all() is slow?

2011-11-11 Thread Steven D'Aprano
On Thu, 10 Nov 2011 23:35:32 -0500, Devin Jeanpierre wrote: >> That is patently untrue. If you were implementing namedtuple without >> exec, you would still (or at least you *should*) prevent the user from >> passing invalid identifiers as attribute names. What's the point of >> allowing attribute

Re: resolving module name conflicts.

2011-11-11 Thread Steven D'Aprano
On Fri, 11 Nov 2011 23:11:38 +0100, Gelonida N wrote: > Pytz is only imported by one module, so I wondered if there were any > tricks to 'change sys.path' prior to importing pytz sys.path is just a list of paths. You can import the sys module and manipulate it any way you like. -- Steven --

xmlrpclib date times and a trailing Z

2011-11-11 Thread Travis Parks
I am trying to connect to Marchex's a call tracking software using xmlrpclib. I was able to get some code working, but I ran into a problem dealing with transfering datetimes. When I construct a xmlrpclib.ServerProxy, I am setting the use_datetime flag to indicate that I want to automatically conv

Re: resolving module name conflicts.

2011-11-11 Thread Gelonida N
On 11/11/2011 10:51 PM, Eric Snow wrote: > On Fri, Nov 11, 2011 at 2:34 PM, Eric Snow > wrote: > > So if you run a module as a script, that empty string will be added to > sys.path and all imports will first check the directory you were in > when you ran Python... > Yes that's normal (and for

Re: SMS api for python

2011-11-11 Thread Miki Tebeka
You can use services like https://www.tropo.com/home.jsp or http://www.twilio.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: resolving module name conflicts.

2011-11-11 Thread Gelonida N
On 11/11/2011 10:31 PM, Emile van Sebille wrote: > On 11/11/2011 12:27 PM Gelonida N said... >> Is there any way to tell pytz to import it's own tests package and tell >> the rest of the code to import the other? >> >> Python version is 2.6.5 >> >> >> Thanks in advance for any suggestion. > > Star

Re: resolving module name conflicts.

2011-11-11 Thread Eric Snow
On Fri, Nov 11, 2011 at 2:34 PM, Eric Snow wrote: > The problem is that the empty string is still added to the from of > sys.path.  I'm going to have to find out more about that one. Okay, don't know how I missed it but the docs for sys.path[1] spell it out: "As initialized upon program star

Re: resolving module name conflicts.

2011-11-11 Thread Eric Snow
On Fri, Nov 11, 2011 at 1:27 PM, Gelonida N wrote: > > > Hi, > > I got some code. > - This code contains a package named tests > - there are at least 100 references in different python files >        importing from above mentioned tests package. > - the code also imports pytz at one place > > I ge

Re: resolving module name conflicts.

2011-11-11 Thread Emile van Sebille
On 11/11/2011 12:27 PM Gelonida N said... Hi, I got some code. - This code contains a package named tests - there are at least 100 references in different python files importing from above mentioned tests package. - the code also imports pytz at one place I get following warning messa

Re: How to dynamically create a derived type in the Python C-API

2011-11-11 Thread Ethan Furman
The question is on StackOverflow if you want to answer it directly: http://stackoverflow.com/questions/8066438 ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

resolving module name conflicts.

2011-11-11 Thread Gelonida N
Hi, I got some code. - This code contains a package named tests - there are at least 100 references in different python files importing from above mentioned tests package. - the code also imports pytz at one place I get following warning message: /usr/lib/python2.6/dist-packages/pytz/_

How to dynamically create a derived type in the Python C-API

2011-11-11 Thread Ethan Furman
Asking on behalf of Sven Marnach: - Assume we have the type Noddy as defined in the tutorial on writing C extension modules for Python. Now we want to create a derived type, overwriting only the __new__() method of Noddy. Cur

DISCOVER ISLAM - THE FASTEST GROWING RELIGION IN THE WORLD !!!!!!!!!!!!

2011-11-11 Thread BV
DISCOVER ISLAM - THE FASTEST GROWING RELIGION IN THE WORLD Did you read about Islam from it,s original sources? Is the information about Islam that published at International Media is correct ? Excuse me!! Would you stop for a moment?! O...man...Haven't you thought-one day- about yourself ? Who h

Re: SMS api for python

2011-11-11 Thread Arjuna Software
On Oct 21, 4:41 am, Chris Rebert wrote: > On Fri, Oct 21, 2011 at 12:10 AM, Pankaj wrote: > > I want to make an api that would recieve the SMS text from the user > > and process it then send the result back to the use. Is there any api > > that I can use to do this?? > > There would seem to be se

Re: SMS api for python

2011-11-11 Thread Arjuna Software
On Oct 21, 3:10 am, Pankaj wrote: > I want to make an api that would recieve the SMS text from the user > and process it then send the result back to the use. Is there any api > that I can use to do this?? Send SMS Text messages using SMS API: http://www.txtimpact.com/sms-gateway-api.asp TxtImpac

Re: Get keys from a dicionary

2011-11-11 Thread John Gordon
In Gelonida N writes: > > > There is a fast way (trick) to get k1 and k2 as string. > > > > > > Whithout loop all dict. Just it! > If my guessing was correct is this what you are looking for? He said he didn't want to loop over the dict contents. Without that, I don't think there's an answe

Re: Get keys from a dicionary

2011-11-11 Thread Gelonida N
On 11/11/2011 02:31 PM, macm wrote: > > Hi Folks > > > > I pass a nested dictionary to a function. > > > > def Dicty( dict[k1][k2] ): > > print k1 > > print k2 > > > > There is a fast way (trick) to get k1 and k2 as string. > > > > Whithout loop all dict. Just it! > > > > Regards > > > > ma

Re: bug python2.3+zipimport+ubuntu 10.04 amd_64

2011-11-11 Thread Robin Becker
OK it seems there's a bug in zipimport.c that was fixed in 2.4. I copied across the 2.4 version and after removing a single new error check the rebuilt python 2.3 works fine. There was supposed to be a patch here http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/Modules/zipimport.c?r

Re: Get keys from a dicionary

2011-11-11 Thread Gelonida N
On 11/11/2011 02:31 PM, macm wrote: > Hi Folks > > I pass a nested dictionary to a function. > > def Dicty( dict[k1][k2] ): > print k1 > print k2 > > There is a fast way (trick) to get k1 and k2 as string. > > Whithout loop all dict. Just it! > > Regards > > macm I think the ans

Re: Get keys from a dicionary

2011-11-11 Thread macm
On Nov 11, 2:25 pm, John Gordon wrote: > In <8f5215a8-d08f-4355-a5a2-77fcaa32c...@j10g2000vbe.googlegroups.com> macm > writes: > > > I pass a nested dictionary to a function. > > def Dicty( dict[k1][k2] ): > > That's not valid syntax. > > >    print k1 > >    print k2 > > There is a fast way (tr

Re: Get keys from a dicionary

2011-11-11 Thread John Gordon
In macm writes: > >>> myDict = {} > >>> myDict['foo'] = {} > >>> myDict['foo']['bar'] = 'works' > - > >>> def myFunction( MyObj ): > ... # MyObj is a nested dicionary (normaly 2 steps like myDict['foo'] > ['bar']) > ... # I want inspect this MyObj > ... # what keys was pass > ...

bug python2.3+zipimport+ubuntu 10.04 amd_64

2011-11-11 Thread Robin Becker
I'm trying to run some aged software on a new machine which runs Linux app2.reportlab.com 2.6.32-30-generic #59-Ubuntu SMP Tue Mar 1 21:30:46 UTC 2011 x86_64 GNU/Linux Ubuntu 10.04.2 LTS The software is required to use python 2.3 so first I've had some problems building python itself. Appare

Re: Get keys from a dicionary

2011-11-11 Thread Dave Angel
On 11/11/2011 11:33 AM, macm wrote: Hi Sorry ! My mistake. myDict = {} myDict['foo'] = {} myDict['foo']['bar'] = 'works' - def myFunction( MyObj ): ... # MyObj is a nested dicionary (normaly 2 steps like myDict['foo'] ['bar']) No, it's not. It's a string "works". There's no di

Re: Get keys from a dicionary

2011-11-11 Thread macm
Ok Sorry!! Sorry the noise!! def func(object): print "%s" % object Regards On Nov 11, 2:33 pm, macm wrote: > Hi > > Sorry ! My mistake. > > >>> myDict = {} > >>> myDict['foo'] = {} > >>> myDict['foo']['bar'] = 'works' > > - > > >>> def myFunction( MyObj ): > > ...     # MyObj is a

Re: Get keys from a dicionary

2011-11-11 Thread macm
Hi Sorry ! My mistake. >>> myDict = {} >>> myDict['foo'] = {} >>> myDict['foo']['bar'] = 'works' - >>> def myFunction( MyObj ): ... # MyObj is a nested dicionary (normaly 2 steps like myDict['foo'] ['bar']) ... # I want inspect this MyObj ... # what keys was pass ... print M

Re: Get keys from a dicionary

2011-11-11 Thread John Gordon
In <8f5215a8-d08f-4355-a5a2-77fcaa32c...@j10g2000vbe.googlegroups.com> macm writes: > I pass a nested dictionary to a function. > def Dicty( dict[k1][k2] ): That's not valid syntax. > print k1 > print k2 > There is a fast way (trick) to get k1 and k2 as string. Are you stating t

Re: Get keys from a dicionary

2011-11-11 Thread Jon Clements
On Nov 11, 1:31 pm, macm wrote: > Hi Folks > > I pass a nested dictionary to a function. > > def Dicty( dict[k1][k2] ): >         print k1 >         print k2 > > There is a fast way (trick) to get k1 and k2 as string. > > Whithout loop all dict. Just it! > > Regards > > macm I've tried to underst

Re: No matter what I do, IDLE will not work...

2011-11-11 Thread Suresh Sharma
Hello all, I need to know how to connect python 3.2 with mysql db i am newbie and appreciate your help to enhance my skills. I googled a lot but nothing came up Ned Deily wrote: >In article ><415ed0ec-65a5-41df-b81e-d74786c74...@s5g2000vbe.googlegroups.com>, > CAMERON ALLEY wrote: >> IT WOR

Re: property decorator and inheritance

2011-11-11 Thread Laurent
Hey yes it's working that way. But I don't like it very much either. If as OKB said the whole point is that outside functions can't detect a property then I'm going to stick with the non-decorator way. Thanks anyway. -- http://mail.python.org/mailman/listinfo/python-list