lpod-python

2012-08-10 Thread Francesco
while the main site is working. I also tried to install the module with pip (I read on the site that it's now available), but again, no luck. Do somebody know what's happening to download.lpod-project.org ? It doesn't even ping... Please let me know, thank you very much. Franc

Re: A ClientForm Question

2005-04-03 Thread Francesco
something weird, but I do not understand it. And, in the source > containing the form, i found nowhere the Page_ClientValidate() resides. > > What's wrong? > > - > narke Similar problem for me. In the form, i have and i don't know how to click this. urlopen(form.click()) doesn't nothing. UserForm is the name of the form. Francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: If/then style question

2010-12-18 Thread Francesco
Apart from this, the overhead in the first one would amount to one million IF tests, again not a lot these days. I don't think I would rewrite that function, if I found it written in the first way... I don't mean that the fist example is better, just I'm sure you could imagine a

Re: If/then style question

2010-12-21 Thread Francesco
llion tests per cycle. That said, let's make really clear that I would heartily prefer func2 to func1, based both on readability and speed. Thank you for having spent some time playing with me! Francesco On 19/12/2010 1.05, Steven D'Aprano wrote: Well, let's try it with a working (albe

Re: while True or while 1

2010-12-28 Thread Francesco
-1 -1 -1 47.55442856564332 that accounts for a scant 11% overhead, on more than one million tests per cycle. That said, let's make really clear that I would heartily prefer func2 to func1, based both on readability and speed. Thank you for having spent some time playing with me! Francesc

python only prints integers

2011-01-06 Thread francesco
I'm pretty new in Python language. I have a problem with numbers: it seems python doesn't know any more how to count! I get only the down rounded integer 20/8 = 2 8/3=2 I probably changed some option to round the numbers, but I don't remember how. Is there a way to reset the number of digits to def

Re: python only prints integers

2011-01-06 Thread francesco
On 6 Gen, 23:59, Ian wrote: > On Jan 6, 3:49 pm, francesco wrote: > > > I'm pretty new in Python language. I have a problem with numbers: it > > seems python doesn't know any more how to count! > > I get only the down rounded integer > > 20/8 = 2 > &g

EuroPython 2012: Call for Proposal is Open! [Please spread the word]

2012-03-01 Thread Francesco Pallanti
Hi guys, I'm Francesco and I am writing on behalf of EuroPython Staff (www.europython.eu). We are happy to announce that the Call for Proposals is now officially open! DEADLINE FOR PROPOSALS: MARCH 18TH, 23:59:59 CET For those who have never been at EuroPython (or similar conferences) b

Re: Square bracket and dot notations?

2011-06-11 Thread Francesco Bochicchio
On 11 Giu, 11:41, Asen Bozhilov wrote: > Hi all, > I am beginner in Python. What is interesting for me is that Python > interpreter treats in different way dot and square bracket notations. > I am coming from JavaScript where both notations lead prototype chain > lookup. > > In Python it seems squ

Re: Maximize already running tkinter program on invocation

2011-07-27 Thread Francesco Bochicchio
On 27 Lug, 10:18, Steven Kauffmann wrote: > Hi all, > > I have written a small GUI application in python 3.x using the tkinter > module. Program is running fine, but multiple instances of the program > can now be created. I would like to reduce the number of instances of > the program to only 1 in

Re: Is there any python library that parse c++ source code statically

2011-03-13 Thread Francesco Bochicchio
On 13 Mar, 10:14, kuangye wrote: > Hi, all. I need to generate other programming language source code > from C++ source code for a project. To achieve this, the first step is > to "understand" the c++ source code at least in formally. Thus is > there any library to parse the C++ source code static

unittest.Testsuite and execution order

2018-04-18 Thread Francesco Russo
his something that I can rely on for the future? I definitely don't want to rely on the current implementation, unless I see it in the documentation. If it's something that I can't rely on for the future, then I'd rather write my test code in a different way. Regards, Francesco P

Re: unittest.Testsuite and execution order

2018-04-19 Thread Francesco Russo
On 18/04/18 20:26, Chris Angelico wrote: > On Thu, Apr 19, 2018 at 2:51 AM, Francesco Russo > wrote: >> My use case: my SUT is split into modules. Besides writing unit tests for >> each module, I want to write an integration test, and I also need to >> perform some acti

I wrote my very basic mkdocs plugin, hoping that it will inspire you to write your owns

2018-04-23 Thread francesco . maida
I wanted to write mkdocs plugins, so I read the docs (well, at least part of them) and I wrote a very simple, very basic plugin. I called it "Hello dolly", because when I wrote it I was inspired by the (once built-in) WordPress plugin of the same name that teached me the basic of plugin writing

Re: What should a decorator do if an attribute already exists?

2016-05-16 Thread Francesco Loffredo
happens if you want to add another instrument, decorating the target twice? Francesco -- https://mail.python.org/mailman/listinfo/python-list

Re: Arguments for button command via Tkinter?

2005-10-31 Thread Francesco Bochicchio
Il Mon, 31 Oct 2005 06:23:12 -0800, [EMAIL PROTECTED] ha scritto: > And yet the stupidity continues, right after I post this I finnally > find an answer in a google search, It appears the way I seen it is to > create a class for each button and have it call the method within that. > If anyone else

Re: Windows - Need to process quotes in string...

2005-10-31 Thread Francesco Bochicchio
Il Mon, 31 Oct 2005 07:18:31 -0800, Ernesto ha scritto: > I'm trying to use a $ delimeter, but it doesn't seem to work. Here is > the code: > > > launchWithoutConsole("devcon.exe",d'$enable > "@USB\VID_0403&PID_6010&MI_00\7&15E4F68&1&"$) > > I want to send the string parameter: > > enable

Re: Arguments for button command via Tkinter?

2005-11-01 Thread Francesco Bochicchio
Il Mon, 31 Oct 2005 19:23:18 +, Steve Holden ha scritto: > Francesco Bochicchio wrote: >> Il Mon, 31 Oct 2005 06:23:12 -0800, [EMAIL PROTECTED] ha scritto: >> >> >>>And yet the stupidity continues, right after I post this I finnally >>>find an answer i

Re: Newbie Alert: Help me store constants pythonically

2005-11-06 Thread Francesco Bochicchio
Il Sun, 06 Nov 2005 08:33:17 -0800, Brendan ha scritto: > Hi all > > I'm new to Python (and programming in general), and I can't decide what > is the most 'pythonic' way to approach a problem. Your advice would be > appreciated. > > I have a bunch of 'scans', containing the data measured from o

How to list the global functions from a C program

2005-01-14 Thread Francesco Montorsi
e is never reached */ PyObject *str = PyObject_GetAttrString(elem, "func_name"); } } == Everything seems to work but then when scanning the list returned by PyObject_Dir() I never find any callable object wh

Re: How to send broadcast message over network and collect all the IP address?

2005-07-15 Thread Francesco Ciocchetti
uld use an ARP Request to all network address on your network and check who answer. Check out libdnet (http://libdnet.sf.net) for a python module implementing networking funcions. bye Francesco -- http://mail.python.org/mailman/listinfo/python-list

twistedSnmp and hexadecimal values ...

2005-03-30 Thread Francesco Ciocchetti
Hi all ml. I'm tryng to use TwistedSnmp to make query and walk directly inside my python code. The problem i'm facing is that any time there is an hexadecimal value to be returned by the snmpwalk it is returened in a weird and useless way... does anyone had any (successfull) experience with twist

Re: Python declarative

2014-01-17 Thread Francesco Bochicchio
Some time ago I played with Tkinter trying a more declarative way of coding the GUI building part and I come out with this: top = Tk( 'top' ).add ( Frame( 'frame' ).add ( Pack( side = 'top' ), Frame ( 'panel1' ).add ( Pack( s

Re: Python declarative

2014-01-19 Thread Francesco Bochicchio
Looking at my own code after four years, I just realized that most of parentheses can be avoided by redefining the += operators to be a synonym of the add method. Go figure, I guess that with age it _does_ come a little wisdom ... :-) Ciao - FB -- https://mail.python.org/mailman/listinfo/p

Re: I love the decorator in Python!!!

2011-12-09 Thread Francesco Bochicchio
On 8 Dic, 12:22, K.-Michael Aye wrote: > On 2011-12-08 08:59:26 +, Thomas Rachel said: > > > > > Am 08.12.2011 08:18 schrieb 8 Dihedral: > >> I use the @ decorator to behave exactly like a c macro that > >> does have fewer side effects. > > >> I am wondering is there other interesting meth

Deleted System default Python on Leopard

2012-01-16 Thread Francesco Zhu
lem report system of Apple it gives me these errors: http://bpaste.net/show/21904/ While this is the Console: http://bpaste.net/show/21905/ What problem can it be? Can I clean up all the Pythons and restore the system one? Thanks everyone. Regards, Francesco Zhu

Re: MySQLdb and dictcursor

2006-07-24 Thread Francesco Panico
On 7/24/06, Christoph Haas <[EMAIL PROTECTED]> wrote: On Monday 24 July 2006 14:06, borris wrote:> doesn anyone know a good reference, tute or examples of> MySQLdb's dictCursor> I want to pass dictionaries into the sql exec statements.> I could only succeed with text as values A german linux magazi

overriding setting

2007-06-06 Thread Francesco Guerrieri
d (this is what I have done for the time being, but I found this solution less appealing and nice ...) thanks in advance, Francesco -- "Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of fate. This visage, no mere veneer of v

Re: overriding setting

2007-06-06 Thread Francesco Guerrieri
On 6/6/07, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, Francesco > Guerrieri wrote: > > > Now the question is this: > > I would like to initialize such an object in this way: > > a = myList() > > a = [[1, 2,

Re: Select one of 2 functions with the same name ?

2007-06-10 Thread Francesco Guerrieri
If the functions are f1, f2, f3 you could go this way: def SimulationRun(): if simulation_level = 1: SimulationFunction = f1 else if simulation_level = 2: SimulationFunction = f2 else and in the rest of the code you can refer to SimulationFunction instead of explicitly calling

Re: with as a reserved word

2007-06-11 Thread Francesco Guerrieri
Within gnuplot you can shorten "with" to "w", don't know if it can work inside a call to Gnuplot.Data() francesco On 6/11/07, BBands <[EMAIL PROTECTED]> wrote: > I gather that 'with' is on its way to becoming a reserved word. Is > this som

Re: Method much slower than function?

2007-06-14 Thread Francesco Guerrieri
ython 2.5 under win xp) the results are: >>> print timeit.Timer("f2()", "from __main__ import f2").repeat(number = 1) [0.19726834822823575, 0.19324697456408974, 0.19474492594212861] >>> print timeit.Timer("f1()", "from __main__ import f1").rep

Re: "Variable variable name" or "variable lvalue"

2007-08-15 Thread Francesco Guerrieri
aterial" + str(counter)] = Material(12.5) But if you need the variables only for calling Slab, you could write something like: material_number = 3 material_list = [Material(12.5) for x in xrange(0, counter)] Period = Slab(sum(material_list)) bye, francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: Joining elements in a list to 1 element

2007-08-23 Thread Francesco Guerrieri
ed string to your new list. For instance my_list = ["a", "b", "c"] my_second_list = [] my_second_list.append("".join(my_list)) bye, Francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: Joining elements in a list to 1 element

2007-08-23 Thread Francesco Guerrieri
append("".join(my_list)) except TypeError: my_second_list.append("".join(str(item) for item in my_list) ) But it depends on the the actual requirements, maybe it isn't meaningful for the original list to contain numbers (think for instance of nucleotide sequences...?) Francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: How to free memory ( ie garbage collect) at run time with Python 2.5.1(windows)

2007-08-28 Thread Francesco Guerrieri
e, only integer up to 256 are cached... I made two dictionaries with mapping from i to id(i) and then compared. They were equal up to 256. In short, try your example with 256 and 257 and see what happens :-) francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: XML File -- dictionary edit/search

2007-08-28 Thread Francesco Guerrieri
to handle yaml files. > > import yaml > worddefs = yaml.load( open( "word-def.yaml", "r" ).read() ) > print worddefs > I agree with the suggestion for yaml! Since definitions are to be inputed by the users, it could be better to use yaml.safe_loa

Re: pure python for sms

2007-08-31 Thread Francesco Guerrieri
r you will have to pass your sms through some cellular system network whose services someone has to pay for...no? Francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: list index()

2007-09-02 Thread Francesco Guerrieri
7;s definitely better (if one is decided not to use sets) to use dictionaries :-) bye francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: So what exactly is a complex number?

2007-09-03 Thread Francesco Guerrieri
e not the most recommendable way to introduce the concept of vector, or of complex variables :-) francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: concise code (beginner)

2007-09-05 Thread Francesco Guerrieri
for dev in devs: try: call the methods on dev (instead of explicitly elencating all of them there could and should be other solutions more mantainable) except: flag dev as unusable Modifying the sequence you are iterating over can be tricky. francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: Looping through File Question

2007-09-05 Thread Francesco Guerrieri
statement to initiate a loop though the > records: > > for line in f.readlines(): > > How do I start this at row 2? > you can simply call (and maybe throw away) f.readline() a single time before looping. If the lenght of the first line is fixed, you can also use f.seek to sta

Re: PythonAlley.com

2007-09-05 Thread Francesco Guerrieri
7; times surely there were many more place better than this one. francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: concise code (beginner)

2007-09-05 Thread Francesco Guerrieri
". Instead I prefer to flag or otherwise to store them in some place from where they could get back. Obviously, it depends on the details of the program :) francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: concise code (beginner)

2007-09-10 Thread Francesco Guerrieri
hat top posting is annoying. francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: less obvious "super"

2007-09-10 Thread Francesco Guerrieri
You don't need to use super in this case. You just have to remember to explicitly initialize the classes you are deriving from. In this case, class B(A): def __init__(self, something): A.__init__(self) self.y = something bye, francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: less obvious "super"

2007-09-10 Thread Francesco Guerrieri
o use the new-style (always derive from object). See http://www.python.org/doc/newstyle.html for further reading francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: Wait For Application Start

2007-09-18 Thread Francesco Guerrieri
I'm not sure why how you could avoid a conditional loop. Could something like this work? import os.path import time while True: if os.path.exists(YOUR_FILE): break time.sleep(30) francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question

2007-09-18 Thread Francesco Guerrieri
eresting section on Strings: http://docs.python.org/tut/node5.html#SECTION00512 and http://docs.python.org/lib/string-methods.html Francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: Wait For Application Start

2007-09-18 Thread Francesco Guerrieri
s(YOUR_FILE): > time.sleep(1) I thought of that, but I found more readable the positive form :-) francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: Sets in Python

2007-09-19 Thread Francesco Guerrieri
of the set composed by 1, 2 and 3" and thus order would not be important. francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: How to know the starting point

2007-09-19 Thread Francesco Guerrieri
python application. Keep in mind that many python modules are intended to be imported by other modules and not to be used as standalone applications, but rather as libraries. As such, they don't have a starting point, and the if __name__ == '__main__': test could be used for insta

Re: Find the ID, but how to select/copy the whole string by ID?

2007-09-19 Thread Francesco Guerrieri
s a valid index to refer to a character in a string (actually it refers to the last character of the string), so be careful with interpreting the results of the find method. francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: Find the ID, but how to select/copy the whole string by ID?

2007-09-19 Thread Francesco Guerrieri
etter way to iterate over a file than else... but since I've been confusing it probably would have been better to avoid. francesco -- http://mail.python.org/mailman/listinfo/python-list

Mysqldb & stderr

2007-09-27 Thread mastro . francesco
developing a daemon (using python 2.4 and mysqldb 1.2.1_p2) we notes that mysqldb class write on stderr some warnings and error asyncronously (uhmmm it's good written? ;P ). If stderr is closed these function raise up an I/O error (obviously). We spent a lot of time to understand for now we red

Re: Python 3.0 migration plans?

2007-09-28 Thread Francesco Guerrieri
annis/fc++/ or http://www.boost.org/libs/mpl/doc/tutorial/higher-order.html francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.0 migration plans?

2007-09-29 Thread Francesco Guerrieri
ll say about those examples is that they make Python decorators look > sweet! That is exactly one of the points in having decorators, as far as I can tell. Namely, that higher order functions are easily implemented, if and when needed. Francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: s.split() on multiple separators

2007-09-30 Thread Francesco Guerrieri
h contains several ways to solve the problem. You could both translate all your separators to a single one, and then split over it, or (maybe the simpler solution) going for the list comprehension solution. francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: s.split() on multiple separators

2007-09-30 Thread Francesco Guerrieri
h contains several ways to solve the problem. You could both translate all your separators to a single one, and then split over it, or (maybe the simpler solution) going for the list comprehension solution. francesco -- http://mail.python.org/mailman/listinfo/python-list

finding out the call (and not only the caller)

2007-10-07 Thread Francesco Guerrieri
code: code = compile('g(a.data)', 'test', 'single') dis.dis(code) and this is the result 0 LOAD_NAME0 (g) 3 LOAD_NAME1 (a) 6 LOAD_ATTR2 (data) 9 CALL_FUNCTION 1 12 PRINT_EXPR 13 LOAD_CONST

Re: Finding Peoples' Names in Files

2007-10-11 Thread Francesco Guerrieri
On 10/11/07, brad <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On Oct 11, 5:22 pm, brad <[EMAIL PROTECTED]> wrote: > >> Crazy question, but has anyone attempted this or seen Python code that > >> does? For example, if a text file contained 'Guido' and or 'Robert' and > >> or 'Susan', t

Re: Newbi Q: Recursively reverse lists but NOT strings?

2007-10-15 Thread Francesco Guerrieri
On 10/15/07, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > >>> ''.join(reversed("abc")) > 'cba' > >>> list(reversed(range(3))) > [2, 1, 0] > > It doesn't take much to make a more user-friendly version: > > > def myreversed(sequence): > if isinstance(sequence, basestring): > return type(s

Re: Newbi Q: Recursively reverse lists but NOT strings?

2007-10-15 Thread Francesco Guerrieri
On 10/15/07, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Mon, 15 Oct 2007 14:47:30 +0200, Francesco Guerrieri wrote: > > >> def myreversed(sequence): > >> if isinstance(sequence, basestring): > >> return type(sequence)().join(reversed(s

Re: easy but difficult

2007-10-16 Thread Francesco Guerrieri
] in line > print line > > I tried but i donot know how to create 1#2#3 in a single line > regards This certainly seems to be a homework assignment :) You could try if dictionaries or their variants. There is an example very similar example to the tas

Re: while statements

2007-10-16 Thread Francesco Guerrieri
On 10/16/07, danfolkes <[EMAIL PROTECTED]> wrote: > Instead of: if(cal<=0) > > you could do : > cal=0 > while cal<=0: > cal = int(raw_input("Please enter the number of calories in your > food: ")) > > that would make sure that your input is

Re: calling a function from string

2007-10-22 Thread Francesco Guerrieri
ing, too my_function = getattr(module_name, function_name) # this is the function object, # equivalent to my_function = time.time my_function() # This is the function call, equivalent to time.time() bye francesco -- http://mail.python.org/mailman/listinfo/python-list

Recursive insertion of a line

2007-11-19 Thread Francesco Pietra
3.835 26.423 1.00 0.00 W20 H ATOM 27402 H2 WAT 4178 21.173 4.237 26.554 1.00 0.00 W20 H TER Thanks francesco pietra Get easy, one-click access to your favorites. Make Yahoo!

Re: Recursive insertion of a line

2007-11-20 Thread Francesco Pietra
Please, see below. --- Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Mon, 19 Nov 2007 21:15:16 -0300, Henry <[EMAIL PROTECTED]> > escribió: > > > On 19/11/2007, Francesco Pietra <[EMAIL PROTECTED]> wrote: > >> > >> How to insert "

Re: Recursive insertion of a line

2007-11-21 Thread Francesco Pietra
--- Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Tue, 20 Nov 2007 01:16:53 -0800 (PST), Francesco Pietra > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > > > > Now, "file .out" had "TER" inserted where I wan

Science list

2007-11-29 Thread Francesco Pietra
resent list they are not. Thanks francesco pietra Get easy, one-click access to your favorites. Make Yahoo! your homepage. http://www.yahoo.com/r/hs -- http://mail.python.org/mailman/listinfo/python-list

Re: Science list

2007-11-29 Thread Francesco Pietra
I was trying to suggest a more specific mail-list in order not to be floaded. I am the opinion that python-list@python.org is very informative and useful, though it is hard to find the time for so many mails. f. --- Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: > Francesco Pie

Re: Science list

2007-11-29 Thread Francesco Pietra
ts. f. --- nmp <[EMAIL PROTECTED]> wrote: > Bjoern Schliessmann wrote: > > > Francesco Pietra wrote: > >> Nonetheless, this extremely useful list is so crowded that if checking > >> email is not carried out every few hours, it is difficult to detect > >>

Re: reading raw variables from file

2007-11-30 Thread Francesco Guerrieri
s there an easy way of doing this instead of > parsing the files and checking said types? A much safer approach would be to use Yaml, which provides safely and easily the requested feature Give a look at: http://pyyaml.org/ bye, francesco -- http://mail.python.org/mailman/listinfo/python-list

Donloadin mail on the background

2007-11-30 Thread Francesco Pietra
. That I found easy with web-based email. I do not maintain locally on any machine any mail for longer than working on. I am sure you have, or can devise, a better strategy to the same purpose. I am not an expert in software. Regards francesco pietra

Re: "Python" is not a good name, should rename to "Athon"

2007-12-03 Thread Francesco Guerrieri
On Dec 3, 2007 4:40 PM, Russ P. <[EMAIL PROTECTED]> wrote: > As I said before, a name is > just a name. It might as well be called "cockroach" as far as I am > concerned. Unluckily "the Beatles" was already taken :-) francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: Questions about subclassing an int

2008-01-05 Thread Francesco Guerrieri
avoid shadowing builtin names, like str in the above example. Bye, Francesco -- http://mail.python.org/mailman/listinfo/python-list

Delete lines containing a specific word

2008-01-06 Thread Francesco Pietra
beginning with # as comment lines, please also a script to comment lines containing a specific word, or words, and back, to remove #. Thanks francesco pietra Looking for last minute shopping deals? Find

Fwd: Delete lines containing a specific word

2008-01-06 Thread Francesco Pietra
econd script would be useful where the line that follow the block are renumbered, e.g, line "HETATM 7010" following the above block renumbered "HEATM 7006". thanks francesco --- Francesco Pietra <[EMAIL PROTECTED]> wrote: > Date: Sun, 6 Jan 2008 09:21:33 -0800 (PST

Re: Delete lines containing a specific word

2008-01-06 Thread Francesco Pietra
--- Martin Marcher <[EMAIL PROTECTED]> wrote: > On Sunday 06 January 2008 18:21 Francesco Pietra wrote: > > > Please, how to adapt the following script (to delete blank lines) to > > delete lines containing a specific word, or words? > > > > f=open(

Re: Delete lines containing a specific word

2008-01-06 Thread Francesco Pietra
Steven: Thanks. See below please (of very marginal interest) --- Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Sun, 06 Jan 2008 09:21:33 -0800, Francesco Pietra wrote: > > > Please, how to adapt the following script (to delete blank lines) to > > delete lines c

Re: Basic inheritance question

2008-01-06 Thread Francesco Guerrieri
s calls with super, your classes will fit smoothly even in complicated inheritance structures. There are no ill effects whatsoever if the inheritance structure instead turns out to be simple, as long, of course, as you're only using the new-style object model, as I recommend". bye, Fr

Re: Delete lines containing a specific word

2008-01-06 Thread Francesco Pietra
--- Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Sun, 06 Jan 2008 13:33:52 -0800, Francesco Pietra wrote: > > > Steven: > > Thanks. See below please (of very marginal interest) > > > > --- Steven D'Aprano <[EMAIL PROTECTED]> wrote: >

Re: Delete lines containing a specific word

2008-01-06 Thread Francesco Pietra
te copy of the original. Think that I'll never carry out a computation (that may last weeks) without a raid 1 system. Not to mention certain commercial OS that are carefully avoided for calculations (in my office for everything), also because they need to emulate unix to do that. cheers fr

Strip lines from files

2008-01-08 Thread Francesco Pietra
. grep -v WAT trp.pdb.n Unless you can think better to remove that pervasive molecule of water, to avoid performing the calculation ex novo. Thanks francesco pietra Be a better frien

Re: Paid subscription Python magazines

2008-01-08 Thread Francesco Guerrieri
On Jan 8, 2008 11:17 AM, Jon Harrop <[EMAIL PROTECTED]> wrote: > > Are there any Python magazines that you can pay to subscribe to? (either > paper or on-line). > Python Magazine comes to mind www.pythonmagazine.com I am subscribed and find it very good. Francesco -- http

Re: copy a numpy array

2008-01-08 Thread Francesco Guerrieri
:arrsize]=srcarray[0:arrsize] > > i don't know if this is the right way to do the copying. > is there a better(efficient?) way ? > jim If you want the array to share the data, just use destarray = numpy.array(srcarray) Otherwise you can set the copy flag to False:

Re: copy a numpy array

2008-01-09 Thread Francesco Guerrieri
y understanding is right > jim You're right, I wrote too quickly and so I gave a wront information! sorry! :-) Just try the following: Apart from the copy method (which other have correctly pointed to), the correct version is simply: a = numpy.array([1,2]) b = numpy.array(a) and now try

Re: Analyzing Python GC output - what is a "cell", and what information is available about it.

2008-01-11 Thread Francesco Guerrieri
On Jan 11, 2008 6:20 PM, John Nagle <[EMAIL PROTECTED]> wrote: > Tried: > print item.dir() > got: > 'cell' object has no attribute 'dir' I don't know nothing about cell objects... but why don't you try dir(item) instead? Franc

Re: csv add lines

2008-01-14 Thread Francesco Guerrieri
new lines which are stored in a *.csv > file? Maybe you are still not able to do it :-) But if you give a look at the csv module you probably will be in a short time. Just read http://docs.python.org/lib/module-csv.html where you will learn how to parse a csv file. bye, Francesco -- http:

Re: Tkinter. Why the Need for a Frame, or no Frame?

2008-02-17 Thread Francesco Bochicchio
On Sat, 16 Feb 2008 19:40:51 -0800, W. Watson wrote: > from Tkinter import * > > class App: > def __init__(self, master): > fm = Frame(master) > Button(fm, text='Left').pack(side=LEFT) > Button(fm, text='This is the Center button').pack(side=LEFT) > Button

Re: Pyparsing help

2008-03-24 Thread Francesco Bochicchio
Il Sat, 22 Mar 2008 14:11:16 -0700, rh0dium ha scritto: > Hi all, > > I am struggling with parsing the following data: > > test1 = """ > Technology { > name= "gtc" dielectric >= 2.75e-05 unitTimeName

python library to manipulate PALM documents ?

2008-03-24 Thread Francesco Bochicchio
Hi all, anybody knows a python equivalent of the perl PALM::Doc module (and eventually other PALM::). I have a e-book device wich reads mobi-pocket format (among others). I have downloaded from a forum a set of perl scripts to convert HTML to unencripted mobipocket format and vice-versa. It use

Re: Disable resize button

2008-03-24 Thread Francesco Bochicchio
Il Mon, 24 Mar 2008 04:38:50 -0700, myonov ha scritto: > Hi! > > I need to disable resize button in Tkinter. I inherit the Frame class. > Then in the constructor i make my buttons, labels, etc. Then I pack them > and when move borders of the frame everything changes it's location and > it looks r

Re: python library to manipulate PALM documents ?

2008-03-24 Thread Francesco Bochicchio
Il Mon, 24 Mar 2008 12:08:59 -0300, Guilherme Polo ha scritto: > 24 Mar 2008 13:36:13 GMT, Francesco Bochicchio <[EMAIL PROTECTED]>: >> Hi all, >> >> anybody knows a python equivalent of the perl PALM::Doc module (and >> eventually other PALM::). >> >

Re: Shortcutting the function call stack

2008-03-25 Thread Francesco Bochicchio
Il Mon, 24 Mar 2008 15:05:38 -0700, Julien ha scritto: ... > > I'll try to explain a bit more what I'm after, and hopefully that will > be clearer. In fact, what I'm trying to do is to "hijack" (I'm making up > the term) a function: > > def hijacker(arg): > if I_feel_its_necessary: >

Re: Python 2.2.1 and select()

2008-03-25 Thread Francesco Bochicchio
Il Mon, 24 Mar 2008 17:58:42 -0400, Derek Martin ha scritto: > Hi kids! > > I've got some code that uses select.select() to capture all the output > of a subprocess (both stdout and stderr, see below). This code works as > expected on a variety of Fedora systems running Python > 2.4.0, but on a

Re: Implementing file reading in C/Python

2009-01-10 Thread Francesco Bochicchio
On Fri, 09 Jan 2009 15:34:17 +, MRAB wrote: > Marc 'BlackJack' Rintsch wrote: >> On Fri, 09 Jan 2009 04:04:41 +0100, Johannes Bauer wrote: >> >>> As this was horribly slow (20 Minutes for a 2GB file) I coded the whole >>> thing in C also: >> >> Yours took ~37 minutes for 2 GiB here. This "j

Re: pep 8 constants

2009-01-18 Thread Francesco Bochicchio
On Wed, 14 Jan 2009 08:13:30 +, Steven D'Aprano wrote: > > Absolutely. It's rather sad that I can do this: > > import math > math.pi = 3.0 > > I like the ability to shoot myself in the foot, thank you very much, but > I should at least get a warning when I'm about to do so: > > math.PI =

Re: file write collision consideration

2009-01-20 Thread Francesco Bochicchio
On Tue, 20 Jan 2009 11:08:46 -0500, D'Arcy J.M. Cain wrote: > On Tue, 20 Jan 2009 10:57:52 -0500 > RGK wrote: >> I have a thread that is off reading things some of which will get >> written into a file while another UI thread manages input from a user. >> >> The reader-thread and the UI-thread

New filters? was: Re: Bitwise 2009 ($5000 prize money)

2009-02-03 Thread Francesco Guerrieri
receive from clpy has greatly reduced in the last month or so. So it seems that the spam filters are doing a great job. Thanks are due to the people managing them :-) Francesco -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >