Re: idutils and Python

2006-08-21 Thread [EMAIL PROTECTED]
Ramon Diaz-Uriarte wrote: > Dear All, > > Has anybody tried to use ID Utils > (http://www.gnu.org/software/idutils/46) with Python? What exactly are you trying to accomplish? If you want to index function/class names, variables, etc then you should take a look at "exuberant ctags" http://ctags.so

Re: text editor suggestion?

2006-08-22 Thread [EMAIL PROTECTED]
John Salerno wrote: > > The thing I liked about UltraEdit is that you can define your own groups > of words and put whatever words you want in there, so my file had a > group called '__builtins__' and it listed all the Python built-in > methods, and those would be highlighted. Most editors I see do

Re: Problem installing Python 2.4.3 on FreeBSD 5.3-RELEASE-p31

2006-08-22 Thread [EMAIL PROTECTED]
jamesuh wrote: > Martin v. Löwis wrote: > > [EMAIL PROTECTED] schrieb: > > > I assume this is related to the configure warning... ? Same error with > > > just a standard "./configure" and "make". > > > > > > Any help would be gre

Re: idutils and Python

2006-08-22 Thread [EMAIL PROTECTED]
Ramon Diaz-Uriarte wrote: > On 21 Aug 2006 22:56:13 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > What exactly are you trying to accomplish? If you want to index > > function/class names, variables, etc then you should take a look at &g

Re: key not found in dictionary

2006-08-22 Thread [EMAIL PROTECTED]
KraftDiner wrote: > I have a dictionary and sometime the lookup fails... > it seems to raise an exception when this happens. > What should I do to fix/catch this problem? > > desc = self.numericDict[k][2] > KeyError: 589824 < This is the error that is being produced, > because there is no

Re: switching to numpy and failing, a user story

2006-10-04 Thread [EMAIL PROTECTED]
sturlamolden wrote: > Travis E. Oliphant wrote: > > > Definitely not true. People in Singapore, Japan, Ghana, South Africa, > > France, Germany, New Zealand, Australia, and many other countries are > > using NumPy successfully. Gratefully, a few have contributed by buying > > the book, but a lot

Re: switching to numpy and failing, a user story

2006-10-04 Thread [EMAIL PROTECTED]
Travis E. Oliphant wrote: > [EMAIL PROTECTED] wrote: > > - I guess I should just buy the documentation. I don't like this idea, > > because I think it's counter-productive to the project to have payware > > docs (would Python be successful if you had to buy the docu

Re: item access time: sets v. lists

2006-10-04 Thread [EMAIL PROTECTED]
David Isaac wrote: > Paul M. wrote: > > Random access to item in list/set when item exists > > set -> 0.000241650824337 > > list -> 0.0245168031132 > > > > Random access to item in list/set when item does not exist > > set -> 0.000187733357172 > > list -> 0.522086186932 > > > OK, that's a much be

Re: dictionary of list from a file

2006-10-04 Thread [EMAIL PROTECTED]
limodou wrote: > here is my program > > d = {} > for line in file('test.txt'): > line = line.strip() > if line: > k, v = line.strip().split() > d.setdefault(k, []).append(v) > print d Minor nits: you call strip twice, when you don't need to. just omit the second call. Also

Re: Having trouble using CTypes with a custom function

2006-10-04 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > Hi all. > > I just started looking at Python's ctypes lib and I am having trouble > using it for a function. [...] > #C++ Prototype of the function I want to call: ctypes provides support for calling functions in C libraries, using C datatypes. I

Re: CGI Tutorial

2006-10-04 Thread [EMAIL PROTECTED]
Several times you improperly spell "syntax" "sintax". Other than that it appears to be an excellent tutorial. Clodoaldo Pinto Neto wrote: > I'm just building a Python CGI Tutorial and would appreciate any > feedback from the many experts in this list. > > Regards, Clodoaldo Pinto Neto -- http:/

Re: Where is Python in the scheme of things?

2006-10-04 Thread [EMAIL PROTECTED]
round the Python > community will make you a better VB, dotNet (C#), or C++ programmer, even if > you go with one of those as your language of choice. > > My 2 cents. > > Carl Trachte > > "gord" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECT

Re: dictionary of list from a file

2006-10-05 Thread [EMAIL PROTECTED]
limodou wrote: > On 4 Oct 2006 13:11:15 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > limodou wrote: > > > here is my program > > > > > > d = {} > > > for line in file('test.txt'): > > > line = l

Re: dictionary of list from a file

2006-10-05 Thread [EMAIL PROTECTED]
Peter Otten wrote: > [EMAIL PROTECTED] wrote: > > > for line in (l.rstrip("\n") for l in file("test.txt", "rU") if l[0] != > > "\n"): > > \001\001\001k,\001v\001=\001line.split() > > \001\001\001d.setdefault(k,\001[]).app

Re: Oracle database export

2006-10-05 Thread [EMAIL PROTECTED]
Tor Erik Soenvisen wrote: > Hi, > > I need to export an Oracle database to a DDL-formated file. On the Web, I > found a Python script that did exactly this for a MS Access database, but > not one for Oracle databases. How does the Python script connect to the MS Access database? If it's an ODBC

Re: Why do this?

2006-10-06 Thread [EMAIL PROTECTED]
Nobody's mentioned the ability to save a formatted string and then substitute the variables later... string = "There are %s ways to skin a %s" print string % (3, "furry animal") print string % (166, "beast") ~half.italian Matthew Warren wrote: > Ok, not really python focused, but it feels like

Re: Need array help

2006-10-06 Thread [EMAIL PROTECTED]
On Oct 6, 10:25 am, "Marion Long Jr" <[EMAIL PROTECTED]> wrote: > I am switching from microsoft visual basic programming to python > programming. In microsoft > visual basic you can Dim a variable so that you can add variables by > changing the number > on the end of the

Re: News on versions modules for Python-2.5?

2006-10-06 Thread [EMAIL PROTECTED]
Méta-MCI wrote: > And who can confirm that these modules are independent of Python version? > > ReportLab I can't confirm it's 100% independent, but I have been using reportlab on Windows and Linux with Python 2.5. -- http://mail.python.org/mailman/listinfo/python-list

Re: humble coin head or tail game script I wrote

2006-10-06 Thread [EMAIL PROTECTED]
Camellia wrote: > Well...It' doesn't, have you run it yet? Yes it does, and running it reflects that behavior. > ini_guess = random.randrange(1) > list_guess = ['t', 'h'] > ini_guess = list_guess[ini_guess] random.randrange(1) will always return 0, so this will always initialize ini_guess to 't'

problem with split

2006-10-06 Thread [EMAIL PROTECTED]
apologies if I annoy and for spacing (google) def csdInstrumentList(from_file): "Returns a list of .csd instruments and any comment lines after the instrument" infile = open(from_file, 'r') temp_number = 0 for line in infile: if 'instr' in line: s = re.split(r

Re: problem with split

2006-10-06 Thread [EMAIL PROTECTED]
p.s. this is the one I need to finish to release the csoundroutines library www.dexrow.com [EMAIL PROTECTED] wrote: > apologies if I annoy and for spacing (google) > > > > def csdInstrumentList(from_file): > "Returns a list of .csd instruments and any comment lines

Re: Python to use a non open source bug tracker?

2006-10-06 Thread [EMAIL PROTECTED]
Jira is a remarkably well done product. We've adopted it internally and use it for project planning (we're doing Agile) as well as defect tracking. The plugin support and user interface just can't be touched by the competition and I've been looking. I'd prefer an open source python based system and

Re: problem with split

2006-10-06 Thread [EMAIL PROTECTED]
I was trying something like this digits = re.compile("\d") if digits in line instr_number = digits.search(line) because it looked realy cool when I saw it in a recent post... and then the same thing for just (';') didn't seem to return anything except one line and some hex that cam

Re: problem with split

2006-10-06 Thread [EMAIL PROTECTED]
hanumizzle wrote: > On 6 Oct 2006 23:09:08 -0700, MonkeeSage <[EMAIL PROTECTED]> wrote: > > > > > > On Oct 6, 11:33 pm, hanumizzle <[EMAIL PROTECTED]> wrote: > > > import re > > > > > > > > > > > > if line.startswith(

Re: problem with split

2006-10-07 Thread [EMAIL PROTECTED]
] v = csoundroutines.csdInstrumentList('bay-at-night.csd') print v [EMAIL PROTECTED] wrote: > I think I am very close the return line is tripping me up. (this is > the first list that I have tried to program in python) > > return (s.group[1], s.group[2]) > > Tracebac

Re: Scientific computing and data visualization.

2006-10-08 Thread [EMAIL PROTECTED]
> > I can definitively second that. ROOT is a bit hard to learn but very, > > very powerful and PyRoot is really a pleasure to work with. > > It sounds interesting. Right now, I use matplotlib for > 2D plotting and vtk for 3D. Do you have any experience and > can give some recommendations? Hi Fabi

Re: recommendations for personal journaling application

2006-10-08 Thread [EMAIL PROTECTED]
before you use re there is a quote I have seen on different boards to remember. So you have a problem and you want to use re now you have two problems. It was someone from thescripts.com that helped me realise how to fix my program without re. (sorry if I have thier website name somewhat wro

Re: Python component model

2006-10-09 Thread [EMAIL PROTECTED]
Edward Diener No Spam wrote: > Chaz Ginger wrote: > > Why not propose something. That is the easiest way to get things moving. > > How does one do that ? Propose something here on this NG or is there > some other official way ? Come up with a specification, with examples. Ideally have working cod

How to find a file or a device is currently used by which process or which program ?

2006-10-10 Thread [EMAIL PROTECTED]
Hi, When I want to uninstall my usb disk on windows, the operating systems sometimes tells me the device is being used by other program. But I can't find which program is using it. Can I do this using python ? Thanks. xiaojf -- http://mail.python.org/mailman/listinfo/python-list

Converting MSWord Docs to PDF

2006-10-10 Thread [EMAIL PROTECTED]
Hello, this is my first message sent to the python-list, so forgive any irregularities. is it possible to convert MSword docs into PDF format? i told my future employer that i could, because i knew of the COM scripting abilites that activePython had. and i knew there was modules for PDF creation

Re: OT: Sarcasm and irony

2006-10-10 Thread [EMAIL PROTECTED]
Grant Edwards wrote: > On 2006-10-10, Steve Holden <[EMAIL PROTECTED]> wrote: > > >> probably point out that I am writing from Denmark and was thinking > >> specifically of a situation where a dane told me they were being > >> 'ironic' (when wha

RE: Converting MSWord Docs to PDF

2006-10-11 Thread [EMAIL PROTECTED]
>Sybren Stuvel wrote: > [EMAIL PROTECTED] enlightened us with: > >is it possible to convert MSword docs into PDF format? > > > Yes, it is. check out http://www.stuvel.eu/ooo-python#header3. It's > about converting Excel to PDF, but it equally applies to MSWord.

Re: OT: Sarcasm and irony

2006-10-11 Thread [EMAIL PROTECTED]
Grant Edwards wrote: > On 2006-10-11, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > >> Like Alanis Morisette said about the song "Isn't it Ironic": > >> What's ironic about the song is that it doesn't actually > >> contain any

Re: How to be a good programmers?

2006-10-11 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > I just started to learn python programming because I need to be in the > group when google come in Madagascar, So I want to know, what kind of > python programming I have to start to learn? Zope?...? > Sorry for My english! You can writ me on [EMAIL PROTECT

Re: Standard Forth versus Python: a case study

2006-10-11 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > John Doty: > > Yes. The efficient exact algorithms for this problem use *partial* > > sorts. The Forth one from the FSL is of this class (although I know of > > two better ones for big arrays). But it's tough to beat the efficiency > > of

is there an easy way to create a database on the fly and let the user input values

2006-10-11 Thread [EMAIL PROTECTED]
I don't realy care what database I use wx.grid or whatever. I wan't it to look at a line 128 9023 23428 exc and create the database or pick something out of the file as some sort of a descrition line and then display and allow the user to change and add new lines. What is the easiest set o

Re: Standard Forth versus Python: a case study

2006-10-12 Thread [EMAIL PROTECTED]
Paul McGuire wrote: > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > [snip] > > > > no sort() is needed to calculate the median of a list. > > > > you just need one temp var. > > > > Ok, I'll bite. How do you

ConfigParser: whitespace leading comment lines

2006-10-12 Thread [EMAIL PROTECTED]
Hello all, I'd like to propose the following change to ConfigParser.py. I won't call it a bug-fix because I don't know the relevant standards. This change will enable multiline comments as follows: [section] item=value ;first of multiline comment ;second of multiline comment Right n

Re: Standard Forth versus Python: a case study

2006-10-12 Thread [EMAIL PROTECTED]
Paul Rubin wrote: > Paul Rubin <http://[EMAIL PROTECTED]> writes: > > > fun median { > > > var x = 0. > > > while( *p++) { > > > if( (*p) > x) x = *p. > > > } > > > return x. > > > } > > > > I count t

Re: is there an easy way to create a database on the fly and let the user input values

2006-10-12 Thread [EMAIL PROTECTED]
Chris Lambacher wrote: > I've heard good things about Dabo: http://dabodev.com/ > On Wed, Oct 11, 2006 at 09:44:37PM -0700, [EMAIL PROTECTED] wrote: > > I don't realy care what database I use wx.grid or whatever. I > > wan't it to look at a line > >

Re: Starting out.

2006-10-12 Thread [EMAIL PROTECTED]
Richard Jones wrote: > Tim Chase wrote: > > typed with just the top-row of keys > > '^[qwertyuiop]*$' > > The longest being "typewriter" :) Maybe you should say "amongst the longest" pepperwort perpetuity perruquier pirouetter proprietor repertoire typewriter But even that would be wrong. rupt

Re: Where can I find good python code?

2006-10-13 Thread [EMAIL PROTECTED]
js wrote: > Hi, > > I've learned basics of Python and want to go to the next step. > So I'm looking for good python examples > I steal good techniques from. > Any recommendations? The cookbook, dead-tree version reccomended, otherwise try here: http://aspn.activestate.com/ASPN/Cookbook/Python/ L

Re: IDE

2006-10-13 Thread [EMAIL PROTECTED]
giuseppe wrote: > What is the better IDE software for python programming? > Eric off course - the better ide for python programming step-shuffle-step http://www.die-offenbachs.de/detlev/eric3 -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question - leading zeros

2006-10-13 Thread [EMAIL PROTECTED]
Rainy wrote: > eldorado wrote: > > I have looked around and cannot seem to find a way to strip leading zeros > > off of values in a dictionary. Basically, I am looking to do a for loop > > and any value that has one or more leading zeros would be stripped. Any > > pointers would be appreciated. Th

Re: Best IDE?

2006-10-13 Thread [EMAIL PROTECTED]
Ahmer wrote: > What do you guys use? vim > What platform(s) is it avalable on? Windows, Unix/Linux, Mac, Amiga, others > How much does it cost? Free, and the source is open too. > Why? > What do you like and hate about it? Like: Built-in python interpreter so you can do any editor customizat

Re: IDE that uses an external editor?

2006-10-13 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > One thing that's kept me from even looking at IDEs is that to the best of my > knowledge none of them will integrate properly with external editors like > Emacs or vi. I know lots of tools support "Emacs-like keybindings", but > believe me

Re: Starting out.

2006-10-13 Thread [EMAIL PROTECTED]
Tim Chase wrote: > > Maybe you should say "amongst the longest" > > > > pepperwort > > perpetuity > > perruquier > > pirouetter > > proprietor > > repertoire > > typewriter > > > > But even that would be wrong. > > > > rupturewort > > > >> hey, look, it's Friday > > proprietory > proterotype > rup

Re: IDE that uses an external editor?

2006-10-13 Thread [EMAIL PROTECTED]
Like said before, pida is a great IDE that supports vim as its external editor and also the default editor called Culebra, I've used pida myself and it has some nice features. It's still rough around the edges and has bugs, but its useable. It's written with the Kiwi framework, wich is a wrapper f

a odd thing of "from __future__ import ..."

2006-10-14 Thread [EMAIL PROTECTED]
i can't use "from __future__ import ..." statement import two statesments in the same time. for the simple code: from __future__ import with_statement, division with file('url.txt','r') as f: for line in f: print line it can't run until i change the first sentence to below from __futur

Re: Starting out.

2006-10-14 Thread [EMAIL PROTECTED]
Hendrik van Rooyen wrote: > <[EMAIL PROTECTED]> wrote: > > 8< > > > Well, I'm on vacation this week, so 5 pm means nothing to me: > > > > teetertotter > > > > from the Consolidated Word List from puzzlers.org. > &g

Re: .doc to html and pdf conversion with python

2006-10-14 Thread [EMAIL PROTECTED]
Alexander Klingenstein wrote: > I need to take a bunch of .doc files (word 2000) which have a little text > including some tables/layout and mostly pictures and comvert them to a pdf > and extract the text and images > separately too. If I have a pdf, I can do > create the html with pdftohtml ca

Re: wing ide vs. komodo?

2006-10-14 Thread [EMAIL PROTECTED]
Paul Boddie wrote: > hg wrote: > > > > Eric3 is very nice and moving forward ... I believe it is based on the > > QT library which free ... yet not so free under windows (i have yet to > > understand the business model). > > There are snapshots of Eric4 available, apparently. See here for more: >

Re: Starting out.

2006-10-14 Thread [EMAIL PROTECTED]
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > (according to the Urban Dictionary). > > talk about reliable sources... Well, as far as doing the research to prove them wrong, I'll give it a miss. > > -- http://mail.python.org/mailman/listinfo/python-list

Re: a odd thing of "from __future__ import ..."

2006-10-14 Thread [EMAIL PROTECTED]
Peter, thanks for the info. Peter Otten wrote: > [EMAIL PROTECTED] wrote: > > > i can't use "from __future__ import ..." statement import two > > statesments in the same time. > > > why? python2.5/windows. > > This is a bug: > > http://groups.

Re: Relative import bug or not?

2006-10-14 Thread [EMAIL PROTECTED]
Alexey Borzenkov wrote: > After reading PEP-0328 I wanted to give relative imports a try: > > # somepkg/__init__.py > > > # somepkg/test1.py > from __future__ import absolute_import > from . import test2 > > if __name__ == "__main__": > print "Test" > > # somepkg/test2.py > > > But it compla

Re: problem with the 'math' module in 2.5?

2006-10-14 Thread [EMAIL PROTECTED]
Chris wrote: > >>> from math import * > >>> sin(0) > 0.0 > >>> sin(pi) > 1.2246063538223773e-016 > >>> sin(2*pi) > -2.4492127076447545e-016 > >>> cos(0) > 1.0 > >>> cos(pi) > -1.0 > >>> cos(2*pi) > 1.0 > > The cosine function works fine, but I'm getting weird answers for sine. > Is this a bug? Am

Re: .doc to html and pdf conversion with python

2006-10-14 Thread [EMAIL PROTECTED]
google won't do a good job with .doc files but they may do pdf to html and back.. It's per each I just mentioned it to make fun of them here is my resume converted from a monster.com .doc file http://docs.google.com/View?docid=dftrj73t_3cfwjdv [EMAIL PROTECTED] wrote: > Alexander

Problem with importing a package

2006-10-15 Thread [EMAIL PROTECTED]
I have to work with matrices on python and for that i need a package NUMPY. I downloaded it and saved it in the same folder as the program which imports it. But on running the program it gives an error "ImportError: No module named numpy". Do we need to save the file required to be imported in a sp

Re: Standard Forth versus Python: a case study

2006-10-15 Thread [EMAIL PROTECTED]
John you nailed it. I was a big forth fan in the mid-80s but it was very clear that you either had to spend a lot of money on proprietary systems or do it ALL yourself. Not having any money I was pleased to be able to do it all but today, in the age of instant communication and collaboration, its n

Re: A friendlier, sugarier lambda -- a proposal for Ruby-like blocks in python

2006-10-15 Thread [EMAIL PROTECTED]
Alexey Borzenkov wrote: > [EMAIL PROTECTED] wrote: > > but maybe it reduces code readabilty a bit for people > > that have just started to program: > > > > mul2 = def(a, b): > > return a * b > > > > Instead of: > > > > def mul2(a, b):

wx.grid question (trying to use code from Grid_Example.py)

2006-10-15 Thread [EMAIL PROTECTED]
I am having trouble trying to reuse the code that was provided in the wxdemo package of wxpython. The program I am trying to use parts of is Grid_MegaExample.py thier code is class MegaTable(Grid.PyGridTableBase): """ A custom wx.Grid Table using user supplied data """ def __init_

Re: wx.grid question (trying to use code from Grid_Example.py)

2006-10-15 Thread [EMAIL PROTECTED]
pt terminated. http://www.dexrow.com [EMAIL PROTECTED] wrote: > I am having trouble trying to reuse the code that was provided in the > wxdemo package of wxpython. The program I am trying to use parts of is > Grid_MegaExample.py thier code is > > class MegaTable(Grid.PyGridTableBase): >

How to send E-mail without an external SMTP server ?

2006-10-15 Thread [EMAIL PROTECTED]
Hi, I just want to send a very simple email from within python. I think the standard module of smtpd in python can do this, but I haven't found documents about how to use it after googleing. Are there any examples of using smtpd ? I'm not an expert,so I need some examples to learn how to use i

Re: How to send E-mail without an external SMTP server ?

2006-10-16 Thread [EMAIL PROTECTED]
Rob Wolfe wrote: > [EMAIL PROTECTED] wrote: > >> Hi, >> >> I just want to send a very simple email from within python. >> >> I think the standard module of smtpd in python can do this, but I >> haven't found documents about how to use it after goog

Re: How to send E-mail without an external SMTP server ?

2006-10-16 Thread [EMAIL PROTECTED]
Leo Kislov wrote: >> >> Do I have to setup a smtp server on my localhost ? >> > > You need to use login method > . And by the way, the > subject of your message is very confusing, you are posting log where > you're sending email using external serv

Re: run subprocess in separate window

2006-10-16 Thread [EMAIL PROTECTED]
Radek a écrit : > Hi, > > I am trying to create GUI launcher of several applications using Python > and Tkinter. > > Currently when using subprocess.Popen("mycommand") all output goes to > the stdout of my launcher. > > For some command line applications I need to launch them so that their > outp

Re: classroom constraint satisfaction problem

2006-10-16 Thread [EMAIL PROTECTED]
Steven Bethard a écrit : > I'm trying to solve a constraint-satisfaction problem, and I'm having > some troubles framing my problem in such a way that it can be > efficiently solved. > > Basically, I want to build groups of two teachers and four students such > that [1]: > > * Students are assign

comparing Unicode and string

2006-10-16 Thread [EMAIL PROTECTED]
Hello, here is something that surprises me. #coding: iso-8859-1 s1=u"Frau Müller machte große Augen" s2="Frau Müller machte große Augen" if s1 == s2: pass Running this code produces a UnicodeDecodeError: Traceback (most recent call last): File "tmp.py", line 4, in ? if s1 ==

Re: Need a strange sort method...

2006-10-16 Thread [EMAIL PROTECTED]
SpreadTooThin wrote: > SpreadTooThin wrote: > > Simon Brunning wrote: > > > On 10/16/06, Simon Brunning <[EMAIL PROTECTED]> wrote: > > > > >>> a = [1,2,3,4,5,6,7,8,9,10] > > > > >>> a.sort(key=lambda item: (((item-1) %3), item)) &g

Re: Output from subprocess.Popen()

2006-10-16 Thread [EMAIL PROTECTED]
Clodoaldo Pinto Neto wrote: > Output from the shell: > > [EMAIL PROTECTED] teste]$ set | grep IFS > IFS=$' \t\n' > > Output from subprocess.Popen(): > > >>> import subprocess as sub > >>> p = sub.Popen('set | grep IFS', shell=T

Plotting histograms

2006-10-16 Thread [EMAIL PROTECTED]
hi, I have some values(say from -a to a) stored in a vector and I want to plot a histogram for those values. How can I get it done in python. I have installed and imported the Matplotlib package but on executing the code [N,x]=hist(eig, 10) # make a histogram I am getting an error saying "NameEr

Re: a question about s[i:j] when i is negative

2006-10-16 Thread [EMAIL PROTECTED]
dracula571 wrote: > s[i:j] slice of s from i to j (3), (4) > > (3) > If i or j is negative, the index is relative to the end of the string: > len(s) + i or len(s) + j is substituted. But note that -0 is still 0. > > > (4) > The slice of s from i to j is defined as the sequence of items wit

Re: external file closed

2006-10-17 Thread [EMAIL PROTECTED]
You may be able to use os.popen() kilnhead wrote: > I am opening a file using os.start('myfile.pdf') from python. How can I > know when the user has closed the file so I can delete it? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: stdout not flushed before os.execvp()

2006-10-17 Thread [EMAIL PROTECTED]
> ===> python tmp/testexec.py > Messsage > > ===> python tmp/testexec.py > out ; cat out > > > Is this a bug or feature? > > My version: > Python 2.4.2 (#1, May 2 2006, 08:28:01) > GCC 4.1.0 (SUSE Linux)] on linux2 > > > -- > Thomas Güttler, ht

Using pexpect with 'sudo'

2006-10-17 Thread [EMAIL PROTECTED]
I'm having a problem using pexpect with 'sudo' on Ubuntu 6.06 (Dapper). Here's the program: #!/usr/bin/env python import pexpect import sys child = pexpect.spawn("sudo apt-get update") child.logfile = sys.stdout try: i = child.expect(["Password:", pexpect.EOF, pexpect.TIMEOUT]) if i ==

Re: Python Web Site?

2006-10-17 Thread [EMAIL PROTECTED]
wxpython is down for me also it did work befour my job interview at around noon central. It may have been my wx.grid question for my project finaly did the system in. I followed all the directions but can only post and get one responce and I can't respond to the questions (I get no email so I can

pexpect with apache

2006-10-17 Thread [EMAIL PROTECTED]
Hi all. I try not to post until I am stuck in hole with no way out. I fought with this for several hours, and am currently in the hole. I'm doing a proof of concept for creating afp shares dynamically through a web interface from a client machine. I use a bit of php to setup a simple form, and

Re: Plotting histograms

2006-10-17 Thread [EMAIL PROTECTED]
with this?? Thanks Amit Robert Kern wrote: > [EMAIL PROTECTED] wrote: > > hi, I have some values(say from -a to a) stored in a vector and I want > > to plot a histogram for those values. How can I get it done in python. > > I have installed and imported the Matplotlib packa

Re: Numpy-f2py troubles

2006-10-18 Thread [EMAIL PROTECTED]
Hi Andrea, you should post this to the numpy list: [email protected] Cheers! Bernhard Andrea Gavana schrieb: > Hello NG, > > I am using the latest Numpy release 1.0rc2 which includes F2PY. I > have switched to Python 2.5 so this is the only alternative I have > (IIUC).

Reading a Microsoft access file.

2006-10-18 Thread [EMAIL PROTECTED]
I googled for the answer but all the answer seem to imply that you have to have Access installed on your system. I have a file that was created using Access and I want develop a Python script to read the file and produce a report. Can this be done, if could you point me to some doc? Thanks. Wayne

Converting existing module/objects to threads

2006-10-18 Thread [EMAIL PROTECTED]
I have inheirted some existing code, that i will explain in a moment, have needed to extend and ultimately should be able to run in threads. I've done a bunch of work with python but very little with threads and am looking for some pointers on how to implement, and if the lower level modules/object

Re: Converting existing module/objects to threads

2006-10-18 Thread [EMAIL PROTECTED]
Gabriel Genellina wrote: > At Wednesday 18/10/2006 22:02, [EMAIL PROTECTED] wrote: > > >This currently works in a non-threaded version, but only for one device > >at a time, there is a need to create a single windows(yeach) service > >that talks to many of these device

Re: Converting existing module/objects to threads

2006-10-18 Thread [EMAIL PROTECTED]
martdi wrote: > [EMAIL PROTECTED] wrote: > > I have inheirted some existing code, that i will explain in a moment, > > have needed to extend and ultimately should be able to run in threads. > > I've done a bunch of work with python but very little with threads and > &

Re: Plotting histograms

2006-10-18 Thread [EMAIL PROTECTED]
Thanks for the replies ... its perfect now ... but just one more thing ... how can I plot another function(a semi circle) in the same histogram? thanks amit Robert Kern wrote: > [EMAIL PROTECTED] wrote: > > Thanks Robert, > > > > My previous problem is sol

passing values to a program

2006-10-18 Thread [EMAIL PROTECTED]
I almost have this thing running like I want it to run but I want the values to come from the program that calls this one. There are two things I want to pass File_Name and CutString. They both need to go to loadFile routine of Class WordGrid to replace constants. Thank you for putting up w

Re: passing values to a program

2006-10-18 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > I almost have this thing running like I want it to run but I want > the values to come from the program that calls this one. There are two > things I want to pass File_Name and CutString. They both need to go to > loadFile routine of Class WordGri

Re: passing values to a program

2006-10-19 Thread [EMAIL PROTECTED]
/?group_id=156455&ugn=dex-tracker Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > I almost have this thing running like I want it to run but I want > > the values to come from the program that calls this one. There are two > > things I want to pass File_Name an

Python with MPI enable C-module

2006-10-19 Thread [EMAIL PROTECTED]
Hello All, A software project that I am working on currently has a C++ library that runs on a Beowulf cluster for parallel computation. The library code uses MPI for its implementation. We are currently developing python wrappers for the library. Our current design uses one Python process as a fro

Re: A suggestion/request for IDEs

2006-10-19 Thread [EMAIL PROTECTED]
John Salerno wrote: > I apologize for the slightly off-topic nature, but I thought I'd just > throw this out there for anyone working on text editors or IDEs with > auto-completion. > > I think it should be a feature, when an item is selected for > auto-completion in a drop-down box, that pressing

Re: comparing Unicode and string

2006-10-19 Thread [EMAIL PROTECTED]
g the system encoding. This test could be made at compile time and would render Python more didadic. Luc [EMAIL PROTECTED] schrieb: > Hello, > > here is something that surprises me. > > #coding: iso-8859-1 > s1=u"Frau Müller machte große Augen" > s2="

Re: pexpect with apache

2006-10-19 Thread [EMAIL PROTECTED]
Thank you both for your help. I don't know why I didn't think of that before. I had the expect mindset, and was determined to get it working that way. I added an entry for sudo for the script and it works without a hitch. I'm still curious to know what was going on to disallow the authentication

Re: proper format for this database table

2006-10-19 Thread [EMAIL PROTECTED]
Gabriel Genellina wrote: > At Thursday 19/10/2006 17:07, John Salerno wrote: > > >Hi guys. I was wondering if someone could suggest some possible > >structures for an "Education" table in a database. It will contain at > >minimum university names, years of attendance, and degrees earned. My > >pro

python module for finite element program

2006-10-19 Thread [EMAIL PROTECTED]
Hello, Is there any add on python modules suitable for finite element 3D mesh such as to create (beam, plate, etc) ? Best Regards, ajikoe -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter--does anyone use it for sophisticated GUI development?

2006-10-19 Thread [EMAIL PROTECTED]
wxPython is much more powerful and flexible. I would suggest moving more in that direction. On Oct 19, 3:29 pm, Kevin Walzer <[EMAIL PROTECTED]> wrote: > I'm a Tcl/Tk developer who has been working, slowly, at learning Python, > in part because Python has better support for

Re: Decorators and how they relate to Python - A little insight please!

2006-10-19 Thread [EMAIL PROTECTED]
it's handy for doing things like validation of parameter and return types. Like... @accepts(int,int) @returns(int) def add(a,b): return a+b On Oct 19, 2:04 pm, "Jerry" <[EMAIL PROTECTED]> wrote: > I have just started to do some semi-serious programming (not one-off &g

How to upgrade python from 2.4.3 to 2.4.4 ?

2006-10-19 Thread [EMAIL PROTECTED]
Hi, I just want to upgrade my python version from 2.4.3 to 2.4.4,do I need to uninstall python 2.4.3 first ? I'd rather not to do so, because I have installed some other python packages for python2.4.3. Thanks. xiaojf -- http://mail.python.org/mailman/listinfo/python-list

Re: help with my first use of a class

2006-10-19 Thread [EMAIL PROTECTED]
BartlebyScrivener wrote: > I am a mere hobbyist. Spent several hours trying to make a class, > because I think this is an occasion where I need one. But I can't make > it work. > > This code "works" (only because of the global c, which I know I'm > supposed to avoid, by using a Class). I edited the

Re: FOR statement

2006-10-20 Thread [EMAIL PROTECTED]
Lad wrote: > If I have a list > > Mylist=[1,2,3,4,5] > I can print it > > for i in Mylist: >print i > > and results is > 1 > 2 > 3 > 4 > 5 > > > But how can I print it in a reverse order so that I get > 5 > 4 > 3 > 2 > 1 > > > > ? > > > Thanks. > L reverse the list in place with reverse meth

Re: proper format for this database table

2006-10-20 Thread [EMAIL PROTECTED]
John Salerno wrote: > Carsten Haese wrote: > > >>> [id] [university] [yearStart] [yearEnd] [degreeEarned] > >>> 1 U of I 19711975 BS > >>> 1 U of I 19751976 MS > >>> 1 U of I 19761977 PhD > >>> > >> Thanks guys. I do plan to have

Re: Using Python scripts in Windows Explorer

2006-10-20 Thread [EMAIL PROTECTED]
Ben Sizer wrote: > I'd like to be able to drag a file onto a Python script in Windows > Explorer, or send that file to the script via the Send To context-menu > option, so I can then process that file via sys.argc. > > Unfortunately, I can't drag items onto the Python script, because > Windows doe

<    10   11   12   13   14   15   16   17   18   19   >