Re: Implementing Python-OAuth2

2011-10-11 Thread Kayode Odeyemi
On Thu, Oct 6, 2011 at 5:15 PM, Jeff Gaynor wrote: > On 10/06/2011 08:34 AM, Kayode Odeyemi wrote: > >> Hello friends, >> >> I'm working on a pretty large application that I will like to use oauth2 >> on as an authentication and authorization mechanism. >> >> I understand fairly the technology and

Re: regexp compilation error

2011-10-11 Thread Ovidiu Deac
Thanks for the answer. I will give a try to pypy regex. On Fri, Sep 30, 2011 at 4:56 PM, Vlastimil Brom wrote: > 2011/9/30 Ovidiu Deac : >> This is only part of a regex taken from an old perl application which >> we are trying to understand/port to our new Python implementation. >> >> The origina

Re: Implementing Python-OAuth2

2011-10-11 Thread Alec Taylor
Maybe use CAS instead of OAuth? https://wiki.jasig.org/display/CASC/Pycas On Tue, Oct 11, 2011 at 7:16 PM, Kayode Odeyemi wrote: > On Thu, Oct 6, 2011 at 5:15 PM, Jeff Gaynor > wrote: >> >> On 10/06/2011 08:34 AM, Kayode Odeyemi wrote: >>> >>> Hello friends, >>> >>> I'm working on a pretty larg

Re: Usefulness of the "not in" operator

2011-10-11 Thread Nobody
On Tue, 11 Oct 2011 04:33:43 +1100, Chris Angelico wrote: >> The Church numeral for N is a function of two arguments which applies its >> first argument N times to its second, i.e. (f^N)(x) = f(f(...(f(x))...)). >> > > Thanks - nice clear explanation. Appreciated. For an encore, can you > give an

xml tree writing with ElementTree; prepends elements with ns0

2011-10-11 Thread Alex van der Spek
When reading a tree and writing it back to a new file all the elements are prepended with the string ns0: Why is it prepended and how can I suppress this? Thanks, Alex van der Spek -- http://mail.python.org/mailman/listinfo/python-list

Re: Usefulness of the "not in" operator

2011-10-11 Thread Chris Angelico
On Tue, Oct 11, 2011 at 7:28 PM, Nobody wrote: > It's useful insofar as it allows you to define "numbers" given nothing > other than abstraction and application, which are the only operations > available in the lambda calculus. > Heh. This is why mathematicians ALWAYS make use of previously-defin

installeventfilter

2011-10-11 Thread luca72
helo i have this form how i can install the event filter: Class Form(QWidget, Ui_Form): """ Class documentation goes here. """ def __init__(self, parent = None): """ Constructor """ QWidget.__init__(self, parent) self.setupUi(self) Thanks --

Re: xml tree writing with ElementTree; prepends elements with ns0

2011-10-11 Thread Alain Ketterlin
"Alex van der Spek" writes: > When reading a tree and writing it back to a new file all the elements are > prepended with the string ns0: That's a namespace prefix. > > Why is it prepended and how can I suppress this? See http://effbot.org/zone/element-namespaces.htm I'm not sure you can def

Re: xml tree writing with ElementTree; prepends elements with ns0

2011-10-11 Thread Alain Ketterlin
Alain Ketterlin writes: > "Alex van der Spek" writes: > >> When reading a tree and writing it back to a new file all the elements are >> prepended with the string ns0: > > That's a namespace prefix. > >> >> Why is it prepended and how can I suppress this? > > See http://effbot.org/zone/element-

Re: installeventfilter

2011-10-11 Thread Vincent Vande Vyvre
Le 11/10/11 10:39, luca72 a écrit : helo i have this form how i can install the event filter: Class Form(QWidget, Ui_Form): """ Class documentation goes here. """ def __init__(self, parent = None): """ Constructor """ QWidget.__

Re: installeventfilter

2011-10-11 Thread Phil Thompson
On Tue, 11 Oct 2011 11:57:28 +0200, Vincent Vande Vyvre wrote: > Le 11/10/11 10:39, luca72 a �crit�: > helo i have this form how i can install the event filter: > Class Form(QWidget, Ui_Form): > """ > Class documentation goes here. > """ > def __init__(self, parent = None): > """ > Constru

creating a code with two list

2011-10-11 Thread selahattin ay
hi all, I want to create a code with two lists like this code = ['234', '333' .. ] liste = []a = 0 while a<999 :a+=1liste.append(a) now I want to create this sample : the first element of codes list is 234 than the all elements of liste are 1,2,3 .. now I want to this 23

python script to add a field and edit it for several shapefiles in arcgis

2011-10-11 Thread yo
dear All i m trying to write a python script supposed to create a new field in a shapefile, and then fill it with a value extracted from the name of the file... I have to do that for several hundreds of files...I am almost there it is kind of working for one file but once i put a loop in the story,

Python library for generating SQL queries [selects, alters, inserts and commits]

2011-10-11 Thread Alec Taylor
Good afternoon, I'm looking for a Python library for generating SQL queries [selects, alters, inserts and commits]. I can write them by hand, but thought it would be more useful writing them in Python (i.e. client-side referential integrity checking before insert commit + test data generation) I

Re: Usefulness of the "not in" operator

2011-10-11 Thread Alec Taylor
As you see, this way of writing constants gives you much more poetic freedom than in other programming languages. On Tue, Oct 11, 2011 at 7:46 PM, Chris Angelico wrote: > On Tue, Oct 11, 2011 at 7:28 PM, Nobody wrote: >> It's useful insofar as it allows you to define "numbers" given nothing >> o

Re: [NUMPY] "ValueError: total size of new array must be unchanged" just on Windows

2011-10-11 Thread Paolo Zaffino
Nobody can help me? 2011/10/10 Paolo Zaffino > On Mac OS there is numpy 1.2.1, on Fedora 14 64bits numpy 1.4.1 and on > Ubuntu 10.04 64bits numpy 1.3.0. > On these platforms my function runs without problems. > Just on Windows it doesn't works. > > > > 2011/10/9 Yaşar Arabacı > >> I don't kn

Re: [NUMPY] "ValueError: total size of new array must be unchanged" just on Windows

2011-10-11 Thread David Robinow
2011/10/11 Paolo Zaffino : > Nobody can help me? Nope, not unless you post some code. Your problem description is too vague. -- http://mail.python.org/mailman/listinfo/python-list

Re: creating a code with two list

2011-10-11 Thread Nick Zarr
> > liste = [] > > a = 0 > > > > while a<999 : > > a+=1 > > liste.append(a) > > I'm not sure I understand what you're trying to do here, but I don't have much time to answer right now. I just want to say there's an easier way to build a list of consecutive integers: range(1, n+1) >>> range(1, 100

Re: [NUMPY] "ValueError: total size of new array must be unchanged" just on Windows

2011-10-11 Thread Peter Otten
Paolo Zaffino wrote: > Nobody can help me? Add the lines print "a=%r, b=%r, c=%r" % (a, b, c) print "type=%s, shape=%r, size=%r" % (type(matrix), matrix.shape, matrix.size) before this one matrix = matrix.reshape(a, b, c) and tell us what it prints both on a system where it works and wh

Re: creating a code with two list

2011-10-11 Thread Chris Angelico
On Wed, Oct 12, 2011 at 12:49 AM, Nick Zarr wrote: range(1, 1000) > [1, 2, ..., 999] > Or for Python 3 compat: >>> list(range(1,1000)) ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Fwd: creating a code with two list

2011-10-11 Thread Yaşar Arabacı
your_final_list = [[str(i) + str(k) for i in range(len(liste))] for k in range(len(code))] -- http://yasar.serveblog.net/ -- http://yasar.serveblog.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: creating a code with two list

2011-10-11 Thread Yaşar Arabacı
And also, I should recommend you to use Turkish speaking mail groups in here: python-programci...@googlegroups.com since your English is a little hard to comprehend. There are less people there, but, still would be more helpful for you. 11 Ekim 2011 17:11 tarihinde Yaşar Arabacı yazdı: > > > > y

Re: Python library for generating SQL queries [selects, alters, inserts and commits]

2011-10-11 Thread Yaşar Arabacı
Are you looking for something like this? http://www.sqlalchemy.org/ 2011/10/11 Alec Taylor > Good afternoon, > > I'm looking for a Python library for generating SQL queries [selects, > alters, inserts and commits]. > > I can write them by hand, but thought it would be more useful writing > them

Re: Python library for generating SQL queries [selects, alters, inserts and commits]

2011-10-11 Thread Tim Chase
On 10/11/11 07:08, Alec Taylor wrote: I'm looking for a Python library for generating SQL queries [selects, alters, inserts and commits]. The popular ones are SQLObject and SQLAlchemy, both just a web-search away. Additionally, if you're working with Django, it has its own built-in ORM. -

Re: Python library for generating SQL queries [selects, alters, inserts and commits]

2011-10-11 Thread Alec Taylor
They look good, but I'm looking for something which can "compile" down to normal SQL code. So that I can just plug that .sql file into any environment [i.e. non-python env] On Wed, Oct 12, 2011 at 2:12 AM, Tim Chase wrote: > On 10/11/11 07:08, Alec Taylor wrote: >> >> I'm looking for a Python li

Re: Python library for generating SQL queries [selects, alters, inserts and commits]

2011-10-11 Thread Adam Tauno Williams
Quoting Alec Taylor They look good, but I'm looking for something which can "compile" down to normal SQL code. So that I can just plug that .sql file into any environment [i.e. non-python env] SQLalchemy will happily give you statements and argument lists if that is what you want. query =

Freelance Django developer needed

2011-10-11 Thread Anton Pirker
Hi! (First to everyone not into Django: sorry for the shameless job advertisement!) We are searching for a Freelance Django developer to help us out! We are: - creativesociety.com - based in Vienna, Austria - small team of 4 - pretty cool What you should have: - passion for writing beautiful c

Re: Freelance Django developer needed

2011-10-11 Thread Waldek M.
> (First to everyone not into Django: sorry for the shameless job > advertisement!) > > We are searching for a Freelance Django developer to help us out! Well, if you're sorry then why do you go on? There's a much better place to post the job offer: http://www.python.org/community/jobs/ There,

Re: Freelance Django developer needed

2011-10-11 Thread Anton Pirker
Hi Waldek! On Tuesday, 11 October 2011 19:02:15 UTC+2, Waldek M. wrote: > > (First to everyone not into Django: sorry for the shameless job > > advertisement!) > > > Well, if you're sorry then why do you go on? > > There's a much better place to post the job offer: > http://www.python.org/comm

TestFixtures 2.3.0 Released!

2011-10-11 Thread Chris Withers
Hi All, Another TestFixtures release. This release adds warning backstops when you forget to clean up LogCapture, Replacer, TempDirectory and TestComponents instances. A replacer which didn't get its .restore() method called when it should have been caused me a lot of pain recently, so this

profiling big project

2011-10-11 Thread Andrea Crotti
Hi everyone, I am in the situation that I'll have to profile huge python programs, huge because they use many external libraries like numpy / pyqt / ETS etc etc... The applications are very slow and we wanted to understand what is actually going on. I like to use normally pycallgraph, but in this

Re: Python library for generating SQL queries [selects, alters, inserts and commits]

2011-10-11 Thread Ben Finney
Alec Taylor writes: > I'm looking for a Python library for generating SQL queries [selects, > alters, inserts and commits]. SQLAlchemy http://www.sqlalchemy.org/> is the leader in this field. It allows your code to interact with the database at different levels: you can write raw SQL, you can co

Re: Freelance Django developer needed

2011-10-11 Thread Ben Finney
Anton Pirker writes: > I still posted it here, so i have the most people to read my job ad. That's a justification used by spammers, and it's wrong for the same reasons (this forum is inappropriate for the job posting regardless of your desires). Please don't become a spammer. -- \“Pe

shipping python

2011-10-11 Thread Kristen J. Webb
I am new to python coming from the C/shell side. We have been experimenting with some code samples and now I'm looking at some command line argument processing. I find getopt older optparse new in 2.3 argparse new in 2.7 I search around on some of my client systems and find lots of people in th

Re: Implementing Python-OAuth2

2011-10-11 Thread Mark Hammond
On 11/10/2011 7:16 PM, Kayode Odeyemi wrote: On Thu, Oct 6, 2011 at 5:15 PM, Jeff Gaynor mailto:jgay...@ncsa.illinois.edu>> wrote: On 10/06/2011 08:34 AM, Kayode Odeyemi wrote: Hello friends, I'm working on a pretty large application that I will like to use oauth2 o

Re: shipping python

2011-10-11 Thread Westley Martínez
On Tue, Oct 11, 2011 at 05:04:45PM -0600, Kristen J. Webb wrote: > I am new to python coming from the C/shell side. > We have been experimenting with some code > samples and now I'm looking at some command line > argument processing. I find > > getopt older > optparse new in 2.3 > argparse new in

Re: [OT] Off-Topic Posts and Threads on the Python Mailing List

2011-10-11 Thread geremy condra
On Fri, Sep 30, 2011 at 8:25 PM, Navkirat Singh wrote: > Lol you all sound like google's angry birds with their feathers ruffled by a > comment. You guys should open up another mailing list to extinguish your > virtually bruised egos. . . . Google does not produce Angry Birds. There is another ma

Re: shipping python

2011-10-11 Thread Steven D'Aprano
On Tue, 11 Oct 2011 17:04:45 -0600, Kristen J. Webb wrote: > After some more digging I see that I can easy_install argparse on my > development system. > > My question is will I be able to ship this to a customer? Can I create > .pyc files so that the customer does not have to install the argpar

Re: Python library for generating SQL queries [selects, alters, inserts and commits]

2011-10-11 Thread alex23
On Oct 12, 1:14 am, Alec Taylor wrote: > They look good, but I'm looking for something which can "compile" down > to normal SQL code. Then you're not looking hard enough. SQLAlchemy does this. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python library for generating SQL queries [selects, alters, inserts and commits]

2011-10-11 Thread Alec Taylor
Great, I'll learn how to use it over the next few days :] On Wed, Oct 12, 2011 at 2:13 PM, alex23 wrote: > On Oct 12, 1:14 am, Alec Taylor wrote: >> They look good, but I'm looking for something which can "compile" down >> to normal SQL code. > > Then you're not looking hard enough. SQLAlchemy

Re: Implementing Python-OAuth2

2011-10-11 Thread Jack Diederich
On Thu, Oct 6, 2011 at 12:15 PM, Jeff Gaynor wrote: > On 10/06/2011 08:34 AM, Kayode Odeyemi wrote: >> I'm working on a pretty large application that I will like to use oauth2 >> on as an authentication and authorization mechanism. > > There are *no* usable OAuth version 2..0 implementation in an