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
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
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
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
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
riga2
riga1
Grazie anticipamente per i consigli
--
Paolo
--
https://mail.python.org/mailman/listinfo/python-list
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
how do I know if a JTextField has the focus?
thank to all
--
http://mail.python.org/mailman/listinfo/python-list
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
>
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
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/
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
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
> 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
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
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
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
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
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
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
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
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
;)
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
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/
thon.
Thank you,
Paolo
--
http://mail.python.org/mailman/listinfo/python-list
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
h the files.
Thanks a lot,
Paolo
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
--
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
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
"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
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
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
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
) 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
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
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
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
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
--
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
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
/software/chess/). Does anyone konw about more
chess related modules?
Thnx
PAolo
--
http://mail.python.org/mailman/listinfo/python-list
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
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.
ve me his
feedback about what is good and what should be improved.
Thnx
PAolo Pantaleo
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
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
ggest links to be added.
The page is : http://ppp3.co.nr
Thnx
Paolo Pantaleo
--
http://mail.python.org/mailman/listinfo/python-list
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
&
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
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
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
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
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
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
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
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
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
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
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])
68 matches
Mail list logo