Python(x,y) 64 bit

2016-04-27 Thread Pierre
Hello, I installed Python(x,y) 64 bit version and ran it using a library that requires Python 64 bit. I got an error which indicated that I am using Python 32 bit. So, is the python used by Python(x,y) 64 bit, using Python 64 or 32 bit? Thanks -- https://mail.python.org/mailman/listinfo/py

Re: Python(x,y) 64 bit

2016-04-27 Thread Pierre
On Wednesday, April 27, 2016 at 11:17:32 AM UTC-4, Zachary Ware wrote: > Hi Pierre, > > On Wed, Apr 27, 2016 at 6:23 AM, Pierre wrote: > > Hello, > > > > I installed Python(x,y) 64 bit version and ran it using a library that > > requires Python 64 bit. > >

Properties transfer between instances of different classes, without subclassing

2005-12-09 Thread Pierre
Folks, I'm pretty new to OOP, so I still have problems with inheritance and delegation. I defined 2 Numeric MaskedArray subclasses, as: class Temp(MA,object): def __init__(self,data): self = MA.__init__(self,data) cold = property(fget lambda self:masked_where(self<10,self) warm = p

bsddb : python, index, cursor and get

2007-11-13 Thread Pierre
Hello, I'm having problems to use the get method on a cursor with an index (secondary database). I've read Oracle's docs but there are mainly in C, JAVA and C++. So no python docs! actually, that's what I'm trying to do : ret = cursor.get(key='blabla', data='2007-10-30', flags=0, dlen=-1, doff=

detecting disc serial number without win32

2007-12-10 Thread PiErre
[ "(Joliet) volume name and serial number" on 26 Feb 2003 ] but without answer... Any chance there is now a way of implement such a low-level feature? TIA! bye, PiErre -- http://mail.python.org/mailman/listinfo/python-list

How to customize getattr(obj, prop) function ?

2006-05-17 Thread Pierre
Hi, Sorry in advance, english is not my main language :/ I'd like to customize the result obtained by getattr on an object : if the object has the requested property then return it BUT if the object doesn't has actually this property return something else. In my case, I can't use getattr(object,

Re: How to customize getattr(obj, prop) function ?

2006-05-17 Thread Pierre
Nop I get the same AttributeError when I try to access to the property "c"... -- http://mail.python.org/mailman/listinfo/python-list

Re: How to customize getattr(obj, prop) function ?

2006-05-17 Thread Pierre
I'm using python 2.4.3. I removed the method __getattribute__ The mistake was my 3rd underscore :S sorry for wasting your time... The problem is solved ! Thx all ! PS: Richard youre message are displayed 3 times ?! -- http://mail.python.org/mailman/listinfo/python-list

Re: How to customize getattr(obj, prop) function ?

2006-05-18 Thread Pierre
I don't want to use getattr(object, property, default_value) because I'm using external code and I don't want to modify or patch it. In this code, the call is getattr(object, property). On my objects, I must provide default values depending on the property that was requested, the default value is

Matplotlib patches collection + alpha face

2010-03-29 Thread Pierre
Hello, I would like to draw on the same axes several patches (rectangle) with different alpha-face (transparency)... Anyone has an idea ? In particular, I would like to use the class PatchCollection but it seems that the alpha property is common to all the patches... Thanks for your help. -- htt

[BarCamp] WebWorkersCamp BarCamp: NodeJS, NoSQL, Message Queues, Asynchronous programming, Web Sockets, Distributed Applications, Decentralized Social Networks, buzzword generators...

2010-05-17 Thread Pierre
Hello, AF83 will be holding a barcamp event on Saturday afternoon, July 3rd in Paris (in La Cantine, a famous Parisian tech place). We wanted to let you know about this event and tell you that you would be most welcome if you could join us on that day. In the ever-growing context of real-time web

sub-list extraction, logical indexation

2009-08-18 Thread Pierre
indexation such that : index = [ True, False, True] L2 = L or usual indexation, something like index=[0, 2] L2 = L I tried, but failed... Thanks for your help Pierre -- http://mail.python.org/mailman/listinfo/python-list

difference between 2 arrays

2009-08-19 Thread Pierre
Hello, I would like to know how to find the difference (set operation) between 2 arrays : a = array([1,2, 3,2,5,2]) b = array([1,2]) I want a - b = [3,5] Well, the equivalence of setdiff in matlab... I thought a.difference(b) could work, but no : AttributeError: 'numpy.ndarray' object has no at

regular expression

2009-08-20 Thread Pierre
Hello, I would like to change the string "(1 and (2 or 3))" by "(x[1] & (x [2] || x[3]))" using regular expression... Anyone can help me ? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

matplotlib / backend

2009-08-25 Thread Pierre
Hello, I'm to plot some results but it doesn't work. I got this error : /usr/local/libre_rep/python-2.6.1/RHEL_5__x86_64/lib/python2.6/site- packages/matplotlib/backends/__init__.py:41: UserWarning: Your currently selected backend, 'agg' does not support show(). Please select a GUI backend in you

quantiles of a student distribution

2009-08-30 Thread Pierre
Hello... Do you know how I can calculate the quantiles of a student distribution in pyhton ? Thanks -- http://mail.python.org/mailman/listinfo/python-list

lambda functions

2009-08-31 Thread Pierre
Hello, I would like to know if it is possible to define a loop in a lambda function How to manage the indents ? Example : s_minus_1 = lambda s : for index in range(0, len(s)) : s[index] = s [index]-1 Thanks ! -- http://mail.python.org/mailman/listinfo/python-list

rcond in numpy :

2009-08-31 Thread Pierre
Hello, Anyone knows the numpy equivalent of the matlab function : rcond (Matrix reciprocal condition number estimate) ? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

hanning python

2009-09-08 Thread Pierre
Hello, anyone knows what is the python equivalent of the matlab's hanning function. Note that in matlab hann and hanning are different. Thanks ! -- http://mail.python.org/mailman/listinfo/python-list

Re: Configuraion to run pyhton script on ubuntu 12.04

2013-07-28 Thread Pierre Jaury
Jaiky writes: > want to run a python script which contains simple form of html on firefox > browser , but dont know what should be the configuration on ubuntu 12.04 to > run this script i.e cgi configuration > > > > My code is > ubder > in /var/www/cgi-bin/forms__.py > > > > #!/usr/bin/en

Using dict as object

2012-09-19 Thread Pierre Tardy
n a pure native dict access. Each implementation have bench results in commit comment. All of them are 20+x slower than plain dict! I would like to have python guys advices on how one could optimize this. I'd like to eventually post this to python-dev, please tell if this is really not a go

Re: Using dict as object

2012-09-19 Thread Pierre Tardy
> > This has been proposed and discussed and even implemented many > times on this list and others. > I can find this question on SO http://stackoverflow.com/questions/4984647/accessing-dict-keys-like-an-attribute-in-python which is basically answered with this solution class AttributeDict(dict):

Brython - Python in the browser

2012-12-19 Thread Pierre Quentel
Hi, The objective of Brython is to replace Javascript by Python as the scripting language for web browsers, making it usable on all terminals including smartphones, tablets, connected TVs, etc. Please forgive the lack of ambition ;-) The best introduction is to visit the Brython site (http://w

Re: Brython - Python in the browser

2012-12-20 Thread Pierre Quentel
Le jeudi 20 décembre 2012 01:07:15 UTC+1, Terry Reedy a écrit : > On 12/19/2012 1:19 PM, Pierre Quentel wrote: > > > > > The objective of Brython is to replace Javascript by Python as the > > > scripting language for web browsers, making it usable on all > >

Re: Brython - Python in the browser

2012-12-20 Thread Pierre Quentel
Le jeudi 20 décembre 2012 01:54:44 UTC+1, Ian a écrit : > On Wed, Dec 19, 2012 at 5:07 PM, Terry Reedy wrote: > > > That says that my browser, Firefox 17, does not support HTML5. Golly gee. I > > > don't think any browser support5 all of that moving target, and Gecko > > > apparently supports a

Re: Brython - Python in the browser

2012-12-21 Thread Pierre Quentel
> If that's your intention, then instead of coming up with something totally > new, unpythonic and ugly, why not take the normal Python route and > implement a subset of the ElementTree API? > > Stefan Because the tree implementation in ElementTree or other tree modules in Python require a lot of

Re: Brython - Python in the browser

2012-12-21 Thread Pierre Quentel
> Pythonic also means: > If the implementation is hard to explain, it's a bad idea. > What, exactly, does the sum of a string and a bolded string produce? Can you > explain that easily and clearly? Yes : a+b returns the string a+str(b) It is exactly what you get in CPython with >>> class B: ..

Re: Brython - Python in the browser

2012-12-21 Thread Pierre Quentel
> <= is a comparison expression operator, which is completely different. > It is just wrong for this usage. I am 99.9% sure you will come to regret > it eventually. Better to make the change now than in Brython2 or Brython3. I am 99.99% sure of the contrary, having used this syntax for more than

Re: Brython - Python in the browser

2012-12-21 Thread Pierre Quentel
> Hmm. So when that gets added into a DIV, it has to get parsed for > tags? How does this work? This seems very odd. I would have expected > it to remain as DOM objects. In DIV(child) : - if child is a string, integer or float, a text node is added (addChild) to the DIV element, with the string

Re: Brython - Python in the browser

2012-12-21 Thread Pierre Quentel
> The interpreter, though, will be more than happy to treat that as a > comparison if the LHS is not the type that you think it is. For > example, maybe you've added it to a string at some point, and now it's > a string instead of an element. I guess that since doc is made a > keyword, that proba

Re: Brython - Python in the browser

2012-12-22 Thread Pierre Quentel
> Oh, and repr is just a synonym of str, which makes it useless. 3 days ago repr was not even implemented at all, so it's a step forward... -- http://mail.python.org/mailman/listinfo/python-list

Re: Brython - Python in the browser

2012-12-22 Thread Pierre Quentel
<= $TagClass : adds child y.elt to parent x.elt ($TagClass | doc) <= $AbstractTag : adds DOM elements in y.children to x.elt $AbstractClass <= (any type) : unsupported - Pierre -- http://mail.python.org/mailman/listinfo/python-list

Re: Brython - Python in the browser

2012-12-22 Thread Pierre Quentel
> Still, it tends to be a lot harder to explain, document, and read > documentation for, something that uses operators weirdly, rather than > keyword-searchable method names. You don't explain how to use the Python syntax (for instance the operator %, which behaves very differently between intege

Re: Brython - Python in the browser

2012-12-22 Thread Pierre Quentel
I forgot to mention : list comprehensions and the ternary operator (r1 if cond else r2) are now supported ! - Pierre -- http://mail.python.org/mailman/listinfo/python-list

__doc__+= """Detailed description"""

2012-05-09 Thread Pierre Asselin
Hi. Started using python a few months back, still settling on my style. I write docstrings and I use "pydoc mymodule" to refresh my memory. Problem: if I just docstring my classes/methods/functions the output of pydoc more or less works as a reference manual, but if I get sidetracked for even a

Re: Crazy what-if idea for function/method calling syntax

2011-07-18 Thread Pierre Quentel
ad of (2) do_something(X,a,b,c) I agree that the first one is more readable than the second, because in the arguments list in (2) you mix the object you are working on and the parameters used. But there is another option : (3) X.do_something_with_arguments(a,b,c) which would be in your examples : "item.place_at(x,

Relative seeks on string IO

2011-09-06 Thread Pierre Quentel
== Is there any reason why relative seeks on string IO are not allowed in Python3.2, or is it a bug that could be fixed in a next version ? - Pierre -- http://mail.python.org/mailman/listinfo/python-list

Re: Relative seeks on string IO

2011-09-07 Thread Pierre Quentel
self.file_obj.seek(offset) else: if whence==2: # read till EOF while True: buf = self.file_obj.read() if not buf: break self.file_obj.seek(self.file_obj.tell()+offset) fobj = _file

Trapping the segfault of a subprocess.Popen

2011-04-06 Thread Pierre GM
All, I need to run a third-party binary from a python script and retrieve its output (and its error messages). I use something like >>> process = subprocess.Popen(options, stdout=subprocess.PIPE, >>> stderr=subprocess.PIPE) >>> (info_out, info_err) = process.communicate() That works fine, except

Re: Trapping the segfault of a subprocess.Popen

2011-04-07 Thread Pierre GM
On Apr 7, 1:58 am, Nobody wrote: > On Wed, 06 Apr 2011 02:20:22 -0700, Pierre GM wrote: > > I need to run a third-party binary from a python script and retrieve > > its output (and its error messages). I use something like > >>>> process = subprocess.Popen(o

Re: Trapping the segfault of a subprocess.Popen

2011-04-07 Thread Pierre GM
On Apr 7, 5:12 am, Terry Reedy wrote: > On 4/6/2011 7:58 PM, Nobody wrote: > > > On Wed, 06 Apr 2011 02:20:22 -0700, Pierre GM wrote: > > >> I need to run a third-party binary from a python script and retrieve > >> its output (and its error messages). I u

Re: how to setup for localhost:8000

2016-04-15 Thread Pierre Quentel
Le jeudi 14 avril 2016 22:50:33 UTC+2, wrh...@gmail.com a écrit : > On Thursday, April 14, 2016 at 2:23:36 PM UTC-4, Andrew Farrell wrote: > > What happens when you type > > > > http://localhost:8000 > > > > Into the address bar of your browser as this is running? > > > > On Thu, Apr 14, 2016 at

Re: how to setup for localhost:8000

2016-04-17 Thread Pierre Quentel
> > 127.0.0.1 - - [15/Apr/2016 20:57:32] "GET / HTTP/1.1" 200 - > Hi Pierre, > > When I type http://localhost:8000, I did not see anything in the console > after the line "Serving HTTP on 0.0.0.0 port 8000 ... I believe the way I ran > was not correct as sh

Re: do_POST not working on http.server with python

2016-05-01 Thread Pierre Quentel
Le jeudi 28 avril 2016 10:36:27 UTC+2, Rahul Raghunath a écrit : > 0 > down vote > favorite > > > I'm trying to create a simple http server with basic GET and POST > functionality. The program is supposed to GET requests by printing out a > simple webpage that greets a user and askes how

Generator question

2019-03-13 Thread Pierre Reinbold
Dear all, I want to implement a function computing the Cartesian product if the elements of a list of lists, but using generator expressions. I know that it is already available in itertools but it is for the sake of understanding how things work. I already have a working recursive version, and I

Re: Generator question

2019-03-14 Thread Pierre Reinbold
he leftmost for clause cannot be evaluated in the > enclosing scope as they may depend on the values obtained from the leftmost > iterable. For example: (x*y for x in range(10) for y in range(x, x+10)). > """ > > So, it's simply because the iterable expression in the

Re: Generator question

2019-03-14 Thread Pierre Reinbold
Le 14/03/19 à 10:45, Peter Otten a écrit : > Pierre Reinbold wrote: > >> Wow, thank you Ian for this very detailed answer, and thank you for taking >> the time for that! Much appreciated! >> >> If I get this right, I have to somehow fix the value of a_list during

Re: Generator question

2019-03-14 Thread Pierre Reinbold
he leftmost for clause cannot be evaluated in the > enclosing scope as they may depend on the values obtained from the leftmost > iterable. For example: (x*y for x in range(10) for y in range(x, x+10)). > """ > > So, it's simply because the iterable expression in the

tkinter and input()

2020-09-29 Thread Pierre Bonville
Hello everybody, I have a small problem with the method .quit() of tkinter. Below is a sketch of a much larger program, which shows the problem. I would like to run the main program but keeping the tk window on the screen until the end. Presently, execution stops after the first "plot" instruction

Interference tkinter and plot from matplotlib

2020-09-30 Thread Pierre Bonville
Hi everybody, I am running this little program below on Win 10 with Python 3.8 (just typing prog.py after the prompt c:\Users ...>), and while it correctly displays the window and does the first plt.plot(), it does not reach the input command and remains waiting after I shut the plot. If I replace

Re: Interference tkinter and plot from matplotlib

2020-10-01 Thread Pierre Bonville
Thank you, Mr. Gollwitzer. I understand the problem. I'll see what I can do. Regards, P.Bonville Le mer. 30 sept. 2020 à 17:02, Christian Gollwitzer a écrit : > Am 30.09.20 um 15:46 schrieb Pierre Bonville: > > Hi everybody, > > > Interference tkinter and plot from m

Re: sqlstring -- a library to build a SELECT statement

2005-10-20 Thread Pierre Quentel
ent the implementation is not very elegant, especially for getting the source code of the generator expression (it would be nice if they had an attribute for that !), and I'm not sure if it could work for all the forms of the SELECT syntax. But it should cover at least the most usual kinds of

Re: popen2

2005-10-29 Thread Pierre Hanser
Grant Edwards a écrit : > On 2005-10-29, Piet van Oostrum <[EMAIL PROTECTED]> wrote: > >>>"g.franzkowiak" <[EMAIL PROTECTED]> (gf) wrote: >> >>>gf> If starts a process with popen2.popen3('myprogram') and myprogram.exe is >>>gf> running before, I've a connection to the second process, not to t

Re: which feature of python do you like most?

2005-11-08 Thread Pierre Quentel
city, built-in types, list comprehensions...), but I still feel the same aesthetic pleasure every time I open a Python program to work on it Pierre -- http://mail.python.org/mailman/listinfo/python-list

Re: strip not working on strings?

2005-11-13 Thread Pierre Quentel
ding and trailing characters removed", that is, at the beginning and at the end of the string You can use this to remove the specified characters : for char in chars: s.replace(char,'') Pierre -- http://mail.python.org/mailman/listinfo/python-list

Re: Hlelp clean up clumpsy code

2005-01-04 Thread Pierre Quentel
: i+=1 (see "l+=item" above) Regards, Pierre -- http://mail.python.org/mailman/listinfo/python-list

Another look at language comparisons

2005-01-08 Thread Pierre Quentel
http://khason.biz/blog/2004/12/why-microsoft-can-blow-off-with-c.html -- http://mail.python.org/mailman/listinfo/python-list

Re: The best way to do web apps with Python?

2005-01-08 Thread Pierre Quentel
y much like PHP Regards, Pierre -- http://mail.python.org/mailman/listinfo/python-list

Comments in configuration files

2005-01-22 Thread Pierre Quentel
edit the options, but when I write the result all the comments are lost Are there modules that work on the same kind of ini files (for the needs of my application, I prefer this format to XML or YAML) and don't remove the comments ? TIA, Pierre -- http://mail.python.org/mailman/listinfo/python-list

pygsl-0.3.1 released

2005-01-24 Thread Pierre Schnizer
TED] Yours sincerely Pierre Schnizer -- Please remove the nospam for direct reply -- http://mail.python.org/mailman/listinfo/python-list

Re: how to send an int over a socket

2005-02-04 Thread Pierre Quentel
Use string formatting : msglen = '%16s' %len(testmessage) will return a 16-byte string, beginning with spaces. Send it over your connection and use int() to get the message length Pierre -- http://mail.python.org/mailman/listinfo/python-list

Re: How to read POSTed data

2005-02-06 Thread Pierre Quentel
he data received The part related to bug #427345 is copied from CGIHTTPServer For an example of use you can take a look at the CustomHTTPServer in Karrigell (http://karrigell.sourceforge.net) A+, Pierre -- http://mail.python.org/mailman/listinfo/python-list

Strange os.path.exists() behaviour

2005-07-06 Thread Pierre Quentel
# unexpected >>> Is there a reason for this ? Is there a test that returns True only for the really existing path ? Pierre -- http://mail.python.org/mailman/listinfo/python-list

Concurrent access behind an asynchronous server

2005-09-18 Thread Pierre Quentel
Sorry if the question seems naive, but is there a risk of concurrent accesses to a database if it is accessed only by scripts called by requests to an asynchronous server ? I have the same question for a server built on the non-threaded version of SocketServer.TCPServer A+ Pierre -- http

Re: How to read POSTed data

2005-02-06 Thread Pierre Quentel
Pierre, I am repeating some questions I already stated in another thread, 'CGI POST problem', but do you have any opinions on how CGIHTTPServer's do_POST handles requests? It looks to me like it always expects form data to be part of the POST command header, in the path of the

negative integer division

2005-02-07 Thread Imbaud Pierre
integer division and modulo gives different results in c and python, when negative numbers are involved. take gdb as a widely available c interpreter print -2 /3 0 for c, -1 for python. more amazing, modulos of negative number give negative values! (in c). from an algebraic point of view, python

Re: convert list of tuples into several lists

2005-02-10 Thread Pierre Quentel
"help", "copyright", "credits" or "license" for more information. >>> def f(*args,**kw): ... print args, kw ... >>> f(*[1,2]) (1, 2) {} >>> f(*[1,2],x=1) File "", line 1 f(*[1,2],x=1) ^ SyntaxError: invalid syntax >>> Pierre -- http://mail.python.org/mailman/listinfo/python-list

Re: For American numbers

2005-02-12 Thread Pierre Hanser
Peter Hansen wrote: Scott David Daniels wrote: Kind of fun exercise (no good for British English). def units(value, units='bytes'): magnitude = abs(value) if magnitude >= 1000: for prefix in ['kilo mega giga tera peta ' 'exa zetta yotta').s

Re: low-end persistence strategies?

2005-02-17 Thread Pierre Quentel
Maybe you'll find this too naive, but why do you want to avoid concurrent accesses to a database that will be accessed 12 times a day ? Regards, Pierre -- http://mail.python.org/mailman/listinfo/python-list

Re: low-end persistence strategies?

2005-02-17 Thread Pierre Quentel
If a dozen people click the url in the next day, several of them will probably in the first minute or so after the email goes out. So two simultaneous clicks isn't implausible. More generally, I don't like writing code with bugs even if the bugs have fairly low chance of causing trouble. So I'm l

Re: Probably over my head... Trying to get Font Names

2005-02-18 Thread Pierre Quentel
"Samantha" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > I am attempting to extract the Font Names from the installed windows fonts. > I am having a heck of a time getting these rather than the file names. > Examples can be seen by going to Control Panel > Fonts > > Any help

Re: recommended way of generating HTML from Python

2005-02-20 Thread Pierre Quentel
Here are a couple of pointers. I agree with Michele that it would be nice to have some kind of standardization. Maybe this would be worth a post to the Web-SIG ? - I posted a 70-line recipe on the Python Cookbook, a sort of poor man's HTMLGen called HTMLTags http://aspn.activestate.com/ASPN/Coo

Re: intersection of 2 list of pairs

2005-02-21 Thread Pierre Quentel
r','s')] >>> E2=[('g','a'),('r','q'),('f','h')] >>> f=set([frozenset(s) for s in E1]) & set([frozenset(s) for s in E2]) >>> [tuple(x) for x in f] [('a', 'g')] You must use ImmutableSet or frozenset to be able to create a set of sets Pierre -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter and Text() widget interactivity ?

2005-03-01 Thread Pierre Quentel
"An introduction to Tkinter" by Fredrik Lundh, in the chapter "The Text Widget" http://www.pythonware.com/library/tkinter/introduction/ Regards, Pierre -- http://mail.python.org/mailman/listinfo/python-list

Re: any Python equivalent of Math::Polynomial::Solve?

2005-03-01 Thread Pierre Schnizer
In case you are still interested pygsl wraps the GSL solver. from pygsl import poly pc = poly.poly_complex(3) tmp, rs = pc.solve((2,3,1)) print rs You get pygsl at http://sourceforge.net/projects/pygsl/ Pierre -- http://mail.python.org/mailman/listinfo/python-list

Re: Widget geometry ?

2005-03-11 Thread Pierre Quentel
0) l1 = Label(top,text="User Name:").grid(row=0, sticky=W) b = Button(top,text="Ok",command=self.ok) b.pack(pady=40) def ok(self): self.top.destroy() You are mixing pack() and grid() to place widgets in the same container. Try doing b.grid(row=0,column=1) in

Re: problem with tkinter

2005-03-29 Thread Pierre Quentel
text = "[vuota]") self.lab[self.s].pack() self.but = Button(self.mioGenitore) self.but.configure(text = "Vai!", command = self.procedi) self.but.pack() def procedi(self): for var in (self.i, self.s): self.lab[var].configure(te

Re: Web application toolkit recommendation?

2005-04-06 Thread quentel . pierre
You can also take a look at Karrigell (http://karrigell.sourceforge.net). You can write pure Python scripts or use a PHP-like syntax, and it is shipped with gadfly, an SQL engine, and with KirbyBase, a database engine which uses a Pythonic syntax. As for all the web frameworks, you can also work wi

Re: Web application toolkit recommendation?

2005-04-07 Thread Pierre Quentel
[EMAIL PROTECTED] a écrit : I have looked briefly at Karrigell. does it support user logins? S Yes, you can take a look at the "portal" demo to see how it works Regards, Pierre -- http://mail.python.org/mailman/listinfo/python-list

Re: Declaring variables from a list

2005-04-09 Thread Pierre Quentel
You can use the built-in statement exec (http://www.python.org/doc/2.4.1/ref/exec.html) : # Blob = ['Var1', 'Var2', 'vAR3'] # i = 5 # for listitems in Blob: # i += 1 # exec('%s = i' %listitems) # # print Var1, Var2, vAR3 Regards, Pierre -- http:/

Problem deriving a class from the built-in file object

2005-04-22 Thread Pierre Rouleau
Hi all! I'm trying to extend the functionality of the file object by creating a class that derives from file. MyFile class re-implements __init__(), write(), writelines() and close() to augment the capabilities of file. All works fine, except for one thing: 'print >> myfile' does not execute

Why is Python not supporting full derivation of built-in file class?

2005-04-23 Thread Pierre Rouleau
> >>> dg = DelegatedFile("temp.txt","w") >>> hello(dg) >>> dg.close() >>> dg.strings ['Bonjour!', '\n'] >>> for line in file("temp.txt"): print line ... Bonjour! >>> df = DerivedFile("temp2.txt","w") >>> hello(df) >>> df.close() >>> df.strings [] >>> for line in file("temp2.txt"): print line ... Bonjour! >>> >>> sf <__main__.StringFile instance at 0x008D86C0> >>> dg <__main__.DelegatedFile object at 0x008D50B0> >>> df >>> -- Pierre Rouleau -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is Python not supporting full derivation of built-in file class?

2005-04-25 Thread Pierre Rouleau
upport the >> operator 'properly' (ie the derived class write() method should be called). Pierre -- http://mail.python.org/mailman/listinfo/python-list

Brython (Python in the browser)

2013-12-26 Thread Pierre Quentel
Hi, Ever wanted to use Python instead of Javascript for web client programming ? Take a look at Brython, an implementation of Python 3 in the browser, with an interface with DOM elements and events Its use is very simple : - load the Javascript library brython.js :

Re: Brython (Python in the browser)

2013-12-27 Thread Pierre Quentel
Le vendredi 27 décembre 2013 15:56:33 UTC+1, jonas.t...@gmail.com a écrit : > Den fredagen den 27:e december 2013 kl. 07:14:35 UTC+1 skrev Pierre Quentel: > > > Hi, > > > > > > > > > > > > Ever wanted to use Python instead of Javascript

Re: Brython (Python in the browser)

2013-12-27 Thread Pierre Quentel
Le vendredi 27 décembre 2013 17:12:09 UTC+1, Johannes Schneider a écrit : > On 27.12.2013 07:14, Pierre Quentel wrote: > > > Hi, > > > > > > Ever wanted to use Python instead of Javascript for web client programming > > ? Take a look at Brython, an imple

[ANN] Brython 3.0.0 relased

2014-11-16 Thread Pierre Quentel
Hi, Version 3.0.0 of Brython has been released recently Brython is an implementation of Python 3 running in the browser, with an interface to DOM elements and events. It allows writing web client applications with Python instead of Javascript. Python programs are inserted in the HTML page insi

Problem with the console on the new python.org site

2014-02-23 Thread Pierre Quentel
The new home page of python.org is very nice, congratulations ! But there is a problem with the online console provided by PythonAnywhere : with my azerty keyboard, I can't enter characters such as ) or ] - very annoying ! It this going to be fixed soon ? - Pierre -- https://mail.pytho

Re: Problem with the console on the new python.org site

2014-02-24 Thread Pierre Quentel
Le lundi 24 février 2014 14:19:12 UTC+1, Jean-Michel Pichavant a écrit : > - Original Message - > > On Sun, 23 Feb 2014 10:20:15 -0800, Pierre Quentel wrote: > > > > > The new home page of python.org is very nice, congratulations ! > > > > The

Iterators membership testing

2015-08-09 Thread Pierre Quentel
The documentation at https://docs.python.org/3.5/reference/expressions.html#not-in says : "For user-defined classes which do not define __contains__() but do define __iter__(), x in y is true if some value z with x == z is produced while iterating over y. If an exception is raised during the it

Re: Iterators membership testing

2015-08-09 Thread Pierre Quentel
Le dimanche 9 août 2015 11:25:17 UTC+2, Chris Angelico a écrit : > On Sun, Aug 9, 2015 at 7:06 PM, Pierre Quentel > wrote: > > "For user-defined classes which do not define __contains__() but do define > > __iter__(), x in y is true if some value z with x == z is produ

Re: Iterators membership testing

2015-08-09 Thread Pierre Quentel
> The trap you're seeing here is that iterating over an iterator always > consumes it, but mentally, you're expecting this to be iterating over > a new instance of the same sequence. No, I just tried to apply what I read in the docs : 1. I have y = A(10) which is an instance of a class which doe

Partially invalid sys.path - how can I fix it (not append to it)?

2015-09-28 Thread Pierre Rouleau
Hi, On a OS/X 101.10.5 (Yosemite) system, the system Python just got updated to 2.7.10 but it sys.path is partially invalid. How can I fix that? I don't want to add something in PYTHONPATH. I know I can create a softlink at the invalid location to where the real files are located.I just w

[ANN] Karrigell-4.3.6 released

2011-10-31 Thread Pierre Quentel
has built-in support for usual features such as cookie and session management, localization, user login/logout/role management. It also includes a complete documentation, with a tutorial and a set of how-to's A helpful and friendly community welcomes users at http://groups.google.com/group/karrigell Enjoy ! Pierre -- http://mail.python.org/mailman/listinfo/python-list

PSF News: Guido van Rossum quitting Python to develop new, more difficult to learn, language.

2013-04-01 Thread Pierre O'Dee
that Mr. Johnson will be attempting to revive and steer the now defunct Python language -- which elicited further concerns amongst the somewhat bewildered Python community. All newsgroups mentioning Python -- the full Monty -- will be closed today. --Pierre O'Dee, self-appointed spokesman for the PSF -- http://mail.python.org/mailman/listinfo/python-list

"0 in [True,False]" returns True

2005-12-12 Thread Pierre Quentel
nd it confusing that "0 in [True,False]" returns True By the way, I searched in the documentation what "obj in list" meant and couldn't find a precise definition (does it test for equality or identity with one of the values in list ? equality, it seems) ; did I mi

Re: "0 in [True,False]" returns True

2005-12-13 Thread quentel . pierre
th "if v:" as suggested would fail for val = 0 Anyway, I exposed my silly "if v in [True,False]" just to give my opinion that I found confusing that 0 in [True,False] or (boolean type checking set aside) 0 in [1,range(2),False,'text'] return True Regards, Pierre -- http://mail.python.org/mailman/listinfo/python-list

Re: "0 in [True,False]" returns True

2005-12-13 Thread quentel . pierre
ot; for the definition of "in" (after all "in" is also used in list comprehensions, generator expressions, exec, etc... and for iteration on iterators) Regards, Pierre -- http://mail.python.org/mailman/listinfo/python-list

Re: Which Python web framework is most like Ruby on Rails?

2005-12-21 Thread Pierre Quentel
? another ? Regards, Pierre -- http://mail.python.org/mailman/listinfo/python-list

Re: Which Python web framework is most like Ruby on Rails?

2005-12-21 Thread Pierre Quentel
I definitely don't want to invent another licence, there are enough of them already ! Pierre -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   >