Re: getting source code line of error?

2021-11-20 Thread Paolo G. Cantore
except ZeroDivisionError as exception: tr = traceback.TracebackException.from_exception( exception ) x = tr.stack[0] print("Exception %s in line %s: %s" % (exception, x.lineno, x.line)) The traceback object does not only contain the lineno but also the content of the off

Delegating to part of a subgenerator

2020-12-19 Thread Paolo Lammens
Dear all, I've been struggling with the following problem, and I thought maybe there is someone here in python-list who could shine some light on this. Suppose we have a generator function `subgen`, and we want to wrap this in another generator function, `gen`. For clarity, these are "full" gener

Re: How to create an Excel app that runs Python?

2020-03-28 Thread Paolo G. Cantore
Am 25.03.20 um 15:21 schrieb farayao...@gmail.com: Hello Paolo, Thanks for your reply, indeed now I'm thinking on building a web app, do you have any suggestions for this? I am thinking of using Tkinter, the method that you describe using HTML is also using Javascript? Kind Regards F

Re: How to create an Excel app that runs Python?

2020-03-24 Thread Paolo G. Cantore
On Tue, Mar 24, 2020, 4:45 PM wrote: I have the following scenario: I have created lots of python files that I use to calculate a Cashflow model, when I run these files I get a beautiful pandas DataFrame that contains my final model. My mission is to show this table to the rest of the compan

Re: Python help needed

2019-08-08 Thread Paolo G. Cantore
Am 08.08.19 um 01:18 schrieb MRAB: On 2019-08-07 21:36, Kuyateh Yankz wrote: #trying to write a function that takes a list value as an argument and returns a string with all the items separated by a comma and a space, with and inserted before the last item. For example, passing the previous sp

scrivere file

2017-02-12 Thread Paolo
riga2 riga1 Grazie anticipamente per i consigli -- Paolo -- https://mail.python.org/mailman/listinfo/python-list

error installing pyton

2014-12-30 Thread Paolo Cavalletti
Whwn the installe starts it goes to crsh afere asking if i like the insllation for une o alla users of the pc in attach the report error Thanks Paolo-- https://mail.python.org/mailman/listinfo/python-list

focus on jtextfield

2012-09-04 Thread Paolo
how do I know if a JTextField has the focus? thank to all -- http://mail.python.org/mailman/listinfo/python-list

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

2011-10-14 Thread Paolo Zaffino
Nobody can help me? 2011/10/12 Paolo Zaffino > I wrote a function thaht works on a 3D matrix. > As first thing I have an array and I want reshape it into a 3D matrix (for > further manipulations). > For this reason I wrote in a row: > > matrix=matrix.reshape(a, b, c).T >

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

2011-10-12 Thread Paolo Zaffino
error: matrix=matrix.reshape(a, b, c).T ValueError: total size of new array must be unchanged Thank you. 2011/10/11 David Robinow > 2011/10/11 Paolo Zaffino : > > Nobody can help me? > Nope, not unless you post some code. Your problem description is too > vague. > -- http

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

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

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

2011-10-10 Thread Paolo Zaffino
y versions in > windows and other platforms? You may have newer/older version in Windows. > Otherwise, it looks like a platform spesific bug to me. > > 2011/10/9 Paolo Zaffino > >> Hello, >> I wrote a function that works on a numpy matrix and it works fine on >> Mac

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

2011-10-09 Thread Paolo Zaffino
Hello, I wrote a function that works on a numpy matrix and it works fine on Mac OS and GNU/Linux (I didn't test it on python 3) Now I have a problem with numpy: the same python file doesn't work on Windows (Windows xp, python 2.7 and numpy 2.6.1). I get this error: matrix=matrix.reshape(a, b, c) V

Re: argparse and default for FileType

2011-04-12 Thread Paolo Elvati
> Open up a bug report on the Python bug tracker and assign it to the user > "bethard", who is the author of argparse. He's usually pretty responsive. Thank you for the answer, I will. Paolo -- http://mail.python.org/mailman/listinfo/python-list

argparse and default for FileType

2011-04-08 Thread Paolo Elvati
t simply by removing the "default=fake" and adding the "required=True" keyword, but I was wondering what is the correct way of doing it (or if it is simply a bug). Thank you, Paolo -- http://mail.python.org/mailman/listinfo/python-list

Re: Turn-based game - experimental economics

2009-09-11 Thread Paolo Crosetto
much experience in writing network programs - this is my first - and I'd rather not go into complicated stuff. Thanks! -- Paolo Crosetto - PhD Student in Ec

Re: Turn-based game - experimental economics

2009-09-06 Thread Paolo Crosetto
break > disconnect from "game" > Thanks for this pseudocode - helpful in many ways. The only reason I had to structure the game as a one server-many clients was that I wanted to centralize the functions related to computing the payoffs etc in the server. I think this can

Re: Turn-based game - experimental economics

2009-09-05 Thread Paolo Crosetto
orry for the not-so-much related question, and thanks for your suggestions. -- Paolo Crosetto - PhD Student in Economics DEAS - Department of Economics - University of Milan - -- http://mail.python.org/mailman/listinfo/python-list

Turn-based game - experimental economics

2009-09-05 Thread Paolo Crosetto
es I could not find any clear documentation on how to do this. The 'select' road was said to be the easiest, but I found no further hints. Does anyone have any hints? thanks! -- Paolo Crosetto - PhD Student in Economi

Embedding python a la erb

2008-06-04 Thread PAolo
difference and maybe in JSP too. Is there any simple way to use PSP for that purpose? Thanks Paolo -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is slow

2008-05-24 Thread Paolo Victor
think Python doesn't suit your needs, you really should look for something that does, instead of wasting your (and our) time with "guesses" and "feelings". Research/develop/execute a benchmark. Gather and analyze relevant data. Make a real contribution. Peace, Paolo On May

Re: Wrong exist status for os.system, os.poepen, etc.

2007-03-06 Thread PAolo
On 6 Mar, 16:51, "Paul Boddie" <[EMAIL PROTECTED]> wrote: > On 6 Mar, 16:39, "Paolo Pantaleo" <[EMAIL PROTECTED]> wrote: > > > > > The os.system() (but all the other funciont with similar behavior) reports > > wrong exit status. I can repro

Wrong exist status for os.system, os.poepen, etc.

2007-03-06 Thread Paolo Pantaleo
;) 5120 the same for >>> x=os.popen("/tmp/x") >>> x.read() '' >>> x.close() 5120 Greetings PAolo Versions of packages python2.4 depends on: ii libbz2-1.0 1.0.3-6 high-quality block-sorting file co ii libc6

Re: Reading csv files using SQL

2007-03-01 Thread Pablo was Paolo
Tim Golden ha scritto: > I vaguely remember that you can get an ODBC driver for CSV. There is a standard ODBC driver for use text file or csv, in windows. But I use Linux on production servers. I'd like to find a Python library or tool. Thanks! Paolo -- http://mail.python.org/mailman/

Re: Reading csv files using SQL

2007-03-01 Thread Pablo was Paolo
thon. Thank you, Paolo -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading csv files using SQL

2007-03-01 Thread Pablo was Paolo
Paul McGuire ha scritto: > Sqlite has an in-memory option, so that you can read in your csv, then > load into actual tables. Thanks, this could be the perfect solution. Paolo -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading csv files using SQL

2007-02-28 Thread Pablo was Paolo
h the files. Thanks a lot, Paolo -- http://mail.python.org/mailman/listinfo/python-list

Reading csv files using SQL

2007-02-28 Thread Pablo was Paolo
Hi, exists a Python library that allows to interface to csv files as if you manage a database, using SQL language? Something like csvjdbc in Java, where table name is file name and the field's names are in first row. Thanks! Paolo -- http://mail.python.org/mailman/listinfo/python-list

Building C extensions

2006-11-06 Thread Paolo Pantaleo
Well I'm just courious: if I want to buid a C extension, I shoul use the same compiler that has been used to build python (right?). Since python has been built using Visual C, how can I build an extension if I don't have Visual Studio? PAolo -- http://mail.python.org/mailman/listinfo/python-list

A py2exe like tool for Linux

2006-10-24 Thread Paolo Pantaleo
Hi, is thre something like py2exe for Linux? I don't need to build a standalone executable (most Linuxes have python instaled), but at least I need to provide all the needed libraries togheter with my source code, so users just need to download one file, and not several libraries. PAolo --

Re: Screen capture on Linux

2006-10-23 Thread Paolo Pantaleo
APIs ? [I know about nothing about X programing] 2006/10/22, Theerasak Photha <[EMAIL PROTECTED]>: > On 22 Oct 2006 09:06:53 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Paolo Pantaleo wrote: > > > Hi, > > > > > > I need to capture a screen

Screen capture on Linux

2006-10-21 Thread Paolo Pantaleo
Hi, I need to capture a screen snapshot in Linux. PIL has a module IageGrab, but in the free version it only works under Windows. Is there any package to capture the screen on Linux? Thnx PAolo -- http://mail.python.org/mailman/listinfo/python-list

locals() and globals()

2006-10-14 Thread Paolo Pantaleo
"new is:" +str(new) lcl() produces gobal n is:100 new is:1 n in lcl() is:1 shouldn't be n in lcl() 100 too? why accessing the names dictionary globals() and locals() gives different results? This example was made using Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit

Tk: filling a frame with a widget

2006-10-04 Thread Paolo Pantaleo
containig the canvas? Thnx PAolo -- if you have a minute to spend please visit my photogrphy site: http://mypic.co.nr -- http://mail.python.org/mailman/listinfo/python-list

Re: postgresql database

2006-10-03 Thread Paolo
Michele Simionato ha scritto: > Paolo wrote: > > Ciao a tutti, sto cercando di implementare un applicazione che si > > interfaccia con postgresql(8.1), utilizzando Psycopg2, in ambiente > > windows (python versione 2.5). Ho installato Psycopg2 e provando > > solame

postgresql database

2006-10-02 Thread Paolo
Ciao a tutti, sto cercando di implementare un applicazione che si interfaccia con postgresql(8.1), utilizzando Psycopg2, in ambiente windows (python versione 2.5). Ho installato Psycopg2 e provando solamente fare: import psycopg mi ritorna il seguente errore: import psycopg ImportError: No mod

VIdeo Converence Software: Tk and thread synchronization

2006-10-02 Thread Paolo Pantaleo
) thread. But I don't know how to do it exactly. Any suggestion, please? What if I access to Tk object form thread 1, is Tk thread safe? Thnx PAolo -- if you have a minute to spend please visit my photogrphy site: http://mypic.co.nr -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing Video conference software for Windows

2006-09-22 Thread Paolo Pantaleo
2006/9/22, Paolo Pantaleo <[EMAIL PROTECTED]>: > Thnx everybody for the precious help :) > > Someone said about VNC... I'll take a look, but since it is an > exercise I need to do it, I can't just say someone else arelady did > that :) > > Everything seems quit

Re: Writing Video conference software for Windows

2006-09-22 Thread Paolo Pantaleo
d only the changing squares must be transmitted (Ok it shouldn't be too difficult) 2. The comunication must be in multicast I will spend some time testing the resources. PAolo -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing Video conference software for Windows

2006-09-21 Thread Paolo Pantaleo
dwidth issue is most of all related to video compression (see above). Well maybe 256 kbps would be nice. It should just show what's happening. PAolo -- http://mail.python.org/mailman/listinfo/python-list

Writing Video conference software for Windows

2006-09-19 Thread Paolo Pantaleo
need some Win32 system call, there are bindings in Python, aren't they?) If I needed to write some Python modules in C, would it be difficult? Can some language like C# or C++ may be better? Thnx PAolo -- if you have a minute to spend please visit my photogrphy site: http://mypic.co.nr --

Re: Python daemon process

2006-08-27 Thread Paolo Pantaleo
the quit (or close or wahtever) command to gnuchess when you want it to terminate. Supposing that gnuchess needs to do some stuff on exit, this is a better solution. PAolo -- if you have a minute to spend please visit my photogrphy site: http://mypic.co.nr -- http://mail.python.org/mailman/listinfo/python-list

Re: avoiding file corruption

2006-08-27 Thread Paolo Pantaleo
d to hard to track down database corruption errors. > > Amir > > -- > http://mail.python.org/mailman/listinfo/python-list > Even if it could be strange, the OS usually allow you to open a file twice, that's up to the programmer to ensure the consistency of the operations. PAo

Python & chess

2006-08-24 Thread Paolo Pantaleo
/software/chess/). Does anyone konw about more chess related modules? Thnx PAolo -- http://mail.python.org/mailman/listinfo/python-list

Re: p-gal: photo gallery generator with templating support

2006-08-14 Thread Paolo Pantaleo
14 Aug 2006 10:16:37 -0700, ajaksu <[EMAIL PROTECTED]>: > Paolo Pantaleo wrote: > > www.sf.net/projects/ppgal > > Ciao Paolo! > > The homepage (http://paolopan.freehostia.com/p-gal/ ) looks weird in my > SeaMonkey 1.0.4, contents appear below GoogleAds instead

Re: [Announce] p-gal: photo gallery generator with templating support

2006-08-14 Thread Paolo Pantaleo
14 Aug 2006 08:31:06 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid>: > "Paolo Pantaleo" <[EMAIL PROTECTED]> writes: > > I would anyone to take a look at my piece of code, and give me his > > feedback about what is good and what should be improved.

[Announce] p-gal: photo gallery generator with templating support

2006-08-14 Thread Paolo Pantaleo
ve me his feedback about what is good and what should be improved. Thnx PAolo Pantaleo -- http://mail.python.org/mailman/listinfo/python-list

Re: Grammar parsing

2006-08-03 Thread Paolo Pantaleo
2006/8/3, Ben Finney <[EMAIL PROTECTED]>: > "Paolo Pantaleo" <[EMAIL PROTECTED]> writes: > > > How can I write a pareser for a certain gramamr? I found PyPy that > > does it, is thare any other tool? Maybe something built-in the > > python interpre

Grammar parsing

2006-08-03 Thread Paolo Pantaleo
Hi, How can I write a pareser for a certain gramamr? I found PyPy that does it, is thare any other tool? Maybe something built-in the python interpreter? Thnx PAolo -- if you have a minute to spend please visit my photogrphy site: http://mypic.co.nr -- http://mail.python.org/mailman

Re: Behavior on non definded name in Cheetah

2006-08-02 Thread Paolo Pantaleo
2006/8/2, Peter Otten <[EMAIL PROTECTED]>: > Paolo Pantaleo wrote: > > > 2006/8/2, Stephan Diehl <[EMAIL PROTECTED]>: > >> Paolo Pantaleo wrote: > >> > [I hope I am posting to the right place] > >> > > >> > I have a cheetah

Re: Behavior on non definded name in Cheetah

2006-08-02 Thread Paolo Pantaleo
2006/8/2, Stephan Diehl <[EMAIL PROTECTED]>: > Paolo Pantaleo wrote: > > [I hope I am posting to the right place] > > > > I have a cheetah template something like this: > > > > x is: $x > > y is: $y > > z is: $z > > > > [Actually more

Behavior on non definded name in Cheetah

2006-08-02 Thread Paolo Pantaleo
making cheeta going on with parsing? Thnx PAolo -- if you have a minute to spend please visit my photogrphy site: http://mypic.co.nr -- http://mail.python.org/mailman/listinfo/python-list

Re: python - regex handling

2006-07-04 Thread Paolo Pantaleo
thon.org/doc/2.4.1/lib/module-re.html Here is the documentation about re, I think that if you spend an hour or two reading it, you will know about everything you need. Paolo -- If you like Python as I do, you can find useful my little Python resource center http://ppp3.co.nr -- http://mail.python.org/mailman/listinfo/python-list

Specifing arguments type for a function

2006-06-20 Thread Paolo Pantaleo
I have a function def f(the_arg): ... and I want to state that the_arg must be only of a certain type (actually a list). Is there a way to do that? Thnx PAolo -- if you have a minute to spend please visit my photogrphy site: http://mypic.co.nr -- http://mail.python.org/mailman/listinfo

Getting backtrace on an axception

2006-06-10 Thread Paolo Pantaleo
exception.extract_tb() and friends, but I can't figure out how they works. Can somebody exlpain me? Thnx PAolo -- if you have a minute to spend please visit my photogrphy site: http://mypic.co.nr -- http://mail.python.org/mailman/listinfo/python-list

Request for comment: programmer starting page (micro knowledge base)

2006-05-24 Thread Paolo Pantaleo
ggest links to be added. The page is : http://ppp3.co.nr Thnx Paolo Pantaleo -- http://mail.python.org/mailman/listinfo/python-list

Re: Includeing Python in text files

2006-05-23 Thread Paolo Pantaleo
2006/5/23, Chris Smith <[EMAIL PROTECTED]>: > Diez B. Roggisch wrote: > > Paolo Pantaleo wrote: > > > > > >>I am working on this: > >> > >>I have a text file, containig certain section in the form > >> >> python code here &

Includeing Python in text files

2006-05-22 Thread Paolo Pantaleo
feature already existed, if yes, can you point me out some links? Thnx PAolo -- if you have a minute to spend please visit my photogrphy site: http://mypic.co.nr -- http://mail.python.org/mailman/listinfo/python-list

Re: test assignmet problem

2006-04-24 Thread Paolo Pantaleo
2006/4/23, Paul McGuire <[EMAIL PROTECTED]>: > > "Paolo Pantaleo" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > So I tried this > > if(not (attr=global_re.match(line)) ): > break > > it says invalid syntax [o

test assignmet problem

2006-04-23 Thread Paolo Pantaleo
So I tried this if(not (attr=global_re.match(line)) ): break it says invalid syntax [on the =] so it is not possible to do test and assignment in C style? how can I write this otherwise? Thnx PAolo -- if you have a minute to spend please visit my photogrphy site: http

Re: list example

2006-04-23 Thread Paolo Pantaleo
ttp://docs.python.org/lib/typesseq.html > http://docs.python.org/tut/node7.html (section 5.1.4) > > Thnx, I didn't catch the use of colon in print... Thanks to the other posting, but actually I want to write some code that one can modify to his own needings PAolo -- http://mail.python.org/mailman/listinfo/python-list

list example

2006-04-22 Thread PAolo
print "numbers:"+str(numbers) numbers.sort() print "sorted numbers:"+str(numbers) any comment, suggestion? Is there something not elegant? Thnx PAolo -- http://mail.python.org/mailman/listinfo/python-list

Re: python university search

2005-12-05 Thread Paolo Alexis Falcone
On Sun, 04 Dec 2005 17:12:45 -0800, josh wrote: > [pardon me if this is not the appropriate list] > > hello, > > i am interested in doing an undergraduate major in computer science > that mainly focuses on python as a programming language.. > > i am not a very bright student and neither do i ha

Re: Standalone applications ?

2005-08-13 Thread Paolo Alexis Falcone
On Sat, 13 Aug 2005 23:29:27 -0400, Madhusudan Singh wrote: > Hi > > I just finished developing an application using Qt Designer in Python that > uses pyqwt, gpib, etc. How does one create standalone executables for > applications such as these ? Generally, you can't, as Python is an interpreted

Re: set of sets

2005-08-11 Thread Paolo Veronelli
Paolino wrote: > I thought rewriting __hash__ should be enough to avoid mutables problem but: > > class H(set): >def __hash__(self) > return id(self) > > s=H() > > f=set() > > f.add(s) > f.remove(s) > > the add succeeds > the remove fails eventually not calling hash(s). > Yes this i

Re: set of sets

2005-08-11 Thread Paolo Veronelli
Matteo Dell'Amico wrote: > Paolino wrote: > >>I thought rewriting __hash__ should be enough to avoid mutables problem >>but: >> >>class H(set): >> def __hash__(self) >>return id(self) >> >>s=H() >> >>f=set() >> >>f.add(s) >>f.remove(s) >> >>the add succeeds >>the remove fails eventually not

Re: How to turn a variable name into a string?

2005-03-11 Thread Paolo G. Cantore
Hi Stewart, what about the other way, string -> var and not var -> string? My suggestion: mylist = ["a", "b", "c"] for my in mylist: if locals()[my] == None: print "you have a problem with %s" % my Paolo Stewart Midwinter wrote: I'd like

deriving from str

2004-12-23 Thread Paolo Veronelli
I want to add some methods to str class ,but when I change the __init__ methods I break into problems class Uri(str): def __init__(self,*inputs): print inputs if len(inputs)>1: str.__init__(self,'<%s:%s>'%inputs[:2])