Re: python equivalent of php implode

2005-04-27 Thread Maxim Kasimov
i'm tying to run example, and then get a traceback. am i something missed? mysql> create table tmp_tmp (id int not null auto_increment primary key, sd varchar(255) not null default '', si int not null default 1); >>> import MySQLdb >>> db = MySQLdb.connect("localhost", "login", "password", "

Re: python equivalent of php implode

2005-04-27 Thread Maksim Kasimov
... but not in the case when integers are in a dictionary (please, try to execute your example by yourself first) "Ola Natvig" <[EMAIL PROTECTED]> wrote: news:[EMAIL PROTECTED] > Maksim Kasimov wrote: > > > > in php-scripts, to insert data to database, i'm doing like this: > > > > ... > > $

about Frame.__init__(self)

2005-04-27 Thread yang
I just a newbie of python Now I found that almost every program use Tkinter have this line class xxx(xxx): """x""" def __init__(self): """x""" Frame.__init__(self) . ... the line "Frame.__init__(self)" puzzle me. why use it lik

Re: Python or PHP?

2005-04-27 Thread John Bokma
Mike Meyer wrote: > John Bokma <[EMAIL PROTECTED]> writes: > >> Mike Meyer wrote: >> >>> John Bokma <[EMAIL PROTECTED]> writes: You already showed code like: >>> Actually, I never showed you this code. >> hence *like*, and yes you did, in a footnote. > > Yes, but *I* didn't say like, becaus

Re: about Frame.__init__(self)

2005-04-27 Thread M.E.Farmer
Hello , I am no expert on tkinter but this seems like an inheritance question. When you define a class that inherits from something ( Frame ) and you define an __init__ in your class you have to explicitly call the __init__ of your base class. class xxx(base): """ This class doesn't have an __

Re: python equivalent of php implode

2005-04-27 Thread Peter Otten
Maxim Kasimov wrote: > i'm tying to run example, and then get a traceback. am i something missed? > > mysql> create table tmp_tmp (id int not null auto_increment primary key, > sd varchar(255) not null default '', si int not null default 1); > import MySQLdb db = MySQLdb.connect("local

Re: python equivalent of php implode

2005-04-27 Thread Maksim Kasimov
done. thanks Try another paramstyle (see http://python.org/peps/pep-0249.html), e. g. ",".join(["%s"] * len(keys)) ... instead of ",".join(["?"] * len(keys)) ... Peter -- Best regards, Maksim Kasimov mailto: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: (PHP or Python) Developing something like www.tribe.net

2005-04-27 Thread Mir Nazim
Thanks fro ur advice. I was also thinking to look into quixote. but wanted a second opinion. thanks again. -- http://mail.python.org/mailman/listinfo/python-list

about Frame.__init__(self)

2005-04-27 Thread yang
I just a newbie of python Now I found that almost every program use Tkinter have this line class xxx(xxx): """x""" def __init__(self): """x""" Frame.__init__(self) . ... the line "Frame.__init__(self)" puzzle me. why use it lik

Re: Semi-newbie, rolling my own __deepcopy__

2005-04-27 Thread [EMAIL PROTECTED]
Michael Spencer wrote: > It appears that if you want to deepcopy an object that may contain arrays, > you're going to have to 'roll your own' deep copier. Something like this > would do it: [method deleted] Whew! Michael, that was way more than I bargained for. New issues for me: the "**" nota

Re: (PHP or Python) Developing something like www.tribe.net

2005-04-27 Thread Michele Simionato
I would also look at CherryPy, the new 2.0 version seems pretty interesting (I have not tried it, but I have seen a short presentation at the ACCU conference, and it looks really trivial to use). -- http://mail.python.org/mailman/listinfo/python-list

How do I access variable declared in one script in another python script

2005-04-27 Thread ramyamvk
Hi All, Please could anyone tell me how to do this : I have one expect script, where i store some value in a variable. I am calling this script from my python script, and need to use this variable in the python script. How do i access this variable from my python script ? Thanks, ramya

Re: Howto debug c++ (SWIG) extension under Windows

2005-04-27 Thread Alexander Eisenhuth
Miki Tebeka schrieb: Hello Alexander, I can't figure out howto debug my c++ extension. If i compile it as release version, I've of course no chance to set a breakpoint. This is not true. You *can* set breakpoints in release mode, make sure to add debug information to your release build so you'll b

names of methods, exported functions

2005-04-27 Thread Mayer
Hello: Is there a way to see at the python prompt the names of all the public methods of a class or the names exported by a module? I know that GUI-based IDEs have a nifty way of displaying these in the form of a drop-down list, but I'm looking for some function or method that will simply return a

Secure FTP

2005-04-27 Thread Daniel Bowett
I need to download files over a secure channel. I have been looking into Paramiko which seems to have the functonality I need. The problem is I need a FTP server which supports key based encryption to install on my windows server. Has anyone succeeded in doing this? If so - what FTP server did y

Re: Getting the sender widget's name in function (Tkinter)

2005-04-27 Thread Eric Brunel
On 26 Apr 2005 13:37:29 -0700, infidel <[EMAIL PROTECTED]> wrote: from Tkinter import Tk, Button def say_hello(event): print 'hello!' print event.widget['text'] root = Tk() button1 = Button(root, text='Button 1') button1.bind('', say_hello) button1.pack() button2 = Button(root, text='Button

Re: Can .py be complied?

2005-04-27 Thread monkey
Thanks all of you guys, I found that python newsgroup is of wealthy knowledge: > If you would like to obfuscate your code (disguise it) without an > executable you can try pyobfuscate as well. > > Harlin Seritt > Yes, I want more options. Since the python doc mentioned py2exe only, and it is diff

Re: tkinter text width

2005-04-27 Thread Eric Brunel
On Tue, 26 Apr 2005 17:01:46 -0700, James Stroud <[EMAIL PROTECTED]> wrote: Hello All, I would like for a tkinter text widget to be aware of how big the frame that contains it is, then I would like for it to reset its width to the appropriate number of characters when this frame changes size. Errr.

Re: regex over files

2005-04-27 Thread Robin Becker
Jeremy Bowers wrote: On Tue, 26 Apr 2005 20:54:53 +, Robin Becker wrote: Skip Montanaro wrote: ... If I mmap() a file, it's not slurped into main memory immediately, though as you pointed out, it's charged to my process's virtual memory. As I access bits of the file's contents, it will page i

Re: PDF Printing support from Python

2005-04-27 Thread Piet van Oostrum
> "Diez B. Roggisch" <[EMAIL PROTECTED]> (DBR) wrote: >>> You're use of the word "driver" is one with which I'm not >>> familiar. But I don't really "do windows" so it's probably a >>> Widnowism. >DBR> It could be that he means that creating PDFs on windows is done using >DBR> a fake printer

Re: names of methods, exported functions

2005-04-27 Thread Michael Hoffman
Mayer wrote: Is there a way to see at the python prompt the names of all the public methods of a class or the names exported by a module? I know that GUI-based IDEs have a nifty way of displaying these in the form of a drop-down list, but I'm looking for some function or method that will simply ret

Re: names of methods, exported functions

2005-04-27 Thread Ville Vainio
> "Mayer" == Mayer <[EMAIL PROTECTED]> writes: Mayer> Hello: Mayer> Is there a way to see at the python prompt the names of all Mayer> the public methods of a class or the names exported by a Mayer> module? I know that If you use ipython, you can press after the period, e.g

Re: Coding Standards (and Best Practices)

2005-04-27 Thread Sylvain Thenault
On Tue, 26 Apr 2005 11:02:33 -0700, Trent Mick wrote: > [Isaac Rodriguez wrote] >> Hi, >> >> I am fairily new to Python, but I am really liking what I am seeing. My team >> is going to re-design some automation projects, and we were going to use >> Python as our programming language. One of the

Doubt regarding python Compilation

2005-04-27 Thread praba kar
Dear all, I have doubt regarding python Compilation. I want to know whether Python is compiler language or interpreted language. If Python is interpreter language why compilation is there. with regards Yahoo! Indi

how to connect my sql with Python

2005-04-27 Thread praba kar
Dear All, I am doing Python-cgi Project in my company. To connect My sql database(Mysql 4.1.11.) into Python(2.3.3) cgi. I have installed MySQL-python-1.2.0. After installation of MySQL-Python-1.2.0 I try import MySQLdb module. It raised the following error >>import MySQLdb Traceback (m

Re: Can .py be complied?

2005-04-27 Thread Filip Dreger
U¿ytkownik "monkey" <[EMAIL PROTECTED]> napisa³ w wiadomo¶ci news:[EMAIL PROTECTED] > If using Jython to complie, is the end-user need JRE instead of > Python > installed, or need both of them? Only JRE. Just like Java. >> I don't know the exact details, but try using the compiled Python >> s

Re: Doubt regarding python Compilation

2005-04-27 Thread Fredrik Lundh
"praba kar" <[EMAIL PROTECTED]> wrote: > I have doubt regarding python Compilation. you sure have a lot of doubts. > I want to know whether Python is compiler language > or interpreted language. If Python is interpreter > language why compilation is there. the CPython implementation of P

Re: Python licence again

2005-04-27 Thread Christos Georgiou
On Tue, 26 Apr 2005 23:26:41 +1000, you wrote: [snip] >>>Yup, pesky furriners, can't spell 'Merican prop'ly like God intended; >>>they shouldn't be allowed on the net, sheriff should run 'em right out >>>o' the county ... >> >>Sheriff is not available, for further info pls ask for R. Marley. >I

Re: bytecode non-backcompatibility

2005-04-27 Thread Maurice LING
Martin v. Löwis wrote: Maurice LING wrote: technicalities are wrong but situation remains unchanged. For C modules, it is very likely that new versions of Python will continue to break the ABI, by changing the layout of structures. The most straight-forward way to deal with it as a sysadmin or use

Re: Can .py be complied?

2005-04-27 Thread Kent Johnson
monkey wrote: It is generally not very easy or straight-forward. For now, you can use pyfreeze to snap the application. If your application does not use any C modules, you can try to use Jython instead. Cheers Maurice If using Jython to complie, is the end-user need JRE instead of Python insta

Re: how to connect my sql with Python

2005-04-27 Thread Fredrik Lundh
"praba kar" <[EMAIL PROTECTED]> wrote: > I am doing Python-cgi Project in my company. > To connect My sql database(Mysql 4.1.11.) into > Python(2.3.3) cgi. I have installed > MySQL-python-1.2.0. After installation of > MySQL-Python-1.2.0 I try import > MySQLdb module. It raised the followi

Re: Howto debug c++ (SWIG) extension under Windows

2005-04-27 Thread Miki Tebeka
Hello Alexander, > >>I can't figure out howto debug my c++ extension. If i compile it as > >>release version, I've of course no chance to set a breakpoint. > >This is not true. You *can* set breakpoints in release mode, make sure to > >add debug information to your release build so you'll be able

Re: PyGTK vs. wxPython

2005-04-27 Thread dcrespo
And what did you use for deploying either PyGTK and wxPython? In other words, what were your workspace and logic of the development? Thanks Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: PyGTK vs. wxPython

2005-04-27 Thread dcrespo
Aaand: which do you prefer? Daniel -- http://mail.python.org/mailman/listinfo/python-list

suggestions on how to do this

2005-04-27 Thread chris
The problem I have is as follows: I have a recursive function b(k) b(k) = -(A/k**2)*(b(k-2) - b(k-5)) k<0, b(k)=0 k=0, b(k)=1 k=1, b(k)=0 eg. b(2) = -A/4 b(3) = 0 b(4) = A**2/64 note that as k increases b(k) can itself be a sum of terms in powers of A rather than a single power of A

Re: Python, Perl & PDF files

2005-04-27 Thread paron
Hopefully, Adobe will choose to support SVG as a response to Microsoft's "Metro", and take us all off the hook with respect to cracking open their proprietary format. -- http://mail.python.org/mailman/listinfo/python-list

How can i solve this problem with py2exe ?

2005-04-27 Thread Glauco Silva
Hi, I´m with problem to create a executable program in python. I´m using py2exe but i don´t know if it´s right. When i run in prompt "python setup.py py2exe", appear in the end this:   ### The following modules appear to be missing[ '_imaging_gif','libVTKCommonPython', 'libVTKCon

Re: kdialog and unicode

2005-04-27 Thread John Machin
On 26 Apr 2005 19:16:25 -0700, [EMAIL PROTECTED] wrote: > >John Machin wrote: >> On 26 Apr 2005 13:39:26 -0700, [EMAIL PROTECTED] (dumbkiwi) wrote: >> >> >Peter Otten <[EMAIL PROTECTED]> wrote in message >news:<[EMAIL PROTECTED]>... >> >> Dumbkiwi wrote: >> >> >> >> >> Just encode the data in the

Re: Can .py be complied?

2005-04-27 Thread Lucas Raab
[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I don't know the exact details, but try using the compiled Python scripts (bytecode). I believe they are semi-optimized and platform independent. They are the .pyc and .pyo files generated when the script is run. Okay, I found this documentation

Re: Can .py be complied?

2005-04-27 Thread Maksim Kasimov
"Maurice LING" <[EMAIL PROTECTED]> wrote: news:[EMAIL PROTECTED] > If your application does not use any C modules, you can try to use > Jython instead. Program in python but use jythonc to convert it into > Java source files and package it into Java JAR files, then you will only > need to release

"mysql.h: No such file or directory" when building MySQL-python

2005-04-27 Thread francescomoi
Hi. I'm trying to build 'MySQL-python-1.2.0' on my Linux FC2: -- [ ]# export PATH=$PATH:/usr/local/mysql/bin/ [ ]# export mysqlclient=mysqlclient_r [ ]# python setup.py clean [ ]# python setup.py build running build running build_py running build_ext building '_mysq

Re: delete will assure file is deleted?

2005-04-27 Thread TZOTZIOY
On Tue, 26 Apr 2005 21:33:52 -0500, rumours say that Mike Meyer <[EMAIL PROTECTED]> might have written: >This is just a little bit tricky. os.remove (on FreeBSD 5-STABLE, >anyway) throws an OSError exception if it doesn't have permission to >remove the file, *or* if the file doesn't exist. You hav

Re: Getting into Python, comming from Perl.

2005-04-27 Thread Peter Hansen
Tim Roberts wrote: That is truly wonderous. Are you famliar with the phrase "jumping the shark"? This chart might prove that, with Perl 6, Perl has now "jumped the shark". For those of us who maybe don't spend enough time watching TV: http://www.wordspy.com/words/jumptheshark.asp -Peter -- http:/

Which IDE is recommended?

2005-04-27 Thread monkey
Read through python site for programming tool, really plenty of choices :-) (For c++, I just can't breath with very very limited choices) Tried Spe, it come with wxGlade built-in very nice(is Spe still actively develop?). But seem that Boa Constructor and PyDev(the plug-in for Eclipse) also worth

Re: python equivalent of php implode

2005-04-27 Thread Jeff Epler
On Tue, Apr 26, 2005 at 09:59:29PM -0500, Mike Meyer wrote: > Jeff Epler <[EMAIL PROTECTED]> writes: > > > items = query_param.items() > > keys = [item[0] for item in items] > > values = [item[1] for item in items] > > Is there some reason not to do: > >keys = query_params.keys()

Re: Which IDE is recommended?

2005-04-27 Thread Peter Szinek
What about eric? (btw afaik it is not listed among the python.org editors, or have i overlooked it)? I have installed it today only, so do not kill me if it's crap, i am just asking ;-) however it looks promising... (at least after IDLE) I have been using PyDev for some time, but i think it is

Internet Explorer, COM+, Javascript and Python

2005-04-27 Thread Ishpeck
I need to make IE execute javascript in a web page with COM+ and Python. Similarly to the way they do it in this article. . . http://www.codeproject.com/com/jscalls.asp -- http://mail.python.org/mailman/listinfo/python-list

Re: Can .py be complied?

2005-04-27 Thread monkey
> And then example.pyc will appear beside example.py. This new file does > not require example.py (you can even delete it), and works on any > computer with Python installed Filip, you can read through my mind (-: You just told me what I want to know exactly, even I can't ask the question correctl

Re: Can .py be complied?

2005-04-27 Thread monkey
> > But those files can be decompyled. > Hi, so which way to go? -- http://mail.python.org/mailman/listinfo/python-list

Re: names of methods, exported functions

2005-04-27 Thread Bengt Richter
On Wed, 27 Apr 2005 10:45:05 +0100, Michael Hoffman <[EMAIL PROTECTED]> wrote: >Mayer wrote: > >> Is there a way to see at the python prompt the names of all the public >> methods of a class or the names exported by a module? I know that >> GUI-based IDEs have a nifty way of displaying these in th

Re: Which IDE is recommended?

2005-04-27 Thread Ishpeck
monkey wrote: > Read through python site for programming tool, really plenty of choices :-) > (For c++, I just can't breath with very very limited choices) > > Tried Spe, it come with wxGlade built-in very nice(is Spe still actively > develop?). But seem that Boa Constructor and PyDev(the plug-in

Re: Which IDE is recommended?

2005-04-27 Thread monkey
> What about eric? Good, it seem a very capable ide. But it require qt and for linux only? (can't find the system requirement) > I have been using PyDev for some time, but i think it is not always very > handsome (e.g. writing a 5-line script in vim needs less time than > eclipse startup ;-) otoh

Re: Which IDE is recommended?

2005-04-27 Thread Bill Mill
On 4/27/05, monkey <[EMAIL PROTECTED]> wrote: > Read through python site for programming tool, really plenty of choices :-) > (For c++, I just can't breath with very very limited choices) > > Tried Spe, it come with wxGlade built-in very nice(is Spe still actively > develop?). But seem that Boa Co

Re: names of methods, exported functions

2005-04-27 Thread Michael Hoffman
Bengt Richter wrote: Using help: (BTW, it would be nice to have some keyword arguments for help to filter down information to exclude what may not be interesting) No kidding. What do you think the output should look like in that case? I think we don't need the mro, or any of the magic methods inhe

Re: Which IDE is recommended?

2005-04-27 Thread Ishpeck
Sorry about the empty post. I'm a fan of PSPad. It's free, light weight, and works with everything. http://www.pspad.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: schedule a monthly ftp event

2005-04-27 Thread Michael Hoffman
Peter Hansen wrote: Jeremy Bowers wrote: ... On UNIX, use some "cron" varient, Windows has some sort of Scheduler built in but I've never done anything with it but turn it off Modern Windowsen also have the "AT" command line program which is sometimes a much more appropriate way to get at that ca

Re: Which IDE is recommended?

2005-04-27 Thread Franz Steinhaeusler
On Wed, 27 Apr 2005 21:16:29 +0800, "monkey" <[EMAIL PROTECTED]> wrote: >Read through python site for programming tool, really plenty of choices :-) >(For c++, I just can't breath with very very limited choices) > >Tried Spe, it come with wxGlade built-in very nice(is Spe still actively >develop?)

Re: Can .py be complied?

2005-04-27 Thread Grant Edwards
On 2005-04-27, monkey <[EMAIL PROTECTED]> wrote: > Yes, I want more options. Since the python doc mentioned > py2exe only, and it is difficult to understand how it > work.(may be you guys know C and make file, but I am still > foolish here...) py2exe has nothing to do with C or make files. You c

Re: PyGTK vs. wxPython

2005-04-27 Thread Grant Edwards
On 2005-04-27, dcrespo <[EMAIL PROTECTED]> wrote: > And what did you use for deploying either PyGTK and wxPython? In other > words, what were your workspace and logic of the development? To whom is this question addressed? I suggest you quote properly when replying in order to give your question

Re: PyGTK vs. wxPython

2005-04-27 Thread Grant Edwards
On 2005-04-27, dcrespo <[EMAIL PROTECTED]> wrote: > Aaand: which do you prefer? Neither particularly. I'm using wxPython because GTK for windows wasn't ready three years ago when I initially had to write my first Windows application. If I evaluated both of them again today, I might choose G

Re: parse tree has symbols not in the grammar?

2005-04-27 Thread Chad Whitacre
Terry, Thanks for the reply. Did you not find them in grammar.txt, which you referenced, or Grammar/Grammar is the source, which you did not. I didn't find them in grammar.txt. I didn't find Grammar/Grammar because I was looking in an installed Python rather than the source (my mistake; I've fou

Re: compile shebang into pyc file

2005-04-27 Thread Michael Soulier
On 26 Apr 2005 18:15:51 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Is there some reason why you want to run the .pyc file, rather than the > .py file? If you start the script with a. It's more efficient, since the code doesn't need to be compiled before it's run. b. What if you want to

Re: PyGTK vs. wxPython

2005-04-27 Thread dcrespo
If you see carefully, that question was for you too, because the reply is at the same level as the one that says "Aaand: which do you prefer?" :) Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Which IDE is recommended?

2005-04-27 Thread Matt
The ActiveGrid IDE is a sample app with wxPython. It has a lot of good features including a source code debugger that allows you to debug wx apps and set breakpoints from the code editor. I am also biased though--I work on that IDE and use it for all my coding. Its pretty far along on Windows and g

Re: PyGTK vs. wxPython

2005-04-27 Thread Michael Soulier
On 25 Apr 2005 08:56:23 -0700, dcrespo <[EMAIL PROTECTED]> wrote: > Hi all... > > I'm learning both, but at a slow step, so I want to know all the > comments about this subject in this group. Personally, I like pyGTK more because the docs are better. There's nothing I hate more than trying to use

How do I parse this ? regexp ?

2005-04-27 Thread [EMAIL PROTECTED]
Hello all, I have this line of numbers: 04242005 18:20:42-0.02, 271.1748608, [-4.119873046875, 3.4332275390625, 105.062255859375], [0.093780517578125, 0.041015625, -0.960662841796875], [0.01556396484375, 0.01220703125, 0.01068115234375] repeated several times in a text file and I would lik

Re: How do I parse this ? regexp ?

2005-04-27 Thread Jorge Godoy
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > Hello all, > > I have this line of numbers: > > > 04242005 18:20:42-0.02, 271.1748608, [-4.119873046875, > 3.4332275390625, 105.062255859375], [0.093780517578125, 0.041015625, > -0.960662841796875], [0.01556396484375, 0.01220703125, > 0.0106

Re: Which IDE is recommended?

2005-04-27 Thread jeff elkins
On Wednesday 27 April 2005 01:16 pm, monkey wrote: > Read through python site for programming tool, really plenty of choices :-) > (For c++, I just can't breath with very very limited choices) > > Tried Spe, it come with wxGlade built-in very nice(is Spe still actively > develop?). But seem that Bo

Re: compile shebang into pyc file

2005-04-27 Thread Fredrik Lundh
Michael Soulier wrote: > Is there some reason why you want to run the .pyc file, rather than the > .py file? If you start the script with a. It's more efficient, since the code doesn't need to be compiled before it's run. b. What if you want to ship closed-source? #!/usr/bin/env python import

Re: Which IDE is recommended?

2005-04-27 Thread Matt Feinstein
On Wed, 27 Apr 2005 21:16:29 +0800, "monkey" <[EMAIL PROTECTED]> wrote: >Read through python site for programming tool, really plenty of choices :-) >(For c++, I just can't breath with very very limited choices) > >Tried Spe, it come with wxGlade built-in very nice(is Spe still actively >develop?)

Re: Which IDE is recommended?

2005-04-27 Thread Brian Beck
monkey wrote: > Read through python site for programming tool, really plenty of choices :-) > (For c++, I just can't breath with very very limited choices) > > Tried Spe, it come with wxGlade built-in very nice(is Spe still actively > develop?). But seem that Boa Constructor and PyDev(the plug-in

Re: delete will assure file is deleted?

2005-04-27 Thread Fredrik Lundh
Christos TZOTZIOY Georgiou wrote: Although I don't have experience with FreeBSD, so far checking the exception's errno args does the job. if that doesn't work on FreeBSD, FreeBSD is not a proper Unix. import errno try: ... except OSError, exc: if exc.errno == errno.ENOENT: # file inexistant

Re: PyGTK vs. wxPython

2005-04-27 Thread Szabolcs Nagy
it's not quite true since the latest stable release (2.6.0.0) see the new wx doc (it's generated with epydoc so it's not for C++): http://www.wxpython.org/docs/api/ i used wxPython with XRCed a few times and i liked the way it works (worked under linux and win as well for me) nsz -- http://mai

Re: compile shebang into pyc file

2005-04-27 Thread Joerg Schuster
> #!/usr/bin/env python > import app Yes, of course this is a possibility. But it implies having (or giving away) two files. I think having one file is always better than having two files. Because if you have two files, you need a third one: a README that tells you what to do with the two files a

Re: Can .py be complied?

2005-04-27 Thread monkey
> py2exe has nothing to do with C or make files. You create a > setup.py file containing a couple lines of python. You run > that python program, and you end up with an .exe file and some > associated .dll files. I typically use inno-setup to create an > installer.exe that creates a desktop icon

Re: PyGTK vs. wxPython

2005-04-27 Thread Shane Hathaway
Szabolcs Nagy wrote: > it's not quite true since the latest stable release (2.6.0.0) > > see the new wx doc (it's generated with epydoc so it's not for C++): > http://www.wxpython.org/docs/api/ > > i used wxPython with XRCed a few times and i liked the way it works > (worked under linux and win a

Re: compile shebang into pyc file

2005-04-27 Thread Jp Calderone
On Wed, 27 Apr 2005 10:37:11 -0400, Michael Soulier <[EMAIL PROTECTED]> wrote: On 26 Apr 2005 18:15:51 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Is there some reason why you want to run the .pyc file, rather than the .py file? If you start the script with a. It's more efficient, since the

Re: Which IDE is recommended?

2005-04-27 Thread Philippe C. Martin
I really like eclipse + pydev Regards, Philippe monkey wrote: > Read through python site for programming tool, really plenty of choices > :-) (For c++, I just can't breath with very very limited choices) > > Tried Spe, it come with wxGlade built-in very nice(is Spe still actively > develop?)

Re: compile shebang into pyc file

2005-04-27 Thread Steve M
I just happened across the page linked to below, and remembered this thread, and, well... here you go: http://www.lyra.org/greg/python/ Executable .pyc files Ever wanted to drop a .pyc file right into your web server's cgi-bin directory? Frustrated because the OS doesn't know what to do with

RE: how to pass an array to a VB array via COM

2005-04-27 Thread Stefan Schukat
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of > jelle > Sent: Tuesday, April 26, 2005 12:31 PM > To: python-list@python.org > Subject: how to pass an array to a VB array via COM > > > Hi, > > I'm trying to script Rhino -the nurbs modeller, not the

Re: How do I parse this ? regexp ?

2005-04-27 Thread [EMAIL PROTECTED]
Hello, I am not understanding your answer, but I probably asked the wrong question :-) I want to remove the commas, and square brackets [ and ] characters and rewrite this whole line (and all the ones following in a text file where only space would be a delimiter. How do I do this ? I have trie

Re: PyGTK vs. wxPython

2005-04-27 Thread Grant Edwards
On 2005-04-27, dcrespo <[EMAIL PROTECTED]> wrote: > If you see carefully, that question was for you too, because the reply > is at the same level as the one that says "Aaand: which do you > prefer?" :) You're assuming that everybody's newsreader displays things in the same manner yours does.

RE: How do I parse this ? regexp ?

2005-04-27 Thread Michael . Coll-Barth
> From: [EMAIL PROTECTED] > > I want to remove the commas, and square brackets [ and ] > characters and > rewrite this whole line (and all the ones following in a text file > where only space would be a delimiter. How do I do this ? > If all you want to do to the data as you read in and write

Re: Can .py be complied?

2005-04-27 Thread Grant Edwards
On 2005-04-27, monkey <[EMAIL PROTECTED]> wrote: >> py2exe has nothing to do with C or make files. You create a >> setup.py file containing a couple lines of python. You run >> that python program, and you end up with an .exe file and some >> associated .dll files. I typically use inno-setup to

Re: Secure FTP

2005-04-27 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Daniel Bowett <[EMAIL PROTECTED]> wrote: > I need to download files over a secure channel. > > I have been looking into Paramiko which seems to have the functonality I > need. The problem is I need a FTP server which supports key based > encryption to install on

Re: Which IDE is recommended?

2005-04-27 Thread djw
monkey wrote: Read through python site for programming tool, really plenty of choices :-) (For c++, I just can't breath with very very limited choices) Tried Spe, it come with wxGlade built-in very nice(is Spe still actively develop?). But seem that Boa Constructor and PyDev(the plug-in for Eclipse

Re: suggestions on how to do this

2005-04-27 Thread Terry Reedy
"chris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have a recursive function b(k) > > b(k) = -(A/k**2)*(b(k-2) - b(k-5)) This is specifically called a recurrence relation/ [snip] > When this is expanded I get a polynomial F(A). I want to determine the > coefficients of the

Re: bytecode non-backcompatibility

2005-04-27 Thread Terry Reedy
"Maurice LING" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > So my alternative solution is that PyPI have a mechanism to maintain what > had been installed in the site-package directory and to download the > libraries and install into the new site-package directory... > What do

Re: Which IDE is recommended?

2005-04-27 Thread monkey
> * Don't underestimate IDLE, it's surprisingly capable considering it's > just a dinky little thing Yes, I believe IDLE is the a unbeatible last resort for python (-: > * SPE has great features, but the pure-Python-ness makes it slow! Is it related to wxpython you mean? or program with GUI in t

Re: names of methods, exported functions

2005-04-27 Thread M.E.Farmer
Michael Hoffman wrote: > Bengt Richter wrote: > > > Using help: (BTW, it would be nice to have some keyword arguments for help to filter down > > information to exclude what may not be interesting) > > No kidding. What do you think the output should look like in that case? > > I think we don't nee

Re: How do I parse this ? regexp ?

2005-04-27 Thread [EMAIL PROTECTED]
Thank you, it works, but I guess not all the way: for instance, I have this: 04242005 18:20:42-0.024329, 271.2469504, [-4.097900390625, 3.4332275390625, 105.062255859375], [0.0384521484375, 0.08416748046875, -1.026885986328125], [0.00640869140625, 0.00885009765625, 0.00701904296875] translates in

Re: compile shebang into pyc file

2005-04-27 Thread Fredrik Lundh
Joerg Schuster wrote: > #!/usr/bin/env python > import app Yes, of course this is a possibility. But it implies having (or giving away) two files. yeah, think of all the disk space you'll waste! Because if you have two files, you need a third one: a README that tells you what to do with the two fil

Re: compile shebang into pyc file

2005-04-27 Thread Grant Edwards
On 2005-04-27, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > so you're saying that the set of people that can deal with no > more than one file at a time but knows how to install and > configure Python (which in itself comes with a few thousand > files) is larger than zero? There are a lot of Linux

Re: How do I parse this ? regexp ?

2005-04-27 Thread Robert Kern
[EMAIL PROTECTED] wrote: Thank you, it works, but I guess not all the way: for instance, I have this: 04242005 18:20:42-0.024329, 271.2469504, [-4.097900390625, 3.4332275390625, 105.062255859375], [0.0384521484375, 0.08416748046875, -1.026885986328125], [0.00640869140625, 0.00885009765625, 0.007019

how can I sort a bunch of lists over multiple fields?

2005-04-27 Thread googleboy
I didn't think this would be as difficult as it now seems to me. I am reading in a csv file that documents a bunch of different info on about 200 books, such as title, author, publisher, isbn, date and several other bits of info too. I can do a simple sort over the first field (title as it turns

Re: Which IDE is recommended?

2005-04-27 Thread alex
jeff elkins wrote: Is Boa actively used? There doesn't seem to be much activity its mailing list. The tutorial fails for me using python 2.3.5, wxpython 2.5.3.2 and Boa 0.4.0 under debian sid. Jeff Boa is not a dead project if that's your concern, maybe it's not getting a lot of attention, b

Re: How do I parse this ? regexp ?

2005-04-27 Thread Jeremy Bowers
On Wed, 27 Apr 2005 07:56:11 -0700, [EMAIL PROTECTED] wrote: > Hello all, > > I have this line of numbers: > > > 04242005 18:20:42-0.02, 271.1748608, [-4.119873046875, > 3.4332275390625, 105.062255859375], [0.093780517578125, 0.041015625, > -0.960662841796875], [0.01556396484375, 0.01220703

Re: tkinter text width

2005-04-27 Thread James Stroud
On Wednesday 27 April 2005 02:31 am, so sayeth Eric Brunel: > The "trick" is to create the Text as small as possible (width=1, height=1), > make it fill its whole container (pack(fill=BOTH, expand=1)), then set the > dimensions for the container window (geometry('500x200')). You'll get a > Text tha

Re: List comprehension and FieldStorage

2005-04-27 Thread Derek Basch
bump -- http://mail.python.org/mailman/listinfo/python-list

Re: how can I sort a bunch of lists over multiple fields?

2005-04-27 Thread James Stroud
I think if you work backwards, it comes out: a = ['bob', 'greg', 'cindy', 'alice'] b = ['fred',barney','betty','wilma','pebbles','bambam'] c = ['jed', 'granny', 'jethro', 'ellie-mae'] d = ['bob','carol','ted','alice'] e = [a,b,c,d] for ary in e: print ary e.sort(lambda x,y:cmp(x[1],y[1])) fo

  1   2   >