Re: scheduling accuracy for audio

2006-07-09 Thread andrea valle
Thanks Paul, that's what I suspected. -a- On 9 Jul 2006, at 19:22, Paul Rubin wrote: > andrea valle <[EMAIL PROTECTED]> writes: >> In order to have sequencing I have to send at precise timing messages >> from Python to SC. Obviously, being a musical application,

dictionary of list from a file

2006-10-04 Thread andrea . spitaleri
[i] i get 2 None 7 None data file is: 2 1 2 2 2 3 2 4 7 7 7 8 7 9 7 10 Any help?? Thanks in advance Best Regards Andrea -- http://mail.python.org/mailman/listinfo/python-list

PythonWin And Excel Problem

2006-12-01 Thread Andrea Gavana
excelfile = "C:/HelloWin32.xls" wb.SaveAs(excelfile) wb.Close() xlsapp.Quit() os.startfile(excelfile) Andrea. "Imagination Is The Only Weapon In The War Against Reality." http://xoomer.virgilio.it/infinity77/ -- http://mail.python.org/mailman/listinfo/python-list

PythonWin And Excel Problem

2006-12-01 Thread Andrea Gavana
and = [ii for ii in xrange(1, 11)] And the result in Excel will be the same. All the cells will have the value 1. Andrea. "Imagination Is The Only Weapon In The War Against Reality." http://xoomer.virgilio.it/infinity77/ -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-09 Thread Andrea Griffini
se places are few if the exist at all. Is this worth investigation or it has already been suggested/tried ? Andrea -- http://mail.python.org/mailman/listinfo/python-list

Lookup caching

2006-12-09 Thread Andrea Griffini
pler because I resorted to a regular non-inlined lookup in case of a cache miss. There's no reason to do that however... Also the same approach could be used for other lookups that get the name from co->co_names. Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: Lookup caching

2006-12-11 Thread Andrea Griffini
Gabriel Genellina wrote: > At Saturday 9/12/2006 23:04, Andrea Griffini wrote: > >> I implemented that crazy idea and seems working... in its >> current hacked state can still pass the test suite (exluding > > What crazy idea? And what is this supposed to do? > The

Re: Lookup caching

2006-12-12 Thread Andrea Griffini
g the speed gain with that will require a lot more work or just downgrading the python version to 2.4). Also I'm using an 32 bit int for timestamp... I wonder if I should listen to the paranoid in my head that is crying for 64 instead. Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: Inconsistency in dictionary behaviour: dict(dict) not calling __setitem__

2006-12-12 Thread Andrea Griffini
g actual code that implies specific side-effects) was also present in the C++ standard, and in at least one case an implementation would have to be very inefficient to comply on the issue (this fortunately is not what happened, the standard was "fixed" instead). If there is a bug in this case is IMO a docstring bug. Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic style involves lots of lightweight classes (for me)

2006-12-14 Thread Andrea Griffini
user = Record(name="Andrea Griffini", email="[EMAIL PROTECTED]") and then access the fields using user.name syntax HTH Andrea -- http://mail.python.org/mailman/listinfo/python-list

(newbie) class with a single instance ?!

2006-12-15 Thread Andrea Tomadin
m the very beginning that there will be no more than an instance of that class? Suggestions on this basic OOP task are very appreciated! Thank you, Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: Why less emphasis on private data?

2007-01-07 Thread Andrea Griffini
ip and disposal carefully and everything works as expected then you're saving some thinking and code, but if something goes wrong then you're totally busted. The GC "leaky abstraction" requires you to be lucky to work well, but unfortunately IMO as code complexity increases one is ne

Re: Why less emphasis on private data?

2007-01-07 Thread Andrea Griffini
only read about zope programs. But why zope applications would be a special case ? Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: Why less emphasis on private data?

2007-01-08 Thread Andrea Griffini
orrectness" of C++. Unfortunately that is not something that can be avoided completely in C++, as it roots in the core of the language. Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple assignment and the expression on the right side

2006-02-20 Thread Andrea Griffini
While I think that the paragraph is correct still there is IMO indeed the (low) risk of such a misunderstanding. The problem is that "the statement executes" can IMO easily be understood as "the statements execute" (especially if your background includes only languages where there's no multiple ass

Re: Augmented assignment

2006-02-20 Thread Andrea Griffini
I think it heavily depends on what is "x". If x is bound to a mutable x=x+1 and x+=1 can not only have different speed but indeed can do two very unrelate things (the former probably binding to a new object, the latter probably modifying the same object). For example consider what happens with list

Re: How can I find the remainder when dividing 2 integers

2006-02-26 Thread Andrea Griffini
Writing a while loop with ++x to increment the index was the first mistake i made with python. "++x" unfortunately is valid, it's not a single operator but a double "unary plus" Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: Is Python a Zen language?

2006-02-26 Thread Andrea Griffini
guage that would be hard to classify is COBOL ... but for other reasons :-) Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: empty lists vs empty generators

2005-05-03 Thread Andrea Griffini
lement entered the tee twins, but already got out of "it"). I would say that unless you use the second twin after calling is_empty that code wouldn't work... Am I correct or instead "tee" uses black magic to just peek at the yielded value without starting a continuation ? Andrea -- http://mail.python.org/mailman/listinfo/python-list

global lists

2005-05-08 Thread andrea crotti
Hi everbybody again, I have a little "problem", I don't understand the reason of this: a = [10,1,2,3] def foo(): global a for el in a: el = el*2 This doesn't make any difference, if I do def foo(): global a a[0] = 4 But def foo(): global a for n in range(len(a)): a[n] = a[n]

A Faster Way...

2005-05-10 Thread andrea . gavana
s (Python words...): c = (0, 20, 1, 21, 2, 22, 3, 23, 4, 24, 5, 25, . and so on. Sorry if it seems an homework assignment. Thanks to you all. Andrea --

Re: What are OOP's Jargons and Complexities?

2005-06-01 Thread Andrea Griffini
ges in the late 80ies >/ start of the 90ies. It was not a language. It was a product in the hand of a single company. The difference is that a product can die at the snaps of a marketroid, no matter how nice or how diffuse it is. Andrea -- http://mail.python.org/mailman/listinfo/python-list

executing a command

2005-06-04 Thread andrea valle
Hi to all, I need to run a program from inside python (substantially, algorithmic batch processing). I'm on mac osx 10.3.8 with python 2.3 framework and macpython. Trying to use exec*, I checked references, Brueck & Tanner, and then grab this code from effbot: >>> program = "python" >>> de

Re: What are OOP's Jargons and Complexities?

2005-06-04 Thread Andrea Griffini
s a clear example of what I mean with a product. You are of course free to call even Microsoft Access a language (and make long term investment on it) if you want. Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: executing a command

2005-06-05 Thread andrea valle
gument will > always be used as the program "name" (argv[0]), so unless you a reason > to do otherwise, pass the same name as the file that you are calling. > > > Regards, > Tiago S Daitx > > On 6/4/05, andrea valle <[EMAIL PROTECTED]> wrote: >> Hi

Re: What are OOP's Jargons and Complexities?

2005-06-05 Thread Andrea Griffini
written witn borland pascal that a special tool for binary patching executables was built (actually a few of them, as being unofficial it wasn't that simple to get to know that such a tool existed, so different people independently resorted to the same solution). Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: time consuming loops over lists

2005-06-07 Thread Andrea Griffini
for j in xrange(len(rngs)-1): if rngs[j] <= data[i] < rngs[j+1]: one could just do j = int((data[i] - dmin)/rng) The code with this change gets roughly about twice faster. Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: programmnig advise needed

2005-06-07 Thread Andrea Griffini
oving the children will allow you to detect logical errors in the file (i.e. a node having two parents - you won't find that node in the dict the second time - and absence of a single root - you won't end up with a single element in the dict after processing all associations -). HTH Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: time consuming loops over lists

2005-06-07 Thread Andrea Griffini
direct computation code the execution time gets down to 0.3 seconds; the inner loop i used is: for i, x in enumerate(data): j = int((x - dmin)/rng) tkns[i] = tks + js[j] with data = range(20, 123120) Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: Abstract and concrete syntax

2005-06-09 Thread Andrea Griffini
mitations of lambda in python under this light (about lambdas note that you can define a named function in a local scope if you need it; and those are full-blown functions and not just a single expression). HTH Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ?

2005-06-12 Thread Andrea Griffini
at's of course nonsense), but there should be no room for "magic" in a computer for a professional programmer. Also concrete->abstract shows a clear path; starting in the middle and looking both up (to higher abstractions) and down (to the implementation details) is IMO much more confusing. Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ?

2005-06-12 Thread Andrea Griffini
d memory, addresses and allocation and deallocation, or (roughly) how an hard disk works and what's the difference between hard disks and RAM then you're going to be a horrible programmer. There's no way you will remember what is O(n), what O(1) and what is O(log(n)) among containers u

Re: What is different with Python ?

2005-06-12 Thread Andrea Griffini
On Sun, 12 Jun 2005 19:53:29 -0500, Mike Meyer <[EMAIL PROTECTED]> wrote: >Andrea Griffini <[EMAIL PROTECTED]> writes: >> On Sat, 11 Jun 2005 21:52:57 -0400, Peter Hansen <[EMAIL PROTECTED]> >> wrote: >> Also concrete->abstract shows a clear path; startin

Re: What is different with Python ?

2005-06-12 Thread Andrea Griffini
quot;: END Just as a motivation. After that *FORGETTING* that (for and the "next" you missed) is IMO perfectly ok. >More importantly by far, *I made the computer do something*. Yes, I agree. But starting from basic and never looking lower is quit a different idea. Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ?

2005-06-13 Thread Andrea Griffini
ted is just black magic and a few words in a text for you then IMO you'll never be able to remember what that implies, and you'll do soon or late something really really stupid about it in your programs. Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ?

2005-06-13 Thread Andrea Griffini
y. This shows clearly what I mean with that without firm understanding of the basis you can do pretty huge and stupid mistakes (hint: strings are immutable in python... ever wondered what does that fancy word mean ?) Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ?

2005-06-13 Thread Andrea Griffini
On Mon, 13 Jun 2005 01:54:53 -0500, Mike Meyer <[EMAIL PROTECTED]> wrote: >Andrea Griffini <[EMAIL PROTECTED]> writes: >>>In short, you're going to start in the middle. >> >> I've got "bad" news for you. You're always in the >> mi

Re: What is different with Python ?

2005-06-13 Thread Andrea Griffini
terrible *OR* you were able to memorize an impressive quantity of black magic details (or you were just incredibly lucky ;-) ). Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ?

2005-06-14 Thread Andrea Griffini
ly, it's a natural place to teach the details of that kind of >thing. An OS has to deal with allocating a number of different kinds >of memory, with radically different behaviors and constraints. hehehe... and a program like TeX instead doesn't even need to allocate memory. Pairing this with that teaching abelian groups first to kids (why not fiber spaces then ?) and that TAOCP is too "abstract" tells me that apparently you're someone that likes to talk just for talking, or that your religion doesn't allow you to type in smileys. Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ?

2005-06-14 Thread Andrea Griffini
n improve their >abilities by learning about the fundamentals of engines, aerodynamics, >etc., but they aren't "bad" at what they do if they do not know the >underlying principles operating. And when you've a problem writing your software who is your mechanic ? W

Re: What is different with Python ?

2005-06-14 Thread Andrea Griffini
e indeed exists... but this is just an illusion; there are clear rules behind it and, believe it or not, we know *all* of them. Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ?

2005-06-14 Thread Andrea Griffini
he problem in our measuring instrument. My temptation is to react for this dropping of such a logical requirement with a good laugh... what could be the result of a theory that refuses basic logic ? On a second thought however laughing at strange physics theories is not a good idea. Especially

Re: What is different with Python ?

2005-06-15 Thread Andrea Griffini
Pairing this with that teaching >> abelian groups first to kids (why not fiber spaces then ?) >> and that TAOCP is too "abstract" tells me that apparently >> you're someone that likes to talk just for talking, or >> that your religion doesn't allow you to type in smileys. > >Now you're resorting to straw men and name-calling. That's an >indication that you no longer have any real points. I'll blame my bad english for understanding that you said that abelian groups should be taught before relative numbers (somehow I crazily thought the point of discussion was what's the correct order of learning how to program), that TAOCP is too abstract (a book where every single code listing is in assembler!) and that big-o when programming is a detail that can be safely ignored (good luck, IMO you'll need hell a lot of it). Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ?

2005-06-15 Thread Andrea Griffini
d of problems with current theories that are so complex and so impossible to check that it's even questionable they're not breaking logic and the scientific method and are instead a question of faith and opinions. Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ?

2005-06-15 Thread Andrea Griffini
saying "oh... and we could go over there" pointing at the sun and then blaming your "technicians" because there are a few little "details" that you didn't consider. Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ?

2005-06-16 Thread Andrea Griffini
e are pills to make you happy is sort of shocking from a philosophical point of view :-) If you'll see me walking around with an esoskeleton and an happy face it will mean I tried the chemical approach ;) (don't try to understand this phrase, either you know what I mean - and you like dilbert

Re: What is different with Python ?

2005-06-17 Thread Andrea Griffini
On Thu, 16 Jun 2005 07:36:18 -0400, Roy Smith <[EMAIL PROTECTED]> wrote: >Andrea Griffini <[EMAIL PROTECTED]> wrote: >> That strings in python are immutable it's surely >> just a detail, and it's implementation specific, >> but this doesn't means

Re: What is different with Python ?

2005-06-17 Thread Andrea Griffini
ls down to what is a programmer. Is C++ a good first programming language ? BWHAHAHAHAHAHAHAHA :D But apparently some guru I greatly respect thinks so (I'm not kidding, http://www.spellen.org/youcandoit/). Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ?

2005-06-17 Thread Andrea Griffini
f them got hooked to programming before me... the other never got interested in computers and now he's just a basic (no macros) ms office user. So in my case it was about 66%, and all started with a programmable pocket RPN calculator ... but there were no teachers involved; may be this is a big difference. Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ?

2005-06-17 Thread Andrea Griffini
nd how it works; i.e. if it has no magic at all for you) or your worst nightmare (if you do not understand how it works). I think that using C++ as the first language for someone learning programming is absurd. Francis thinks otherwise. Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ?

2005-06-17 Thread Andrea Griffini
ed with the ballast of deep >>understanding which can not only be useful but also >>hinder from fast progress. > >FWIW, this is also my experience. Why hinder ? Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ?

2005-06-17 Thread Andrea Griffini
On 17 Jun 2005 21:10:37 -0700, "Michele Simionato" <[EMAIL PROTECTED]> wrote: >Andrea Griffini wrote: >> Why hinder ? > ... >To be able to content himself with a shallow knowledge >is a useful skill ;) Ah! ... I agree. Currently for example my knowledge of Zope

Re: What is different with Python ?

2005-06-18 Thread Andrea Griffini
On 18 Jun 2005 00:26:04 -0700, "Michele Simionato" <[EMAIL PROTECTED]> wrote: >Your position reminds me of this: > >http://www.pbm.com/~lindahl/real.programmers.html Yeah, but as I said I didn't use a TRS-80, but an Apple ][. But the years were those ;-) And

Re: exceptions considered harmful

2005-06-18 Thread Andrea Griffini
en either you have state protection or swallowing an exception is taboo. Andrea -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop until condition is true

2005-06-18 Thread Andrea Griffini
the code was better *for each iteration* (one conditional jump instead of one conditional jump and one inconditional jump). I think compiler got better since then, even if I don't think they already so smart to be able to infer the "one interation guaranteed" property to avoid

PEP 3131: Supporting Non-ASCII Identifiers

2007-05-17 Thread Andrea Gavana
to each other like 5 years-old puckish boys :-D :-D Andrea. "Imagination Is The Only Weapon In The War Against Reality." http://xoomer.virgilio.it/infinity77/ *** * Python Premier League For Posts * *

Cincinnati PUG

2007-07-26 Thread Arlinghaus, Andrea
answer any questions. I look forward to hearing from you. Thanks so much! Andrea Arlinghaus Technical Recruiter Volt Workforce Solutions 8044 Montgomery Road, Suite 630 | Cincinnati, Oh 45236 [EMAIL PROTECTED]| t: 513-791-2600| f: 513-791-4292 -- http://mail.python.org/mailman

interpreter in the background

2007-07-28 Thread Andrea Tomadin
, just change default input and output instead of tty, but I could not find out a solution! Any help or hint is greatly appreciated! Best, Andrea smime.p7s Description: S/MIME cryptographic signature -- http://mail.python.org/mailman/listinfo/python-list

ascii-unicode replacement

2007-04-05 Thread Andrea Valle
outFile = codecs.open(outFileName, encoding='utf-8', mode="w") outFile.write(text) outFile.close() def run(self): for aFileName in self.files: outFileName = aFileName.split(".")[0]+"UT

Re: ascii-unicode replacement

2007-04-05 Thread Andrea Valle
Many thanks Gabriel Convert to unicode right there, using read_text.decode("ascii"). You have unicode now. That's exactly what I was searching for. This new line: text = text.decode("ascii") solved my problem. Best -a- ------

Simple SVN/CVS-like library in Python?

2007-02-07 Thread Andrea Gavana
e the "children" of (are derived from) another input file (older). But I am open to all possible suggestions to improve/modify the software, as this is an area in which my experience is about nothing above zero. Thank you very much for every hint. Andrea. "Imagination Is The Only Weapo

Re: Simple SVN/CVS-like library in Python?

2007-02-08 Thread Andrea Gavana
> Andrea Gavana wrote: > > Hi All, > > > > in our office we work with quite complex input files for a > > reservoir simulator. Those files have thousands of keywords, switches, > > sub-keywords and whatever. Every time a modification is requested, we > &g

[pywin32] - Excel COM problem

2007-02-09 Thread Andrea Gavana
um length of 200 chars. Am I missing something here? This is with Python 2.5, PythonWin 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win32, Windows XP SP2. Thank you for your consideration. Andrea. "Imagination Is The Only Weapon In The War Against Reality.&quo

Encoding Title mail

2009-01-12 Thread Andrea Reginato
Hi to everybody, I'm trying to use libgmail version 0.1.9, to read some mails from a google account and save the attached files. All works fine, but when a tile has some letters with accents (like èùàòì) I read a string like this. =?ISO-8859-1?Q?=F2=E0=F9+=E8=EC'_0987654321_\?= =?ISO-8859-1?Q? _=E

Re: Encoding Title mail

2009-01-12 Thread Andrea Reginato
On Jan 12, 2:06 pm, Marc 'BlackJack' Rintsch wrote: > On Mon, 12 Jan 2009 04:32:35 -0800, Andrea Reginato wrote: > > Hi to everybody, I'm trying to use libgmail version 0.1.9, to read some > > mails from a google account and save the attached files. All works fine

Where is a good open source python project to be used as example?

2008-12-16 Thread Andrea Francia
I'm looking for a python project to use as example to learning python. The project should have these features: 1. is almost fully unit tested 2. use consistently the code convention recommended by PEP 8 3. it's elements are almost fully documented Extra point features are: 4. build

Re: Where is a good open source python project to be used as example?

2008-12-16 Thread Andrea Francia
D'Arcy J.M. Cain wrote: On Tue, 16 Dec 2008 19:13:00 GMT Andrea Francia wrote: I'm looking for a python project to use as example to learning python. The project should have these features: 1. is almost fully unit tested 2. use consistently the code convention recommende

Code Review request for the trash-cli project

2009-01-06 Thread Andrea Francia
The trash-cli project is a opensource implementation of the FreeDesktop.org Trash Specification that provides a command line interface to manage the trashcan. It's provide the following commands: * trash-put trashes files and directories. * trash-empty empty the trashcan(s)

Re: Code Review request for the trash-cli project

2009-01-06 Thread Andrea Francia
Dotan Cohen wrote: 2009/1/6 Andrea Francia : The trash-cli project is a opensource implementation of the FreeDesktop.org I don't know about the code, but would there be a reason _not_ to alias rm, rmdir to this program? Actually the trash-put command accept all the options of GNU

When Python should not be used?

2008-10-05 Thread Andrea Francia
The right tool depends on the current problem. While some python users prefer to talk about when Python is the right tool I think that it is more instructive to know when it is not. Please, could you let me know what do you think about that? Thanks -- Andrea Francia http

Did you noticed that Unipath is not more available?

2009-03-29 Thread Andrea Francia
need the source tarball in order to package it in a RPM for Fedora. Do you have a copy of Unipath-0.2.?.tar.gz in your hard drive and you would send it to me? Thanks [1] http://stackoverflow.com/questions/671542/do-you-have-a-copy-of-unipath-0-2-0-tar-gz -- Andrea Francia Re

Making wxPython a standard module?

2008-06-12 Thread Andrea Gavana
o know why some people find it "ugly" or "bad" or whatever. It has its own bugs and missing features, of course, but it is one of the major GUI player in the arena, together with PyQt and PyGTK. Andrea. "Imagination Is The Only Weapon In The War Against Reali

Re: Making wxPython a standard module?

2008-06-12 Thread Andrea Gavana
Hi Ed & All, On Thu, Jun 12, 2008 at 4:11 PM, Ed Leafe wrote: > On Jun 12, 2008, at 10:55 AM, Andrea Gavana wrote: > >>> And on a personal note: I find it *buttugly*. >> >> Do you mind explaining "why" you find it *buttugly*? I am asking just >> out

Re: In lista infinita?

2009-12-09 Thread Andrea Crotti
On 8 Dic, 18:50, Andreas Waldenburger wrote: > Maybe. But I'm sure it.comp.lang.python might help you better. And from > the looks of it, you seem to have started a similar thread there > (called "Generatori infiniti"). > > Generally, you'll fare better with English (even broken English will be >

ANN: GUI2Exe 0.4.0

2009-10-06 Thread Andrea Gavana
rmation === Project home page & downloads: http://code.google.com/p/gui2exe Bleeding edge SVN repository: svn checkout http://gui2exe.googlecode.com/svn/trunk/ gui2exe-read-only Project mailing list: http://groups.google.com/group/gui2exe As usual, feedback is more than welcom

ANN: GUI2Exe 0.5.0

2009-10-16 Thread Andrea Gavana
//code.google.com/p/gui2exe Bleeding edge SVN repository: svn checkout http://gui2exe.googlecode.com/svn/trunk/ gui2exe-read-only Project mailing list: http://groups.google.com/group/gui2exe As usual, feedback is more than welcome. Enjoy! Andrea. "Imagination Is The Only Weapon In The Wa

Tiny4py, a little python wrapper to make shorten urls and QRCodes

2010-12-29 Thread Andrea Stagi
Hi, I would announce you my new python wrapper to make shorten urls and QRCodes, using main used services: goo.gl, bit.ly and tinyurl. Please, visit http://code.google.com/p/tiny4py/ Bests -- http://mail.python.org/mailman/listinfo/python-list

Tiny4py [important update] a little python wrapper to make shorten urls and QRCodes

2011-01-02 Thread Andrea Stagi
Hi, I would announce you my new version of this python wrapper to make shorten urls and QRCodes, using main used services: goo.gl, bit.ly and tinyurl. Please, visit http://code.google.com/p/tiny4py/ Bests -- http://mail.python.org/mailman/listinfo/python-list

Re: difference between python and matlab

2011-01-21 Thread Andrea Ambu
ack and you're familiar with matlab probably you'd get the job done more easily with it. But Thomas is right, it depends a lot on what you really need to do. -- Andrea -- http://mail.python.org/mailman/listinfo/python-list

Fwd: numpy/matlab compatibility

2011-01-25 Thread Andrea Ambu
I replied to Matt only ARGH! -- Forwarded message -- From: Andrea Ambu Date: 25 January 2011 22:36 Subject: Re: numpy/matlab compatibility To: Matt Funk On Tue, Jan 25, 2011 at 9:13 PM, Matt Funk wrote: > > Hi, > > i am fairly new to python. I was wond

Re: Class or Dictionary?

2011-02-11 Thread Andrea Crotti
On Feb 11, 3:56 pm, Martin De Kauwe wrote: > Hi, > > I have a series of parameter values which i need to pass throughout my > code (>100), in C I would use a structure for example. However in > python it is not clear to me if it would be better to use a dictionary > or build a class object? Person

Re: Class or Dictionary?

2011-02-11 Thread Andrea Crotti
Il giorno 11/feb/2011, alle ore 17.01, Martin De Kauwe ha scritto: > > i have a number some are smaller, for example switch/control flags. > But the rest can be quite large. I can split them but I don't see the > advantage particularly. Currently by using them (e.g. > params.rate_of_decomp) it cl

Re: Class or Dictionary?

2011-02-11 Thread Andrea Crotti
Il giorno 11/feb/2011, alle ore 19.47, Ethan Furman ha scritto: > > I strongly disagree. Code readability is one of the most important issues. Perfectly agree with that, but obj.name = x obj.surname = y obj['name'] = x obj['surname'] = y are both quite readable in my opinion. Other things a

Re: Class or Dictionary?

2011-02-12 Thread Andrea Crotti
Il giorno 12/feb/2011, alle ore 00.45, Martin De Kauwe ha scritto: > Hi, > > yes I read a .INI file using ConfigParser, just similar sections (in > my opinion) to make one object which i can then pass to different > classes. E.G. Ok then I suggest configobj, less buggy and much more powerful th

multiprocessing & more

2011-02-13 Thread Andrea Crotti
Hi everyone, I have a few questions about my implementation, which doesn't make me totally happy. Suppose I have a very long process, which during its executiong logs something, and the logs are is in n different files in the same directory. Now in the meanwhile I want to be able to do realtime

Re: multiprocessing & more

2011-02-14 Thread Andrea Crotti
On Feb 14, 12:14 am, Adam Skutt wrote: > On Feb 13, 12:34 pm, Andrea Crotti wrote: > > > > > First of all, does it make sense to use multiprocessing and a short > > value as boolean to check if the simulation is over or not? > > Maybe, but without knowing exactly wh

lint warnings

2011-02-14 Thread Andrea Crotti
blem with using map and other builtin functions? 2. Warning (W): Relative import 'parameters', should be 'othermodule.parameters' if I am in the same directory why should I do a relative import, does it make any difference? I think it's more clear/safe to just import the &

Re: lint warnings

2011-02-15 Thread Andrea Crotti
Il giorno 15/feb/2011, alle ore 04.10, Ben Finney ha scritto: > Andrea Crotti writes: > The ‘map’ builtin is deprecated; using a list comprehension is neater > and more efficient. Ok well it depends, map(int, biglist) is better than: [int(x) for x in biglist] at least for me. Effi

interleave string

2011-02-15 Thread Andrea Crotti
Just a curiosity not a real problem, I want to pass from a string like xxaabbddee to xx:aa:bb:dd:ee so every two characters insert a ":". At the moment I have this ugly inliner interleaved = ':'.join(orig[x:x+2] for x in range(0, len(orig), 2)) but also something like this would work [''

interfacing python with emacs

2011-02-16 Thread Andrea Crotti
n the beginning I'll just evaluate python code and get the output, but eventually I want to be able to call python functions as they were elisp functions, which is the main goal. As soon as there is something working I'll publish it on github, so that anyone interested can help/criticize...

IMAP4_SSL, libgmail, GMail and corporate firewall/proxy

2011-02-16 Thread Andrea Gavana
es\gmail_transport.py", line 145, in do_open return ClientCookie.HTTPSHandler.do_open(self, ProxyHTTPSConnection.new_auth(self.proxy, self.proxy_user, self.proxy_passwd), req) File "C:\Python26\lib\site-packages\mechanize\_urllib2_fork.py", line 1118, in do_open raise URLErr

Re: IMAP4_SSL, libgmail, GMail and corporate firewall/proxy

2011-02-16 Thread Andrea Gavana
turn self.do_open(conn_factory, req) File "C:\Python26\lib\site-packages\gmail_transport.py", line 143, in do_open return ClientCookie.HTTPSHandler.do_open(self, ProxyHTTPSConnection.new_auth(self.proxy, self.proxy_user, self.proxy_passwd), req) File "C:\Python26\lib\site-pac

Re: IMAP4_SSL, libgmail, GMail and corporate firewall/proxy

2011-02-17 Thread Andrea Gavana
Hi Malcolm, On 17 February 2011 11:44, Malcolm Greene wrote: > Andrea, > > What type of result do you get trying port 993 ? Thank you for your answer. I have tried that, with imaplib and libgmail. This is what I get with imaplib: Traceback (most recent call last): File "

2to3

2011-02-17 Thread andrea crotti
What would be an almost automated way to develop for both python 2.x and 3.x? 2to3 apparently can only output a diff or write directly on the file (with -w), but why doesn't it output the resulting file for 3.x instead? So for a single python file I tried a makefile like: Makefile: all: empathy.

Re: 2to3

2011-02-17 Thread andrea crotti
2011/2/17 Chris Rebert > > Actually, so long as you specify a bit more specific versions, e.g.: > > python2.7 empathy.py > python3.1 empathy3.py > > it should be fine on most *nixes. Windows would of course require a > separate, but analogous, batch file or similar. As for porting the > tests the

Re: interfacing python with emacs

2011-02-17 Thread andrea crotti
Not ready yet but the structure of the python and elisp files is more or less there: git://github.com/AndreaCrotti/empathy.git Feel welcome for any comments/hints. About the communication between the processes I think I'll use stdin/out too, since it comes quite natural using emacs sub-processes.

Re: First time using an API...

2011-02-17 Thread andrea crotti
2011/2/17 Matty Sarro > This may be kind of a stupid question, so please be gentle. > I've only ever used most programming in the past when shell scripting > couldn't handle what I needed done. So, I rarely dabble with things > like API's, or even python-isms. I just program to get things done. >

where to import

2011-02-17 Thread andrea crotti
Suppose I have a function which uses a few external libraries, and this function is only called once every 10 executions. Does it make sense to import these libraries for the whole module? import sys def fun(): import x, y, z Something like this is acceptable/good practice in the scenario I

Re: where to import

2011-02-17 Thread andrea crotti
2011/2/17 Chris Rebert > Yes, of course. Importing a module multiple times (as would happen if > fun() is called multiple times) is obviously slower than just > importing it once, although the 2nd and subsequent imports will be > faster as Python will just return another reference to the previous

Re: interfacing python with emacs

2011-02-17 Thread Andrea Crotti
Il giorno 17/feb/2011, alle ore 16.14, andrea crotti ha scritto: > Not ready yet but the structure of the python and elisp files is more or less > there: > git://github.com/AndreaCrotti/empathy.git > > Feel welcome for any comments/hints. > > About the communication be

<    1   2   3   4   5   6   >