Re: Question regarding unexpected behavior in using __enter__ method

2023-04-21 Thread Lorenzo Catoni
%20only%20happens%20for%20user%2Ddefined%20functions%3B%20other%20callable%20objects%20(and%20all%20non%2Dcallable%20objects)%20are%20retrieved%20without%20transformation Regards, Lorenzo Catoni On Fri, 21 Apr 2023 at 07:21, Cameron Simpson wrote: > On 21Apr2023 00:44, Lorenzo Catoni wrote: >

Question regarding unexpected behavior in using __enter__ method

2023-04-20 Thread Lorenzo Catoni
] on linux - Python 3.10.10 (main, Feb 8 2023, 14:50:01) [GCC 9.4.0] on linux - Python 3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)] on win32 I appreciate any input or insights that you might have on this matter. Thank you for your help in advance! Best regards, Lorenzo Catoni -- https://mail.python.org/mailman/listinfo/python-list

VisPy 0.12 released

2022-11-08 Thread Lorenzo Gaifas
/blob/main/CHANGELOG.md Contributing Help is always welcome. See our Contributor's Guide for information on how you can participate: https://vispy.org/dev_guide/contributor_guide.html Thanks, Lorenzo -- https://mail.python.org/mailman/listinfo/python-list

Re: Type hinting of Python is just a toy ?

2019-01-04 Thread lorenzo . gatti
On Friday, January 4, 2019 at 9:05:11 AM UTC+1, iam...@icloud.com wrote: > I read that pep 484 type hinting of python has no effect of performance, then > what’s the purpose of it? Just a toy ? Having no effect on performance is a good thing; Python is already slowish, additional runtime type che

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-21 Thread lorenzo . gatti
On Saturday, February 17, 2018 at 12:28:29 PM UTC+1, Ben Bacarisse wrote: > Marko Rauhamaa writes: > > > Many people think static typing is key to high quality. I tend to think > > the reverse is true: the boilerplate of static typing hampers > > expressivity so much that, on the net, quality suf

Answers to homework questions [WAS]: Re: Python homework

2017-12-14 Thread Lorenzo Sutton
Hi Roger, On 13/12/17 23:31, ROGER GRAYDON CHRISTMAN wrote: On Wed, Dec 13, 2017, Lorenzo Sutton wrote: On 05/12/17 06:33, nick martinez2 via Python-list wrote: I have a question on my homework. [...] For this kind of problem I think the collections module [1] can be very useful. In this

Re: Python homework

2017-12-13 Thread Lorenzo Sutton
this kind of problem I think the collections module [1] can be very useful. In this case in particular have a look at the Counter package ;) Lorenzo. [1] https://docs.python.org/3.6/library/collections.html I wrote the program so it says the most frequent number out of all the rolls for

Re: How to reduce the DRY violation in this code

2016-09-28 Thread Lorenzo Sutton
: do you really need to add this method? Can't you ensure that the data passed during initialisation is already of the right type (i.e. can you convert to float/ints externally)? If now why? Lorenzo. It converts the strings to the appropriate type, then calls the real constructor, which c

Re: Getting back into PyQt and not loving it.

2016-06-27 Thread lorenzo . gatti
PyGTK is obsolete and stopped at Python 2.7, while PyGObject for Windows is several versions behind (currently 3.18 vs 3.21) and it doesn't support Python 3.5. Game over for GTK+. -- https://mail.python.org/mailman/listinfo/python-list

Re: Which one is the best XML-parser?

2016-06-24 Thread lorenzo . gatti
On Thursday, June 23, 2016 at 11:03:18 PM UTC+2, David Shi wrote: > Which one is the best XML-parser? > Can any one tell me? > Regards. > David Lxml offers lxml.etree.iterparse (http://lxml.de/tutorial.html#event-driven-parsing), an important combination of the memory savings of incremental pars

Re: python parsing suggestion

2016-05-30 Thread Lorenzo Sutton
Hi, On 30/05/2016 09:34, Ganesh Pal wrote: Hi , Trying to extract the '1,1,114688:8192' pattern form the below output. pdb>stdout: '3aae5d0-1: Parent Block for 1,1,19169280:8192 (block 1,1,114688:8192) --\n3aae5d0-1: magic 0xdeaff2fe mark_cookie 0x\ngpal-3aae5d0

Re: The irony

2016-05-11 Thread Lorenzo Sutton
utomatise this so that if instead of "line 1\n ..." you want "banana 1~banana 2~ " etc. you can simply change parameters? That said join and list comprehensions would also come to mind, but not sure how "obvious" that is... Lorenzo. ---

Reduce memory fragmentation with MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_

2016-02-26 Thread Lorenzo Bolla
Hi all, I've been experimenting with MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_ env variables to affect memory management in a long-running Python 2 process. See http://man7.org/linux/man-pages/man3/mallopt.3.html I got the idea from this bug report: http://bugs.python.org/issue11849 The resul

Re: Tk alternative to askopenfilename and askdirectory?

2015-12-16 Thread Lorenzo Sutton
would help if you could provide some information on your use case and what you want to achieve ;) Lorenzo. -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about math.pi is mutable

2015-11-06 Thread Lorenzo Sutton
On 06/11/2015 13:30, Bartc wrote: On 06/11/2015 02:33, wa...@travelsky.com wrote: Hello, python-list guys: I am a newbie of python from Beijing. China. I have a question about "math.pi". As you can see in the attachment, why i can modify "math.pi"? (in "mathmodule.c" "pi"

Re: Detection of a specific sound

2015-11-02 Thread Lorenzo Sutton
could range from a simple programme triggered by an amplitude change (e.g. a piezo attached to the single alarm in question) to a complex audio fingerprinting one... Lorenzo. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python, convert an integer into an index?

2015-09-24 Thread Lorenzo Sutton
On 23/09/2015 17:32, Denis McMahon wrote: On Tue, 22 Sep 2015 14:43:55 -0700, Chris Roberts wrote: results = 134523 #(Integer) This appears to be an integer expressed (presumably) in base 10 with 6 digits Desired: results = [1, 2, 3, 4, 5, 2, 3] #(INDEX) This appears to be a pyth

Python 3 windows installer problem [WAS: Re: an installing problem]

2015-09-23 Thread Lorenzo Sutton
ownloading, it might be helpful. https://docs.python.org/3/using/windows.html#installing-without-downloading This bug report might also be relevant: https://bugs.python.org/issue25126 Hope this helps. Lorenzo. -- https://mail.python.org/mailman/listinfo/python-list

Re: Pyarmor, guard your python scripts

2015-09-18 Thread Lorenzo Sutton
nt "in the *proprietary* software world". This discussion on the topic, and in particular this answer, on Stackoverflow are quite inspiring: http://stackoverflow.com/questions/261638/how-do-i-protect-python-code/261727#261727 Lorenzo. -- https://mail.python.org/mailman/listinfo/python-list

Re: XML Binding

2015-09-04 Thread Lorenzo Sutton
econd lxml.. [...] Which is good for parsing large file? How large is large? I have used lxml (coupled with pygtk) with very good results on XML files up to around 250Mb. Lorenzo. -- https://mail.python.org/mailman/listinfo/python-list

Re: global and loop control variable

2015-07-23 Thread Lorenzo Sutton
On 23/07/2015 14:31, Steven D'Aprano wrote: On Thu, 23 Jul 2015 09:20 pm, Lorenzo Sutton wrote: On 23/07/2015 12:24, candide wrote: Now, global declaration has another restriction, as PLR explains: [https://docs.python.org/3.4/reference/simple_stmts.html#the-global-stat

Re: global and loop control variable

2015-07-23 Thread Lorenzo Sutton
On 23/07/2015 12:24, candide wrote: [...] Now, global declaration has another restriction, as PLR explains: [https://docs.python.org/3.4/reference/simple_stmts.html#the-global-statement] ~ Names listed in a global statement must not be defined as formal pa

Re: anomaly

2015-05-11 Thread lorenzo . gatti
ys. Both choices are perfectly good, and routinely made without bothering other people with inane conversations. Lorenzo Gatti -- https://mail.python.org/mailman/listinfo/python-list

Re: New user's initial thoughts / criticisms of Python

2013-11-11 Thread lorenzo . gatti
Regarding the "select" statement, I think the most "Pythonic" approach is using dictionaries rather than nested ifs. Supposing we want to decode abbreviated day names ("mon") to full names ("Monday"): day_abbr='mon' day_names_mapping={ 'mon':'Monday', 'tue':'Tuesday', 'wed':'Wednesd

Global variables in a C extension for Python

2011-12-28 Thread Lorenzo Di Gregorio
;counter" in the module's space and have wrappers accessing it like self->counter. I do not need to make "counter" visible to Python, I just need the global static variable available for C. I've got somehow a clue of how this should work, but not much more than a clue

Re: (don't bash me too hard) Python interpreter in JavaScript

2011-11-22 Thread Lorenzo
>         Very interesting.  Is there a simple way to add third-party > libraries to these?  I assume that for pure-Python modules you could > just put a python file in the appropriate place and import it, but what > about if you wanted a web app that used numpy or something?  Is that > feasible? >

Re: (don't bash me too hard) Python interpreter in JavaScript

2011-11-20 Thread Lorenzo
On Nov 15, 11:51 pm, Carl Banks wrote: > Some people have already made an LLVM-to-Javascript compiler, and have > managed to build Python 2.7 with it. > > The LLVM-to-Javascript project is called emscripten. > > https://github.com/kripken/emscripten/wiki > > Demo of Python (and a bunch of other l

LAST CALL FOR PAPERS: TOOLS EUROPE 2010

2010-01-18 Thread Lorenzo Bettini
ich and Eiffel Software Program Chair: Jan Vitek, Purdue University Publicity Chair: Osmar Santos, University of York Program Committee: Uwe Assman, University of Dresden, Germany Elisa Baniassad, Chinese University of Hong Kong, Hong Kong Alexandre Bergel, University of Chile, Chile Lorenzo Bettini,

Re: Choosing GUI Module for Python

2009-11-12 Thread Lorenzo Gatti
On Nov 11, 9:48 am, Lorenzo Gatti wrote: > On a more constructive note, I started to follow the instructions > athttp://www.pyside.org/docs/pyside/howto-build/index.html(which are > vague and terse enough to be cross-platform) with Microsoft VC9 > Express. > Hurdle 0: recompile

Re: Choosing GUI Module for Python

2009-11-11 Thread Lorenzo Gatti
n't be resumed) after about 2 hours: trial and error at 1-2 builds per day could take weeks. Regards, Lorenzo Gatti -- http://mail.python.org/mailman/listinfo/python-list

Re: Choosing GUI Module for Python

2009-11-10 Thread Lorenzo Gatti
oject underway to produce > PyQT compatible LGPL python bindings under the PySide project. I also would like to use PySide, but unlike PyQt and Qt itself it doesn't seem likely to support Windows in the foreseeable future. A pity, to put it mildly. Regards, Lorenzo Gatti -- http://mail.py

Re: Pyfora, a place for python

2009-11-04 Thread Lorenzo Gatti
On Nov 3, 11:37 am, Steven D'Aprano wrote: > On Tue, 03 Nov 2009 02:11:59 -0800, Lorenzo Gatti wrote: [...] > Are you saying that now that comp.lang.python and stackoverflow exists, > there no more room in the world for any more Python forums? > > I think that's terri

How to print zero-padded floating point numbers in python 2.6.1

2009-11-04 Thread Lorenzo Di Gregorio
Hello, I thought that I could zero-pad a floating point number in 'print' by inserting a zero after '%', but this does not work. I get: print '%2.2F' % 3.5 3.50 print '%02.2F' % 3.5 3.50 How can I get print (in a simple way) to print 03.50? Best Reg

Re: Pyfora, a place for python

2009-11-03 Thread Lorenzo Gatti
g fish in a small pond over being part of a community. If you want to claim a small Python-related corner of the web, you should write a blog: if it is any good, and probably even if it isn't, it would be linked and read by someone and it would add to collective knowledge instead of fragmentin

CALL FOR PAPERS: TOOLS EUROPE 2010

2009-10-19 Thread Lorenzo Bettini
ich and Eiffel Software Program Chair: Jan Vitek, Purdue University Publicity Chair: Osmar Santos, University of York Program Committee: Uwe Assman, University of Dresden, Germany Elisa Baniassad, Chinese University of Hong Kong, Hong Kong Alexandre Bergel, University of Chile, Chile Lorenzo Bettini,

Re: Komodo(!)

2009-08-16 Thread Lorenzo Bettini
ge.net/ and I really enjoyed that! :-) cheers Lorenzo -- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino ICQ# lbetto, 16080134 (GNU/Linux User # 158233) HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com http://www.myspace.com/supertro

Re: Inheritance and forward references (prototypes)

2009-06-22 Thread Lorenzo Di Gregorio
On 21 Jun., 22:51, Scott David Daniels wrote: > LorenzoDiGregoriowrote: > > On 21 Jun., 01:54, Dave Angel wrote: > >> ... > >> class B(object): > >>     def __init__(self,test=None): > >>         if test==None: > >>             test = A() > >>         self.obj =() > >>         return > > ... > >

Re: Inheritance and forward references (prototypes)

2009-06-21 Thread Lorenzo Di Gregorio
-- > > >>> I can figure out some ways to fix this but none seems satisfying. > >>> Either they are too specific or too cumbersome. > >>> A runtime redefinition of class A does not seem to work either. > >>> What w

Re: Inheritance and forward references (prototypes)

2009-06-20 Thread Lorenzo Di Gregorio
On Jun 20, 8:43 pm, Dave Angel wrote: > Lorenzo Di Gregorio wrote: > > Hi, > > > I'm wondering what would be the preferred way to solve the following > > forward reference problem: > > > --- > > cl

Inheritance and forward references (prototypes)

2009-06-20 Thread Lorenzo Di Gregorio
han sorting out the class order? Best Regards, Lorenzo -- http://mail.python.org/mailman/listinfo/python-list

Re: random number including 1 - i.e. [0,1]

2009-06-10 Thread Lorenzo Gatti
you multiply or divide these coefficients by (N-1)/N the minimum and maximum results for the two choices can be made identical up to floating point mangling. Regards, Lorenzo Gatti -- http://mail.python.org/mailman/listinfo/python-list

Re: pythonCE GetSystemPowerState windows api

2009-04-25 Thread lorenzo . mentaschi
On Apr 25, 6:19 pm, Thomas Heller wrote: > lorenzo.mentas...@yahoo.it schrieb: > > > > > Hi all, > > I need to call GetSystemPowerState windows api from pythonCE, because > > I need to know if a windows ce 5 device is in sleep/off status. > > I can find this api in ctypes.windll.coredll, but I can

pythonCE GetSystemPowerState windows api

2009-04-25 Thread lorenzo . mentaschi
ode 87 (meaning that parameters are wrong) or 122 (meaning "pBuffer" variable is too small, in this case I passed None as pBuffer, since I'm interested only in pFlags result). Have you any idea? Maybe another api or way to perform this simple task? Thank you all, Lorenzo -- http://mail

Re: Stripping non-numbers from a file parse without nested lists?

2009-04-01 Thread Lorenzo
Maybe you can try a regex, something like -- import re pattern = re.compile('^(\d+)/(\d+).*') def read_data(filename): fh = open(filename, "r", encoding="ascii") for line in fh: if pattern.match(line): dip_,dir_ = pattern.match(line).groups()

Re: Thoughts on language-level configuration support?

2009-03-31 Thread Lorenzo Gatti
s central and actual use and design is a second class citizen. You say in your blog post: "Users shouldn’t have to pore through the code to find all the little bits they can tweak". They shouldn't because a well designed application has adequate documentation of what should be configured in the form of manuals, wizards, etc. and they shouldn't because they don't want to tweak little bits, not even if they have to. Regards, Lorenzo Gatti -- http://mail.python.org/mailman/listinfo/python-list

Re: How to add months to a date (datetime object)?

2009-03-16 Thread Lorenzo
On Mar 15, 1:28 pm, tinn...@isbd.co.uk wrote: > I have a date in the form of a datetime object and I want to add (for > example) three months to it.  At the moment I can't see any very > obvious way of doing this.  I need something like:- > >     myDate = datetime.date.today() >     inc = datetime.

Re: can python import class or module directly from a zip package

2009-03-11 Thread Lorenzo
On Mar 10, 2:13 pm, Flank wrote: > can python import class or  module directly from  a zip package ,just > like jave does from jar package without extracting the class file into > directory > > so far as i know ,python module should be unzip to file system in > order to use them, After a little d

Re: Inverse of dict(zip(x,y))

2009-03-04 Thread Lorenzo
Having a look at python documentation I found: zip() in conjunction with the * operator can be used to unzip a list: >>> x = [1, 2, 3] >>> y = [4, 5, 6] >>> zipped = zip(x, y) >>> zipped [(1, 4), (2, 5), (3, 6)] >>> x2, y2 = zip(*zipped) >>> x == x2, y == y2 True So, >>> x2, y2 = zip(*d.items())

Re: This application has failed to start because the application configuration is incorrect

2009-02-25 Thread Lorenzo
On 17 feb, 19:44, Mark Hammond wrote: > On 18/02/2009 5:49 AM, Sam Clark wrote: > > > I am receiving the message "Thisapplicationhasfailedtostartbecause > > theapplicationconfiguration is incorrect" when I attempt to run a > > compiled Python program on another machine. I have used py2exe on both

Re: syntax color lang source code in blogs or website

2009-01-29 Thread Lorenzo Bettini
Xah Lee wrote: For those of you using emacs, here's the elisp code that allows you to syntax color computer language source code in your blog or website. http://xahlee.org/emacs/elisp_htmlize.html may I suggest also this one: http://www.gnu.org/software/src-highlite/ -- Lorenzo Bettini

Re: type-checking support in Python?

2008-10-07 Thread Lorenzo Gatti
types. In C++ one can check dimensions at compile time (http://www.boost.org/ doc/libs/1_36_0/doc/html/boost_units.html) with a modest increase of cumbersomeness, but Python would need very heavyweight classes containing a value and its dimension and a replacement of all needed functions and operat

Re: XML-schema 'best practice' question

2008-09-20 Thread Lorenzo Gatti
s are that the needed objects are already in place and you only need to make workflow more explicit and add appropriate new features. Regards, Lorenzo Gatti -- http://mail.python.org/mailman/listinfo/python-list

Re: XML-schema 'best practice' question

2008-09-20 Thread Lorenzo Gatti
graphical output something simpler than an editor (e.g a Graphviz exporter) might be enough. 3) Maybe workflow processing can grow inside your existing accounting application without the sort of "big bang" redesign you seem to be planning; chances are that the needed objects are already

Re: XML-schema 'best practice' question

2008-09-18 Thread Lorenzo Gatti
e you performed validation) you can also store the filled-in document that you computed, either as XML or as serialized Python data structures. Regards, Lorenzo Gatti -- http://mail.python.org/mailman/listinfo/python-list

Re: 2d graphics - what module to use?

2008-07-25 Thread Lorenzo Gatti
glVertex2f(x,y) glEnd() app.run() Regards, Lorenzo Gatti -- http://mail.python.org/mailman/listinfo/python-list

http client encoding

2008-06-11 Thread Lorenzo
http responses???? Lorenzo -- http://mail.python.org/mailman/listinfo/python-list

Re: str(bytes) in Python 3.0

2008-04-12 Thread Lorenzo Gatti
de with lenient APIs is the only way forward; being forced to learn that encodings are important is better than, say, discovering unrecoverable data corruption in a working system. Regards, Lorenzo Gatti -- http://mail.python.org/mailman/listinfo/python-list

https and POST method

2008-04-10 Thread Lorenzo Stella
Hi all, I'm trying to write a simple script for sending sms via vyke... I have to make a https connection and pass some data with the POST method, like this perl script does: http://www.nutella.org/vyke.sms.txt I tried to make the same, but it simply doesn't work! Any request gives a 200 OK resul

Re: Beginner's assignment question

2008-03-01 Thread Lorenzo Gatti
overlaps between the left-hand side and the right-hand side are `safe' (for example "a, b = b, a" swaps two variables), overlaps within the collection of assigned-to variables are not safe! For instance, the following program prints "[0, 2]": x = [0, 1] i = 0 i, x[i] = 1, 2 print x Lorenzo Gatti -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for a light weighted library/tool to write simple GUI above the text based application

2008-01-25 Thread Lorenzo E. Danielsson
ython wrapper for GGI, although it is fairly old. Maybe you could look at the code for some ideas. You should also be able to compile SDL to be able to use directfb as a target. If your libSDL handles it, then that should apply to wrapper libraries as well, including pygame. I've never tried ru

Re: Howto on callbacks, queues and good design patterns

2007-12-29 Thread Lorenzo Mainardi
Nel mezzo del cammin di nostra vita, mi ritrovai con Michael Bernhard Arp Sørensen che diceva: > Hi there. > > As a newbie, I need to learn about callbacks and queues(syntax and > examples) working together. > > At work we talk a lot about design patterns. Does any of you know a good > site ab

Re: Ping Implementation in Python

2007-12-20 Thread Lorenzo Mainardi
Nel mezzo del cammin di nostra vita, mi ritrovai con Mrown che diceva: > Hi, > I was wondering if there was a ping implementation written in > Python. I'd rather using a Python module that implements ping in a > platform/OS-independent way than rely on the underlying OS, especially > as every O

Re: Printing user input?

2007-11-15 Thread Lorenzo E. Danielsson
etails(), so it is scoped to the function. This means that the variable is not accessible outside of PersonsDetails() and the attempt to print it with print(name) will fail. Lorenzo -- http://mail.python.org/mailman/listinfo/python-list

Re: can Python be useful as functional?

2007-09-18 Thread Lorenzo Stella
On 18 Set, 18:51, Grant Edwards <[EMAIL PROTECTED]> wrote: > Perhaps Lorenzo Stella is referring to Python's lack of > tail-recursion optimization? There are languages that > guarantee unlimited tail-recursion with a limited stack. That's it. Rustom Mody: your implement

can Python be useful as functional?

2007-09-17 Thread Lorenzo Stella
Hi all, I haven't experienced functional programming very much, but now I'm trying to learn Haskell and I've learned that: 1) in functional programming LISTS are fundmental; 2) any "cycle" in FP become recursion. I also know that Python got some useful tool such as map, filter, reduce... so I told:

Re: "once" assigment in Python

2007-09-17 Thread Lorenzo Di Gregorio
ckage), the scope of 'component' would be global (the whole instance[]): having global names could be pretty annoying in modeling a hierarchy. Anyway, some scoping mechanism could be implemented over the global dictionary and this could be a good price to pay to avoid other tricks. Further suggestions? Thank you! Lorenzo -- http://mail.python.org/mailman/listinfo/python-list

Re: "once" assigment in Python

2007-09-14 Thread Lorenzo Di Gregorio
ructure to fill what I was missing and for quickly building up a functional prototype and testing some ideas Python is really excellent. Best Regards, Lorenzo -- http://mail.python.org/mailman/listinfo/python-list

"once" assigment in Python

2007-09-13 Thread Lorenzo Di Gregorio
ct. Of course I can preprocess the Python code but an all-Python solution would be more handy. Any suggestions? Thx in advance, Lorenzo -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I get a slice of a string held in a tuple?

2007-04-08 Thread Lorenzo
In article <[EMAIL PROTECTED]>, Georg Brandl <[EMAIL PROTECTED]> wrote: > Lorenzo schrieb: > > >> > How do I go about it? > >> > >> Do it correctly. Post your actual example that fails > >> and the related error message. Possibnly yo

Re: How do I get a slice of a string held in a tuple?

2007-04-08 Thread Lorenzo
In article <[EMAIL PROTECTED]>, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Apr 8, 12:29�pm, Lorenzo <[EMAIL PROTECTED]> wrote: > > In article <[EMAIL PROTECTED]>, > > > > > > > > > > > >  "[EMAIL PROT

Re: How do I get a slice of a string held in a tuple?

2007-04-08 Thread Lorenzo
In article <[EMAIL PROTECTED]>, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Apr 8, 11:34?am, Lorenzo Thurman <[EMAIL PROTECTED]> > wrote: > > I have tuple which hold a string in tup[0]. I want to get a slice of > > that string. I thought I

Re: How do I get a slice of a string held in a tuple?

2007-04-08 Thread Lorenzo
In article <[EMAIL PROTECTED]>, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Apr 8, 11:34?am, Lorenzo Thurman <[EMAIL PROTECTED]> > wrote: > > I have tuple which hold a string in tup[0]. I want to get a slice of > > that string. I thought I

How do I get a slice of a string held in a tuple?

2007-04-08 Thread Lorenzo Thurman
I have tuple which hold a string in tup[0]. I want to get a slice of that string. I thought I would do something like: tup[0][start:end] But this fails. How do I go about it? I googled this and found a couple of references, but no solution. TIA -- http://mail.python.org/mailman/listinfo/python-l

Re: Mail not setting timestamp

2007-04-07 Thread Lorenzo Thurman
Gabriel Genellina wrote: > Lorenzo Thurman wrote: >> Gabriel Genellina wrote: >>> Lorenzo Thurman wrote: >>> >>>> I'm using the Mimewriter and mimetools modules to create html messages. >>>> They work OK, except that when the messages are rec

Re: Mail not setting timestamp

2007-04-07 Thread Lorenzo Thurman
Gabriel Genellina wrote: > Lorenzo Thurman wrote: > >> I'm using the Mimewriter and mimetools modules to create html messages. >> They work OK, except that when the messages are received, they always >> have the timestamp of 12/31/1969. I've looked through both p

Mail not setting timestamp

2007-04-06 Thread Lorenzo Thurman
I'm using the Mimewriter and mimetools modules to create html messages. They work OK, except that when the messages are received, they always have the timestamp of 12/31/1969. I've looked through both packages and can't find anything that would allow me to manually set it. Can someone help me o

Re: Python on MIPS

2007-04-06 Thread Lorenzo Mainardi
Thomas Krüger ha scritto: > Lorenzo Mainardi schrieb: >> I bought a very small embedded card, with a MIPS processor, running >> Linux. So, I would to use Python on that; I checked on python.org, but I >> did'nt find any release for this architecture. Could you help me? &

Python on MIPS

2007-04-06 Thread Lorenzo Mainardi
Hi everybody, I bought a very small embedded card, with a MIPS processor, running Linux. So, I would to use Python on that; I checked on python.org, but I did'nt find any release for this architecture. Could you help me? -- http://mail.python.org/mailman/listinfo/python-list

Re: XMLRPC Server

2007-02-06 Thread Lorenzo
Unfortunately I have to use Apache. The server implementation will be very easy, so I'm also considering more efficient solutions than python lv On Feb 6, 11:36 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi, I'm trying to create an XMLRPC server using apache

Re: XMLRPC Server

2007-02-06 Thread Lorenzo
Unfortunately I have to use Apache. The server implementation will we very easy, so I'm also considering more efficient solutions than python lv On Feb 6, 11:36 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi, I'm trying to create an XMLRPC server using apache

Re: NEWBIE: Script help needed

2006-11-05 Thread Lorenzo Thurman
nput (a > command prompt like "are you sure you want to do this [Y/n]?" > > For more in depth on subprocesses in Python take a look at the > subprocess module: > http://docs.python.org/lib/module-subprocess.html > > Hope this helps, > Nick V. > > >

NEWBIE: Script help needed

2006-11-04 Thread Lorenzo
I have this script that I want to use weekly to send me email with information regarding disk space and available upgrades for my system. This script is actually a learning tool for me as I learn Python. The problem I've run into has me stumped and I need some help. What happens is when the scr

Execution timeout

2006-07-30 Thread lorenzo . viscanti
avoid this kind of problem? Thanks, Lorenzo -- http://mail.python.org/mailman/listinfo/python-list

unicode html

2006-07-17 Thread lorenzo . viscanti
uc3B4 => ô for all available html entities. thanks, lorenzo -- http://mail.python.org/mailman/listinfo/python-list

Re: Aggregate funuctions broken in MySQLdb?

2006-05-15 Thread Lorenzo
In article <[EMAIL PROTECTED]>, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Mon, 15 May 2006 20:14:29 GMT, John Salerno > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > Lorenzo Thurman wrote: > > > Thanks, that was my probl

Re: Aggregate funuctions broken in MySQLdb?

2006-05-15 Thread Lorenzo
In article <[EMAIL PROTECTED]>, John Salerno <[EMAIL PROTECTED]> wrote: > http://sourceforge.net/docman/?group_id=22307 Yes, I did, but I did not find them thorough enough. -- "My Break-Dancing days are over, but there's always the Funky Chicken" --The Full Monty -- http://mail.python.org/mai

Re: Aggregate funuctions broken in MySQLdb?

2006-05-15 Thread Lorenzo Thurman
Thanks, that was my problem. Can you point me to some documentation on MySQLdb? I've been googling to get answers and that obviously has not been working. In article <[EMAIL PROTECTED]>, "Wade Leftwich" <[EMAIL PROTECTED]> wrote: > Works fine for me, and I certainly hope MySQLdb is ready fo

Aggregate funuctions broken in MySQLdb?

2006-05-13 Thread Lorenzo
I'm trying to use some of the agg functions in MySQLdb (avg, min, max), but they're just not working as I would expect. They all return the value 1 when executed as part of Python scripts, but work as expected when used in mysql 4.1. Does anyone have any experience using Python with MySQLdb? Qu

NEWBIE: Tokenize command output

2006-05-11 Thread Lorenzo Thurman
This is what I have so far: // #!/usr/bin/python import os cmd = 'ntpq -p' output = os.popen(cmd).read() // The output is saved in the variable 'output'. What I need to do next is select the line from that output that starts with the '*' remote refid st t when poll reach

SSL client authentication

2006-04-17 Thread Lorenzo Allegrucci
Hi everybody, I'm developing a distributed application in Python and I intend to use SOAP over a SSL connection. I looked at the SOAPpy package and it seems to have all I need but client authentication; in other words I want my client certificate be sent to the server during the SSL handshake. SOP

Re: Is Python appropriate for web applications?

2005-04-15 Thread Lorenzo Bolognini
Unknown User wrote: I have the choice. Thanks for your opinion, If you have a look at CherryPy (www.cherrypy.org) you will not want to go back to PHP again! ;-) Lorenzo -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython clipboard

2005-01-06 Thread Lorenzo Bolognini
would have to check if Windows Scripting Host is enabled. Anyway I'll keep u updated Cheers Lorenzo -- Get my PGP Public Key @ http://www.bolognini.net/LBolognini.txt -- http://mail.python.org/mailman/listinfo/python-list

Web form validators for Python (RequiredFieldValidator anyone?)

2004-12-12 Thread Lorenzo Bolognini
Can you point me to some code/class/module that implements what I'm looking for? Thanks a lot, Lorenzo -- Get my PGP Public Key @ http://www.bolognini.net/LBolognini.txt -- http://mail.python.org/mailman/listinfo/python-list