Re: Data available on socket?

2005-07-22 Thread Nicolas
t;But is there a better way? A call which specifically checks if data > is available? Hello, You might want to use select.select. See http://effbot.org/librarybook/select.htm for an example with sockets. Nicolas. -- http://mail.python.org/mailman/listinfo/python-list

clicking on turtle

2012-11-06 Thread Nicolas Graner
ck on the black square (i.e. t1), the message "click at..." gets printed on the console. When I click on the red square (i.e. t2), nothing happens. Bug or feature? --Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: Migrate from Access 2010 / VBA

2012-11-29 Thread Nicolas Évrard
ir HIS software). Reporting is done through relatorio (http://relatorio.openhex.org/), which uses ODF templates to generate ODF reports (or other format thanks to unoconv) the client is written in GTk (we're writing one in JavaScript right now (and I miss python badly)). -- (°> Nicolas Évrard

[winreg] How to access "(Default)" key value?

2022-05-03 Thread Nicolas Formichella
ort, or if not, what is the way, using winreg, to access the "(Default)" value of a key? Regards, Nicolas FORMICHELLA -- https://mail.python.org/mailman/listinfo/python-list

Typing on child class' methods of a Generic base class

2022-03-09 Thread Nicolas Haller
ate_method(self, an_arg: T) -> T: # I keep T return 42 class Alternative2(Base[int]): def _private_method(self, an_arg: int) -> int: # I replace T return 42 Thanks, -- Nicolas Haller [1]: https://docs.python.org/3/library/typing.html#user-defined-generic-types -- https://mail.python.org/mailman/listinfo/python-list

Re: Typing on child class' methods of a Generic base class

2022-03-12 Thread Nicolas Haller
On 2022-03-10 12:31, Dieter Maurer wrote: Nicolas Haller wrote at 2022-3-9 10:53 -0500: ... The documentation about "user-defined generic types"[1] says that I can fix some types on a child class (class MyDict(Mapping[str, T]):) but doesn't say much about the signature of the me

Pretty printing dicts with compact=True

2018-09-11 Thread Nicolas Hug
Is there a reason why the 'compact' parameter is ignored when pretty printing a dict? For example: pprint({x: x for x in range(15)}, compact=True) would be be printed in 15 lines while it could fit on 2. Is this a bug or was this decided on purpose? Thank you! -- https://mail.python.org/mai

Re: Pretty printing dicts with compact=True

2018-09-11 Thread Nicolas Hug
on a single line (regardless of the compact parameter), so I don't believe that was the rationale behind this behaviour. On 9/11/18 1:05 PM, Max Zettlmeißl wrote: On Tue, Sep 11, 2018 at 1:58 PM, Nicolas Hug wrote: pprint({x: x for x in range(15)}, compact=True) would be be printed i

Re: SOAP and Zeep

2016-08-01 Thread Nicolas Évrard
recommended? We used zeep to communicate with SOAP webservices. We choose it over suds because it supports python3. I also happen to have a bug, and the maintainer quickly accepted my patch, so according to me it's a good choice. -- (°> Nicolas Évrard ( ) Liège `¯ -- https://mail.python.org

my matplotlib realtime plot doesn't show the line between the points

2020-03-31 Thread Nicolas Marat
hi guys, i need help because my matplotlib realtime plot doesn't show the line between the points. even if i right '.k-' thit plot is display in a qwidget in an other code wirdely that if i put bar it actualy working. the real time data come from an arduino sensor that the shape of the data i ha

Re: my matplotlib realtime plot doesn't show the line between the points

2020-03-31 Thread Nicolas Marat
sorry that the real piece of code self.MplWidget.canvas.axes.set_xlim(left=max(0, self.i-40), right= self.i+60) self.MplWidget.canvas.axes.plot(x, y,'.k-') self.MplWidget.canvas.axes.set_title('pull') self.MplWidget.canvas.draw() -- https://mail.python.org/mail

Continuous system simulation in Python

2005-10-06 Thread Nicolas Pernetty
Hello, I'm looking for any work/paper/ressource about continuous system simulation using Python or any similar object oriented languages (or even UML theory !). I'm aware of SimPy for discrete event simulation, but I haven't found any work about continuous system. I would like to develop a generi

Re: Continuous system simulation in Python

2005-10-07 Thread Nicolas Pernetty
Hello Phil, Yes I have considered Octave. In fact I'm already using Matlab and decided to 'reject' it for Python + Numeric/numarray + SciPy because I think you could do more in Python and in more simple ways. Problem is that neither Octave, Matlab and Python offer today a framework to build conti

Re: Continuous system simulation in Python

2005-10-07 Thread Nicolas Pernetty
On Thu, 06 Oct 2005 22:30:00 -0700, Robert Kern <[EMAIL PROTECTED]> wrote : > Dennis Lee Bieber wrote: > > On Fri, 7 Oct 2005 01:12:22 +0200, Nicolas Pernetty > > <[EMAIL PROTECTED]> declaimed the following in > > comp.lang.python: > > > > > I

Re: Continuous system simulation in Python

2005-10-07 Thread Nicolas Pernetty
chanical systems to solving partial > differentail equations. > > Howard > > Nicolas Pernetty wrote: > > Hello, > > > > I'm looking for any work/paper/ressource about continuous system > > simulation using Python or any similar object oriented lang

Re: Continuous system simulation in Python

2005-10-08 Thread Nicolas Pernetty
; Simulink is a framework widely used by the control engineers ... > It is not *perfect* but the ODEs piece is probably the best > part of the simulator. Why were you not convinced ? > > You may also have a look at Scicos and Ptolemy II. These > simulators are open-source ... but

Re: Continuous system simulation in Python

2005-10-09 Thread Nicolas Pernetty
Hello Phil, I'm currently looking to see if I can build upon SimPy, thus making it an hybrid system simulator. That would be a great step for the community. Main difficulty would be to build a framework which isn't clumsy, like you said. I have close to no experience in Python and object oriented

Re: Continuous system simulation in Python

2005-10-10 Thread Nicolas Pernetty
n, fine, let's do the entire thing in Python/C. If we decided to go for Simulink, fine, let's do the whole thing in Simulink/Matlab/C. Matlab, for algorithms, can do almost the same things than Python and sometimes much better, so if you have already Simulink (and so have the license) why go for

Re: Continuous system simulation in Python

2005-10-11 Thread Nicolas Pernetty
de or > writing an interface to existing optimize simulation code. Although > most likely not suitable for your applicaion but a good example of > this type of program is Mathematica. It is written in two parts a user > interface and a kernel that does all of the high power math. > &g

Numeric array equivalent of index ?

2005-10-14 Thread Nicolas Pernetty
Hello, I'm trying to find a clear and fast equivalent to the index method of plain python list : >> a = [5,1,4,3,4] >> a.index(4) 2 I have to use it on a Numeric array, so the best I've come up with is (rather ugly I think) : >> from Numeric import array, equal, nonzero >> a = array([5,1,4,3,4])

Examples of Python code compared to other languages

2005-10-29 Thread Nicolas Pernetty
Hello, I'm looking (without success so far) for code sources for common problems in different languages, but especially Python, C, Fortran, Ada and Matlab. It would help people coming from other languages to understand the 'python way of thinking'. Priority is clean code, performance is not an i

Re: Examples of Python code compared to other languages

2005-10-30 Thread Nicolas Pernetty
On 29 Oct 2005 21:27:39 -0700, [EMAIL PROTECTED] wrote : > http://pleac.sourceforge.net/ probably is what you're looking for. It > shows how to to stuff from the perl cookbook in a plethora of other > languages, including Python. > > Kind regards Terji Petersen > Hello, As mentioned in the ori

recursive function call

2005-11-08 Thread Nicolas Vigier
k about changing the recursive call too. Is there a way that I can do a recursive call and say something like "keep all the same arguments except this one" ? Thanks Nicolas -- http://n0x.org/ - [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: recursive function call

2005-11-08 Thread Nicolas Vigier
Peter Otten said: > Here is a non-recursive approach: > > def tolist(arg): >if isinstance(arg, list): >return arg >return [arg] > > def f(arg1, arg2, more_args): >for arg1 in tolist(arg1): >for arg2 in tolist(arg2): ># real code > > If it were my code I would

Re: option argument length

2005-12-04 Thread Nicolas Couture
I don't think that's actually what you want to do. Yes arguments are not to be used directly as option arguments (otherwise why have option arguments anyways ;-) but each option argument is usually evaluated under the evaluation of the actual option and optparse will error on invalid use of the opt

Re: python 3000 and removal of builtin callable

2005-01-04 Thread Nicolas Fleury
than `callable` IMHO. I totally agree with you. The callable function could be moved to a module and be built-in, but it cannot really be removed. Calling a callable and know if an object is a callable without calling it is definitely not the same thing. Regards, Nicolas -- http

exporting from Tkinter Canvas object in PNG

2005-01-11 Thread Nicolas Pourcelot
Hello, I'm new to this mailing list and quite to Pyhon too. I would like to know how to export the contain of the Canvas object (Tkinter) in a PNG file ? Thanks :) Nicolas Pourcelot -- http://mail.python.org/mailman/listinfo/python-list

Reraise exception with modified stack

2005-06-23 Thread Nicolas Fleury
doing z: While doing y: While doing x: Test I would like to know how to code the reraise function so that the lines 48, 50 and 52 don't appear in the stack. Is it possible? Thx and regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: Reraise exception with modified stack

2005-06-23 Thread Nicolas Fleury
original error. I would like to avoid also writing in the caller something like sys.exc_info()[-1]. Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: Reraise exception with modified stack

2005-06-23 Thread Nicolas Fleury
intercepted. Oups, sorry, I tried it but wrote "raise exception" instead of "raise". Yes, that's a very good idea indeed. I'll change to that. Thx, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite non-python language trick?

2005-06-25 Thread Nicolas Fleury
think however it is bad. Better solutions to me would be: colour.setRgb(0, 255, 0) or c = myVeryLongNameColour c.red = 0; c.blue = 255; c.green = 0 Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: Better console for Windows?

2005-06-27 Thread Nicolas Fleury
ste with/without the preceding >>>. Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Generating a list of None

2005-07-14 Thread Nicolas Couture
Hi, Is it possible to generate a list of `None' ? opts.__dict__.values() below could be represented by [None, None, None] --- def get_options(opts): """Return True or False if an option is set or not""" vals = opts.__dict__.values() for val in vals: if val is not None:

Re: Generating a list of None

2005-07-14 Thread Nicolas Couture
of course the later snipplet should be: --- def get_options(opts): """Return True or False if an option is set or not""" vals = opts.__dict__.values() if vals == [None * len(vals)]: return False return True --- -- http://mail.python.org/mailman/listinfo/python-list

pyQT 4

2005-07-25 Thread Nicolas Lebas
hello, i'm using actually pyqt 3.x to create several tools under linux. I plan to propose those tools also for windows and mac os x under GPL agreement. My question is : does anybody know when pyqt 4 will be distributed ? thanks Nicolas -- http://mail.python.org/ma

getting Arrays and variables from R

2005-07-26 Thread Nicolas Lebas
27;tab', '.Traceback', 'v'] > r.tab segmentation fault ! I don't understand very well what does python crash. If someone has an idea to solve my problem or to give me a method which permit to import arrays and variables from .RData files with another module. Thanks Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: getting Arrays and variables from R [fixed]

2005-07-27 Thread Nicolas Lebas
Nicolas Lebas a écrit : >hello, > >i don't know if this is the best list to send this question, but i'm >already trying to ask. > >I need to import variables from .RData files (arrays or variables). >I'm trying to use the rpy module, but without success

Re: getting Arrays and variables from R [fixed]

2005-07-27 Thread Nicolas Lebas
Finally i found the solution in Rpy-list : there is a bug in python2.4-rpy_0.4.1. An alternative solution which works fine it's to use the R get(str) function instead of using directly the variable (i.e r.tab) like that : r.get('tab') Nicolas Lebas a écrit : > hello, &g

Re: getting Arrays and variables from R

2005-07-30 Thread Nicolas Lebas
Finally i found the solution in Rpy-list : there is a bug in python2.4-rpy_0.4.1. An alternative solution which works fine it's to use the R get(str) function instead of using directly the variable (i.e r.tab) like that : r.get('tab') This bug is fixed in the rpy_0.4.6 rele

PEP: Specialization Syntax

2005-08-07 Thread Nicolas Fleury
Hi everyone, I would to know what do you think of this PEP. Any comment welcomed (even about English mistakes). PEP:XXX Title: Specialization Syntax Version:$Revision: 1.10 $ Last-Modified: $Date: 2003/09/22 04:51:49 $ Author: Nicolas Fleury Status: Draft Type

Re: PEP: Specialization Syntax

2005-08-07 Thread Nicolas Fleury
The PEP validity is also very much influenced if optional static typing is planned to be added to the language. I realize defending this PEP is much harder without static typing and my use cases imply typing of some sort anyway. Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP: Specialization Syntax

2005-08-07 Thread Nicolas Fleury
list syntax as parenthesis calling trailer syntax. I totally agree and that's what I mean. The formulation of the PEP is wrong, I should almost not talk about __getitem__ since as you said it can have any signature. The PEP is about extending [] syntax to call automtically __getitem__ function with more complex signatures. >>Should other operators that square brackets be used for >>specialization? > > Didn't quite parse that ;-) You mean list comprehensions? Or ?? I mean should angle brackets <> like in C++, or another operator, be used instead? Regards and thx for your feedback, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP: Specialization Syntax

2005-08-07 Thread Nicolas Fleury
In the end, it looks very much like the mess in the example. Maybe I'm missing a solution using decorators. I've defined a few classes like that, and I can live with it, but having a syntax to do it more easily, I would use it right away. I guess it can also be useful for people interfacing with COM or typed contexts. Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP: Specialization Syntax

2005-08-08 Thread Nicolas Fleury
in that case: def makeType(a, b, c=someDefault): arguments = locals() class MyObject: pass # Complete definition here MyObject.__dict__.update(arguments) return MyObject Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP: Specialization Syntax

2005-08-08 Thread Nicolas Fleury
tic-like typing in frameworks interacting with other languages with generic types. So I would already benefit from such a capability, and yes, there's workarounds. I'm clearly in a minority with such a need, but the first point fo the PEP is to extend [] syntax, so that it is possible to prototype generic types using [] operators. Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP: Specialization Syntax

2005-08-08 Thread Nicolas Fleury
Bengt Richter wrote: > On Sun, 07 Aug 2005 21:41:33 -0400, Nicolas Fleury <[EMAIL PROTECTED]> wrote: >>I mean should angle brackets <> like in C++, or another operator, be >>used instead? > > I am getting the feeling that your PEP is about a means to do somet

Re: PEP: Specialization Syntax

2005-08-08 Thread Nicolas Fleury
Bengt Richter wrote: > On Mon, 08 Aug 2005 16:18:50 -0400, Nicolas Fleury <[EMAIL PROTECTED]> wrote: >>I wrote the PEP to see if was the only one that would benefit from >>generic types *before* having optional static typing in the language. >> >>It seems I'm

Re: PEP: Specialization Syntax

2005-08-09 Thread Nicolas Fleury
Martin v. Löwis wrote: > Nicolas Fleury wrote: > >>Well, I'm using the alternatives. > > Perhaps not to the full power. Not perhaps, surely;) Who does anyway;) > So you don't want to write the makeArrayType function, right? > > How about this: &g

Re: win32pipe.popen3

2005-08-17 Thread Nicolas Fleury
win32pipe.popen4() > > while win32pipe.popen() does almost what you want. Have you tried subprocess? Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: Basic Server/Client socket pair not working

2005-08-29 Thread Nicolas Couture
Michael Goettsche wrote: > Hi there, > > I'm trying to write a simple server/client example. The client should be able > to send text to the server and the server should distribute the text to all > connected clients. However, it seems that only the first entered text is sent > and received. When

Import mechanism to support multiple Python versions

2005-03-18 Thread Nicolas Fleury
ymbolic links, since I would want the exact same code hierarchy to work with both Python 2.3 and 2.4. Any help appreciated. Thx and regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: Import mechanism to support multiple Python versions

2005-03-18 Thread Nicolas Fleury
Nicolas Fleury wrote: import cppmymodule would be equivalent to: if sys.version == "2.4": import cppmymodule24 as cppmymodule elif sys.version == "2.3": import cppmymodule23 as cppmymodule for all modules under the package and all modules with names beginning with cp

Re: getattr() woes

2004-12-29 Thread Nicolas Fleury
ption object, and use it in getattr; if the name doesn't match, the exception is re-raised. It's still not flawless, but would reduce risk of errors. Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: Why would I use inspect.isclass()?

2004-12-29 Thread Nicolas Fleury
need them. Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: Why would I use inspect.isclass()?

2004-12-29 Thread Nicolas Fleury
be powerful. One simple example could be the generation of documentation; since you usually want to doc your classes, not instances. So it would make sense to do something like: def writeHtmlDoc(file, someClass): ... Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: Why would I use inspect.isclass()?

2004-12-30 Thread Nicolas Fleury
Class? You have the builtin function isinstance: class A: pass a = A() print isinstance(a, A) # True Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

How to use subprocess

2005-03-22 Thread Nicolas Fleury
ccess). How am I supposed to do it? Thx and regards, Nicolas It something like that that I would need to make work (but supporting file-like objects): class CancellationException(Exception): pass class CancellableCommand: def __init__(self, command, stdout=nullFile, stderr=nul

Once again a unicode question

2005-03-26 Thread Nicolas Evrard
quot;, line 1, in ? . File "/usr/lib/python2.4/sgmllib.py", line 94, in feed .self.rawdata = self.rawdata + data .UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 1: ordinal not in range(128) .>>> html2txt.feed('Début') .Traceback (most recent cal

Re: Once again a unicode question

2005-03-26 Thread Nicolas Evrard
* Serge Orlov [23:45 26/03/05 CET]: Nicolas Evrard wrote: Hello, I'm puzzled by this test I made while trying to transform a page in html to plain text. Because I cannot send unicode to feed, nor str so how can I do this ? Seems like the parser is in the broken state after the first exce

Re: list-comprehension and map question (simple)

2005-03-27 Thread Nicolas Évrard
lines()]) I hope the question is clear enough. I have a feeling I'm ignoring a simple technique . . . lambda ! map(lambda x: timestwo(getlength(x)), ...) -- (°> Nicolas Évrard / ) Liège - Belgique ^^ -- http://mail.python.org/mailman/listinfo/python-list

threading.Event file descriptor

2005-04-02 Thread Nicolas Fleury
Hi, Is there any way to get the file descriptor on Unix or handle on Windows associated internally with a threading.Event object? So that it can be used in a call to select or WaitForMultipleObjects. Thx and regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: threading.Event file descriptor

2005-04-03 Thread Nicolas Fleury
uld be better of, if you create your own class (derived from Event, and ovewritte aquire, release and wait methods). I wouldn't want to derive from Event since my goal would be to submit a patch to make subprocess.Popen.wait take an optional threading.Event to kill the process.

Re: threading.Event file descriptor

2005-04-03 Thread Nicolas Fleury
d be a good thing. But it doesn't change the fact that, IMHO, the usefulness of threading.Event is just too limited if it doesn't support select or WaitForMultipleObjects. I think also that threading.Thread should give access to its internal handle (at least thread module does)

Re: pre-PEP: Suite-Based Keywords

2005-04-16 Thread Nicolas Fleury
d of block is illegal and generates a syntax error. Note that this usage seems to fit well with the definition of "ellipsis". http://dictionary.reference.com/search?q=ellipsis Shane I like the ellipsis syntax a lot, it greatly helps the proposal IMHO. Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic way to do static local variables?

2005-04-25 Thread Nicolas Fleury
e scope? Thanks. You might want a generator. Search for yield keyword. Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: E-commerce system in Python

2016-03-23 Thread Nicolas Évrard
uture. -- Nicolas Évrard - B2CK SPRL E-mail/Jabber: nicolas.evr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ -- https://mail.python.org/mailman/listinfo/python-list

Which type should be used when testing static structure appartenance

2015-11-17 Thread Nicolas Évrard
his issue (I realize it's not something of the utmost importance but rather a "philosophical" question). -- Nicolas Évrard - B2CK SPRL E-mail/Jabber: nicolas.evr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ -- https://mail.python.org/mailman/listinfo/python-list

Re: MySQLdb Python API: Unable to connect

2005-12-27 Thread Nicolas Kassis
Dennis Lee Bieber wrote: >On 26 Dec 2005 21:39:11 -0800, "Mondal" <[EMAIL PROTECTED]> declaimed >the following in comp.lang.python: > > > >c=MySQLdb.Connect(host='localhost',user='root',passwd='',db='shop',port=330­6) > > > > So what is that - doing in the port number

Patch : doct.merge

2005-12-27 Thread Nicolas Lehuen
: a = dict(a=1,c=3) b = dict(a=0,b=2) a.merge(b) assert a == dict(a=1,b=2,c=3) Does this seem a good idea to you guys ? Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: Patch : doct.merge

2005-12-28 Thread Nicolas Lehuen
1 : 5.315 Method 2 : 3.855 Method 3 : 7.815 Using dict.merge() : 1.425 So using generator expressions is a bad idea, and using the new dict.merge() method gives an appreciable performance boost (~ x 3.73 here). Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

csv file or sqlite ?

2006-07-25 Thread frevol nicolas
hi, I am programming a filter for websites. to check if an url is in the blacklist, i have used a csv file. i have try to use sqlite but it looks as fast as csv files. Can you tell me if sqlite is faster than csv files ? or not ? thanks _

unicode "table of character" implementation in python

2006-08-22 Thread Nicolas Pontoizeau
python? I mean, I give a character and python replys me with the language in which the character occurs. Thanks in advance -- http://www.nicolas.pontoizeau.org/ Nicolas Pontoizeau - Promotion EFREI 2005 -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode "table of character" implementation in python

2006-08-22 Thread Nicolas Pontoizeau
2006/8/22, Brian Beck <[EMAIL PROTECTED]>: > Nicolas, check out the unicodedata module: > http://docs.python.org/lib/module-unicodedata.html > > Find "import unicodedata" on this page for how to use it: > http://www.amk.ca/python/howto/unicode > > I'

Re: Python to tell what is the IP of my PC .

2006-11-08 Thread Nicolas G
Default Gateway IP address using Python http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/162994import win32api raise the error "module not exsit"and socket.gethostbyname(name)the router doesn't have a hostname.cheers ;)-- Nicolas GSkype: nicolasg_ mobile: +30 69 45 714 578 --

HTTPBasicAuthHandler doesn't work

2006-07-09 Thread nicolas . surribas
Hi ! I'm trying to add the HTTP basic authentification to my web spider but it doesn't work... The HTTPBasicAuthHandler don't send the headers for authentification :-( Here is the code : http://devloop.lyua.org/releases/lswww_urllib2.py def __init__(self,rooturl,firsturl=[],forbidden=[],proxy={},

Re: Python web service ...

2006-08-28 Thread Nicolas G
or there is something better in mind ? > > is that webservice or webserver? > if webservice try ZSI of it's a webserver why don't you try CherryPy? > > > > -- > > http://mail.python.org/mailman/listinfo/python-list > > > -- Nicolas G mobile: +30 69 45 714 578 -- http://mail.python.org/mailman/listinfo/python-list

python and snmp

2006-09-18 Thread Nicolas Miyasato
Hi all, I was just wondering if someone here had any experience with some of these implementations of the snmp protocol? pysnmp, libsnmp, snmpy. Does anybody know of another implementation? thanks in advance!!! -- miya -- http://mail.python.org/mailman/listinfo/python-list

Re: VB to Python migration

2006-01-27 Thread Nicolas Kassis
Josh wrote: > We have a program written in VB6 (over 100,000 lines of code and > 230 UI screens) that we want to get out of VB and into a better > language. The program is over 10 years old and has already been > ported from VB3 to VB6, a job which took over two years. We would > like to port it t

Re: Python vs C for a mail server

2006-01-28 Thread Nicolas Lehuen
ise he could be charged of cheating by using a more productive language :). Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs C for a mail server

2006-01-28 Thread Nicolas Lehuen
ality and ease of use of their built-in and third party libraries. I use C++ only for my core data structure (namely a tuned version of a ternary search tree which I use to build full text indices). Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Make staticmethod objects callable?

2006-02-28 Thread Nicolas Fleury
, but would it still make sense to implement __call__ for that specific use case? Would it be error-prone in any way? Thx and regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: Make staticmethod objects callable?

2006-02-28 Thread Nicolas Fleury
Felipe Almeida Lessa wrote: > Em Ter, 2006-02-28 às 15:17 -0500, Nicolas Fleury escreveu: > >>class A: >> @staticmethod >> def foo(): pass >> bar = foo() > > > # Why not: > > def foo(): pass > > class A: > bar = foo() &g

Re: Make staticmethod objects callable?

2006-02-28 Thread Nicolas Fleury
Steven Bethard wrote: > Nicolas Fleury wrote: > >> I was wondering if it would make sense to make staticmethod objects >> callable, so that the following code would work: >> >> class A: >> @staticmethod >> def foo(): pass >> bar =

Re: Make staticmethod objects callable?

2006-03-01 Thread Nicolas Fleury
a patch and see what > happens. I'll make a brief comment on it along the above lines, but > since I'm not a committer, it's not really worth your time to try to > convince me. ;) I might do it, but even if I'm not a commiter, I'll continue trying to convinc

wxpython and wxtextctrl

2005-05-18 Thread Nicolas Pourcelot
to Boa package installation on my Ubuntu Hoary ? Does Boa installation changes wxpython version ? Is wxTextCtrl attribute .Bind() obsolete ?? Thanks, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: wxpython and wxtextctrl

2005-05-19 Thread Nicolas Pourcelot
Ok, as I guessed, it was Boa installation which changed the wxpython version used. I removed Boa... Thanks ! Nicolas Greg Krohn a écrit : > Nicolas Pourcelot wrote: > >> Hello, >> my script worked well until today : when I tried to launch it, I got >> the following : &

Re: Comparing 2 similar strings?

2005-05-25 Thread nicolas . lehuen
anglo-saxon way) which may not be the right way (hence the examples given before for Gaellic surnames). But these ones are far "better" than soundex. Regards, Nicolas Lehuen -- http://mail.python.org/mailman/listinfo/python-list

Re: For review: PEP 343: Anonymous Block Redux and Generator Enhancements

2005-06-03 Thread Nicolas Fleury
ening(writeFilename) as output ... Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: For review: PEP 343: Anonymous Block Redux and Generator Enhancements

2005-06-03 Thread Nicolas Fleury
opening(readFilename), > opening(writeFilename) ) as _, input, output: > ... True. But does it look as good? Particularly the _ part? Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: For review: PEP 343: Anonymous Block Redux and Generator Enhancements

2005-06-04 Thread Nicolas Fleury
not so much indentation. - Most of the time, a with-statement ends at the end of current block, so indentation-syntax most of the time result in a waste of space. The way to see my proposal is not "to be used when you have multiple with-blocks" but instead "never use the ':&#x

Re: For review: PEP 343: Anonymous Block Redux and Generator Enhancements

2005-06-04 Thread Nicolas Fleury
Ilpo Nyyssönen wrote: > Nicolas Fleury <[EMAIL PROTECTED]> writes: >>What about making the ':' optional (and end implicitly at end of current >>block) to avoid over-indentation? >> >>def foo(): >>with locking(someMutex) >>

Re: For review: PEP 343: Anonymous Block Redux and Generator Enhancements

2005-06-04 Thread Nicolas Fleury
So, my conclusion, most of the time the indentation will be useless. > What I mean by all of this is that the new PEP may encourage > more people to use indented blocks, in a way that can't be > inferred by simply looking at existing code. In that case > your proposal, or the one wr

Re: For review: PEP 343: Anonymous Block Redux and Generator Enhancements

2005-06-05 Thread Nicolas Fleury
as with import). All these changes can also be made later, so no proposition should slow down the implementation of the PEP. Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: For review: PEP 343: Anonymous Block Redux and GeneratorEnhancements

2005-06-05 Thread Nicolas Fleury
Delaney, Timothy C (Timothy) wrote: > Nicolas Fleury wrote: >>def getFirstLine(filename): >> with opening(filename) as file >> return file.readline() > > Your tastes definitely disagree with the majority of Python programmers > then, including Guido. S

Re: "also" to balance "else" ?

2005-06-15 Thread Nicolas Fleury
ready there: for x in : BLOCK1 if : ALSO-BLOCK break else: BLOCK2 If find "else" fine, since the only times I used it is in searches: for x in BLOCK1 if : break else: raise Exception('Not found') In that case, 'else' soun

strxfrm works with unicode string ?

2005-06-17 Thread nicolas . riesch
I am trying to use strxfm with unicode strings, but it does not work. This is what I did: >>> import locale >>> s=u'\u00e9' >>> print s é >>> locale.setlocale(locale.LC_ALL, '') 'French_Switzerland.1252' >>> locale.strxfrm(s) Traceback (most recent call last): File "", line 1, in -toplevel-

Re: strxfrm works with unicode string ?

2005-06-17 Thread nicolas . riesch
Gruëzi, Gerald ;-) Well, ok, but I don't understand why I should first convert a pure unicode string into a byte string. The encoding ( here, latin-1) seems an arbitrary choice. Your solution works, but is it a workaround or the real way to use strxfrm ? It seems a little artificial to me, but pe

Re: python in academics?

2007-11-08 Thread Nicolas DERAM
2007/11/6, Nicolas.Chauvat <[EMAIL PROTECTED]>: > > Le Mon, 29 Oct 2007 20:39:29 -0700, sandipm a écrit: > > > seeing posts from students on group. I am curious to know, Do they teach > > python in academic courses in universities? > > I am teaching assistant for the course > > http://www.etudes.ec

Re: Pythonic way to determine if one char of many in a string

2009-02-15 Thread Nicolas Dandrimont
ent, see http://docs.python.org/reference/compound_stmts.html#for) It is clear (imo), and it is seems to be the intended idiom for a search loop, that short-circuits as soon as a match is found. Cheers, -- Nicolas Dandrimont linux: the choice of a GNU generation (k...@cis.ufl.edu put this on Tshirts in '93) signature.asc Description: Digital signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic way to determine if one char of many in a string

2009-02-16 Thread Nicolas Dandrimont
* pyt...@bdurham.com [2009-02-16 00:48:34 -0500]: > Nicolas, > > > I would go for something like: > > > > for char in word: > > if char in 'aeiouAEIUO': > > char_found = True > > break > > else: > > char_fo

  1   2   >