Re: proper format for this database table

2006-10-20 Thread [EMAIL PROTECTED]
John Salerno wrote: > [EMAIL PROTECTED] wrote: > > > [Eid] [Sid] [university] [yearStart] [yearEnd] [degreeEarned] > > 5 1 U of I 19711975 BS > > 6 1 U of I 19751976 MS > > 7 1 U of I 1976

Re: proper format for this database table

2006-10-20 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > John Salerno wrote: > > [EMAIL PROTECTED] wrote: > > > > > [Eid] [Sid] [university] [yearStart] [yearEnd] [degreeEarned] > > > 5 1 U of I 19711975 BS > > > 6 1 U of I 1975

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

2006-10-21 Thread [EMAIL PROTECTED]
pygtk can be a pain to install and some of the librarys that are built on top of it have copyrights and such. apple for the fonts and there is one for the images. It also can be a pain to install.. It would be nice to see it as a low cost comercial package that is already put together say $20 or

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

2006-10-21 Thread [EMAIL PROTECTED]
Jerry wrote: > Thanks to everyone that resonded. I will have to spend some time > reading the information that you've provided. > > To Fredrik, unfortunately yes. I saw the examples, but couldn't get my > head wrapped around their purpose. You're probably looking at the newfangled @decorator syn

print dos format file into unix format

2006-10-21 Thread [EMAIL PROTECTED]
Suppose I have a dos format text file. The following python code will print ^M at the end. I'm wondering how to print it in unix format. fh = open(options.filename) for line in fh.readlines() print line, Thanks, Peng -- http://mail.python.org/mailman/listinfo/python-list

Re: Python with MPI enable C-module

2006-10-21 Thread [EMAIL PROTECTED]
ow me to use Python with mpiexec. Thank you, ~doug On Oct 20, 7:13 pm, Mitko Haralanov <[EMAIL PROTECTED]> wrote: > On 19 Oct 2006 06:51:00 -0700 > > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > 1) Would setting up an environment like this require

Re: What About Next Laptop Computers?

2006-10-21 Thread [EMAIL PROTECTED]
I might be intrested The company is on the pink sheets lill or somesuch thing and the guy is posting everywhere plus he talks about fidel castro in spanish... John Purser wrote: > On Sat, 2006-10-21 at 11:51 -0700, Joe wrote: > > L International Reveals Plans for High-Tech > > Next-Generation Lap

a question about MS Windows Clipboard to decrease cpu usage.

2006-10-22 Thread [EMAIL PROTECTED]
hello, I want to record the content of windows'clipboad, after search c.l.p. I got some practical answer such as http://groups.google.com/group/comp.lang.python/browse_thread/thread/57318b87e33e79b0/a7c5d5fcbd4eb58a I have create my small script, it can get clipboard preliminary. but now i had a tr

Re: question: script to input data into a webpage and then retrieve the result?

2006-10-22 Thread [EMAIL PROTECTED]
Christoph Haas 写道: > On Sunday 22 October 2006 08:06, mxywp wrote: > > Could someone help me with this or share an example script with me? > > > > Here is what I want to accomplish: > > (1) input 3 values into 3 boxes on a web page > > (2) there is an authentication code each time you access this

PSF Infrastructure has chosen Roundup as the issue tracker for Python development [repost]

2006-10-22 Thread [EMAIL PROTECTED]
[my initial post through python-list never seemed to reach c.l.py; reposting] At the beginning of the month the PSF Infrastructure committee announced that we had reached the decision that JIRA was our recommendation for the next issue tracker for Python development. Realizing, though, that it was

Re: Screen capture on Linux

2006-10-22 Thread [EMAIL PROTECTED]
Paolo Pantaleo wrote: > Hi, > > I need to capture a screen snapshot in Linux. PIL has a module > IageGrab, but in the free version it only works under Windows. Is > there any package to capture the screen on Linux? xwd comes with the X server. man xwd Most useful is "xwd -root" or similar. You

Arrays? (Or lists if you prefer)

2006-10-22 Thread [EMAIL PROTECTED]
Pythonic lists are everything I want in a one dimensional array . . . but I'm trying to do a text adventure and simplify the proces by creating a grid as opposed to a tedious list of rooms this room connects to. So I want to know a good way to do a SIMPLE two dimensional array. Python's lists are

Re: Arrays? (Or lists if you prefer)

2006-10-22 Thread [EMAIL PROTECTED]
Niel Cerutti wrote: >Just build it up bit by bit, or build it all at once >using range() and then fill it in afterwards. >>>> b =[range(2), range(2)] >>>> b >[0, 1], [0, 1]] >>>> b[0][1] = "OK." >>>> b >[0, 'OK.'], [0, 1]] Interesting. Could I do . . . let's say b = [rang

Re: Arrays? (Or lists if you prefer)

2006-10-22 Thread [EMAIL PROTECTED]
Andrea Griffini wrote: > Neil Cerutti wrote: > > > >>> b =[range(2), range(2)] > > I often happened to use > >b = [[0] * N for i in xrange(N)] > > an approach that can also scale up in dimensions; > for example for a cubic NxNxN matrix: > >b = [[[0] * N for i in xrange(N)] >

Re: comparing Unicode and string

2006-10-23 Thread [EMAIL PROTECTED]
undh wrote: > [EMAIL PROTECTED] wrote: > > > Suggestion: shouldn't an error raise already when I try to assign s2? > > variables are not typed in Python. plain assignment will never raise an > exception. > > -- http://mail.python.org/mailman/listinfo/python-list

Re: Arrays? (Or lists if you prefer)

2006-10-23 Thread [EMAIL PROTECTED]
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > Interesting. Could I do . . . let's say > > > > b = [range(range(3)] > > > > for a three-dimensional array? > > >>> [range(range(3))] > Traceback (most recent call last): >

python GUIs comparison (want)

2006-10-23 Thread [EMAIL PROTECTED]
Now i began to learn GUI programming. There are so many choices of GUI in the python world, wxPython, pyGTK, PyQT, Tkinter, .etc, it's difficult for a novice to decide, however. Can you draw a comparison among them on easy coding, pythonish design, beautiful and generous looking, powerful developme

Re: The format of filename

2006-10-24 Thread [EMAIL PROTECTED]
Tim Chase wrote: > > C:\temp> REM try the same filename convention from dos prompt > C:\temp> type subdir/test.txt > The syntax of the command is incorrect. > C:\temp> REM try with quotes, just in case... > C:\temp> type "subdir/test.txt" > The syntax of the command is incorrect. > C:\temp> notep

Re: python GUIs comparison (want)

2006-10-24 Thread [EMAIL PROTECTED]
but once you get it seems to work realy well. You load dabo and then load your program through dabo... That was all I needed to know to disregard it. http://www.dexrow.com Peter Decker wrote: > On 10/24/06, Kevin Walzer <[EMAIL PROTECTED]> wrote: > > > wxPython: > >

How to find out the directory that the py file is in?

2006-10-24 Thread [EMAIL PROTECTED]
I have the following python script and some_command in the same directory. I have to call the python script from that directory. Otherwise, some_command won't be found. I'm wondering how to make the following script working no matter what the working directory is. Thanks, Peng #!/usr/bin/env pyth

Re: How to find out the directory that the py file is in?

2006-10-24 Thread [EMAIL PROTECTED]
On Oct 24, 7:01 pm, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > At Tuesday 24/10/2006 20:39, [EMAIL PROTECTED] wrote: > > >I have the following python script and some_command in the same > >directory. I have to call the python script from that directory. > >Ot

ANN: Diamanda Wiki and MyghtyBoard Forum Test 1

2006-10-25 Thread [EMAIL PROTECTED]
Diamanda Wiki and MyghtyBoard Forum Test 1 Diamanda is a wiki django application and Myghty Board is a bulletin board application. Both written in Django >= 0.95. Download: http://sourceforge.net/project/showfiles.php?group_id=163611&package_id=208996 or the latest code from SVN at http://code.g

Re: ANN: Diamanda Wiki and MyghtyBoard Forum Test 1

2006-10-25 Thread [EMAIL PROTECTED]
> Might want to re-think your bboard app's name; people might think it > runs on Myghty. :) > > -Jonathan It did in very early stages ;) I've kept the name and if someone wants - using myghty templates in Django is very easy. -- http://mail.python.org/mailman/listinfo/python-list

Re: 255 argument limit?

2006-10-25 Thread [EMAIL PROTECTED]
> >It appears that there is a 255 argument limit in Python 2.4.3? > maybe the argument limit is for the sake of not making functions too complicated. if your function takes more than 200 arguments it can probably go to thedailywtf.com, better be strict like i am and even avoid making a 100 arg

What's the best IDE?

2006-10-25 Thread [EMAIL PROTECTED]
Recently I've had some problems with PythonWin when I switched to Py2.5, tooka long hiatus, and came back. So now I'm without my god sent helper, and I'm looking for a cool replacement, or some advocation to reinstall/setup PyWin. But the Python website's list is irrefutably long. It would take a m

Re: What's the best IDE?

2006-10-25 Thread [EMAIL PROTECTED]
> I don't really have a good answer here, but maybe a data point. I got > tired of waiting for ActiveState to put out a Python 2.5 and installed > the one from python.org instead, which doesn't include PythonWin. I > figured that I should take the opportunity to try out Komodo, which I'd > heard

Re: What's the best IDE?

2006-10-25 Thread [EMAIL PROTECTED]
PS: Search engine . . . I knew this had probably come up very often, but I get it's pretty silly of me that I didn't utilize this. And while I was posting another mark for Komodo came. Nice, is it. -- http://mail.python.org/mailman/listinfo/python-list

Re: What's the best IDE?

2006-10-25 Thread [EMAIL PROTECTED]
After researching Komodo, I found it's not free. The only funds I have are a college fund, and I can't start diping into that until I'm going to college. Any free AND good IDEs? -- http://mail.python.org/mailman/listinfo/python-list

Re: What's the best IDE?

2006-10-25 Thread [EMAIL PROTECTED]
> What's your favorite IDE? Vim > What do you like about it? If you are a very good typist you can rock with Vim. Vi and variants are on _every_ Unix system. It's highly configurable, syntax highlighting, supports scripting with Python. > It would be fine for a begginer, right? Not really, you'

Re: What's the best IDE?

2006-10-25 Thread [EMAIL PROTECTED]
That's surely an idea, but I'm not to that point yet. Right not I'm struggling to understand a text adventure, and because I wanted to try it my own at it (before using a tutorial), this has revieled I no nothing about parsing or classes. Both are required to make an IDE I believe. As for UliPad .

Re: What's the best IDE?

2006-10-25 Thread [EMAIL PROTECTED]
Before that, I mentioned I was trying to make a text adventure, from scratch to add more clarity. -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN compiler2 : Produce bytecode from Python 2.5 Abstract Syntax Trees

2006-10-26 Thread [EMAIL PROTECTED]
Martin v. Löwis wrote: > >> Let me second this. The compiler package is largely unmaintained and > >> was known to be broken (and perhaps still is). A replacement > >> implementation, especially if it comes with a new maintainer, would > >> be welcome. > > Many of these are fixed, but it wouldn't s

Re: Printing Hidden Character in Python

2006-10-26 Thread [EMAIL PROTECTED]
Just escape the '\' character. So you would do: print "\\n" On Oct 26, 2:06 am, Wijaya Edward <[EMAIL PROTECTED]> wrote: > Ben, > > I mean while opening a file, like this > > for line in open('somefile.txt'): > print line > >

my first software

2006-10-26 Thread [EMAIL PROTECTED]
)): if x == charlist[j]: x = j x = (x + 1) * 40 y = (16 - y) * 40 if i%2 == 0: mark.append(mainframe.myCanvas.create_oval(x-15, y-15, x+15, y+15, fill = 'black', tags = 'circle')) step.append(mainframe.myCanva

Re: Get coordinates of a cell

2006-10-26 Thread [EMAIL PROTECTED]
I will give it a try if you have source code so that I can test it.. https://sourceforge.net/project/showfiles.php?group_id=156455&package_id=202823 http://www.dexrow.com Teja wrote: > I have a GUI application with a Frame and a grid in it. I want to popup > a menu after the user enters some tex

Re: What's the best IDE?

2006-10-26 Thread [EMAIL PROTECTED]
What I mean was that it was late and I needed sleep. I'll work with Vim, but it's not like I can spend a week learning it anyway, I don't have that much time AND time to actualy program. And thanks all to have posted suggestions and comments thus far. -- http://mail.python.org/mailman/listinfo/py

Re: What's the best IDE?

2006-10-26 Thread [EMAIL PROTECTED]
I just meant that I was going to bed and didn't have time to do it the same night. I'll see if I can make it work, use it forever . . . I'll do it. -- http://mail.python.org/mailman/listinfo/python-list

Re: Cards deck problem

2006-10-26 Thread [EMAIL PROTECTED]
Dennis Lee Bieber wrote: > On Fri, 27 Oct 2006 03:48:25 GMT, Michael Naunton > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > > > This may seem pendantic, but CS is mostly about thinking about (and thus > >Someday I should arra

Optional Parameter Requirements

2006-10-27 Thread [EMAIL PROTECTED]
If I'm building a function to accept optional parameters, do I need to allow for the capture of both the positional arguments as well as the keyword arguments? If it doesn't make sense to allow keyword arguments, can I just write: def myfunc(a, b, *tup): ... and be done with it? TIA -- http:

Re: "Music Theory Programming" Google Group

2006-10-27 Thread [EMAIL PROTECTED]
That sounds cool to me.. I am looking for a way to save(self) (csound routines).. and I saw your background in religion :) so I will head on over there https://sourceforge.net/project/showfiles.php?group_id=156455 Omar wrote: > I've been learning some programming during my little sabbatical (m

Re: compiling on AIX 5.3 with vacpp

2006-10-27 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > I am trying to compile Python 2.5 on AIX 5.3. I used > > building '_locale' extension > ./Modules/ld_so_aix xlc_r -q64 -bI:Modules/python.exp > build/temp.aix-5.3-2.5/home/pxadm/.test/Python-2.5/Modules/_localemodule.o > -L/usr/local/

Re: using mmap on large (> 2 Gig) files

2006-10-27 Thread [EMAIL PROTECTED]
Martin v. Löwis wrote: > sturlamolden schrieb: > > > And why doesn't Python's mmap take an offset argument to handle large > > files? > > I don't know exactly; the most likely reason is that nobody has > contributed code to make it support that. That's, in turn, probably > because nobody had the pr

Re: Need help (Basic python)...what did I do wrong?

2006-10-28 Thread [EMAIL PROTECTED]
frankie_85 wrote: > Hi everyone, > > I just made a simple code which is part of my assignment but I can't > figure it out what's wrong with it. (always give me error messages) > > What the code basically does is: > > a function that takes one floating point number x as its argument and > returns (

Python crashed when importing SOAPpy, printing out 'usage:copy source destination'

2006-10-28 Thread [EMAIL PROTECTED]
Hello all, when i import SOAPpy, the python crashed and print out 'usage:copy source destination'. As follows: haiyun# python Python 2.4.1 (#2, Mar 28 2006, 21:00:14) [GCC 3.4.2 [FreeBSD] 20040728] on freebsd5 Type "help", "copyright", "credits" or "license" for more in

Re: Python crashed when importing SOAPpy, printing out 'usage:copy source destination'

2006-10-28 Thread [EMAIL PROTECTED]
Fredrik Lundh wrote: > > this is how things work: Python doesn't distinguish between script > files and module files; a module is simply a script that defines a > bunch of things. > > if you want to create something that can work both as a script and a > module, see: > > http://effbot.org/pyfa

Re: Python crashed when importing SOAPpy, printing out 'usage:copy source destination'

2006-10-28 Thread [EMAIL PROTECTED]
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > I still can't understand it. If i rename the 'copy.py' to 'a.py', > > there will be no problem. > > hint: when it works, try typing the following into the interpreter: > > >>

Re: [OT] What's the best IDE?

2006-10-29 Thread [EMAIL PROTECTED]
Theerasak Photha wrote: > I've used Emacs for a long time, but I think I might be going back to > Vim 7.0 now that they improved the scripting functionality with *real* > arrays and dicts. I've been writing all my extensions in python rather than vimscript for several releases (occasionally it req

Re: looping through two list simultenously

2006-10-29 Thread [EMAIL PROTECTED]
CSUIDL PROGRAMMEr wrote: > folks > I have two lists > > i am trying to loop thorough them simultenously. > > Here is the code i am using > > f1 = os.popen('ls chatlog*.out') You can replace this by py> import glob py> f1 = glob.glob('chatlog*.out') it will return a list of filenames in f1, so yo

Re: Reverse function python? How to use?

2006-10-29 Thread [EMAIL PROTECTED]
If you wanted to keep the original list intact, you could do... [code] foo = [x1,x2,x3,x4,x5] bar = [math.sqrt(math.fabs(x))+5*math.pow(x,3) for x in foo] bar_reversed = reversed(bar) [/code] On Oct 29, 4:23 pm, "Murali" <[EMAIL PROTECTED]> wrote: > Something like this? > &

simple oop question (hopefully)

2006-10-29 Thread [EMAIL PROTECTED]
I am just trying to acess a function in wordgrid (savefile) to a button that is defined in TestFrame. I can't seem to make it work I either get an error that my variable isn't global or it makes other complaints. thanks in advance.. sorry for the simple question.. import wx import wx.grid as

Re: simple oop question (hopefully)

2006-10-29 Thread [EMAIL PROTECTED]
I am tagging this so I can find it again (google groups) www.dexrow.com [EMAIL PROTECTED] wrote: > I am just trying to acess a function in wordgrid (savefile) to a button > that is defined in TestFrame. I can't seem to make it work I either > get an error that my variable isn't

Very simple request about argument setting.

2006-10-29 Thread [EMAIL PROTECTED]
I have the argument items in my class room. class room: def __init__(self, name, description, items*): I thought I remembered from a tutorial I read once, and I've read so many I feel like an expert of them, that putting a little star* above an item makes it accept the argument as a list.

Re: Very simple request about argument setting.

2006-10-29 Thread [EMAIL PROTECTED]
ArdPy wrote: > There is an error in the syntax the star must prefix the variable name > not suffix it. > Then the items variable will accept the parameter value as a tuple. Hmm, tuples are immutable, right? I need something mutable so that when the player picks up an item, it's no longer in the r

Re: Very simple request about argument setting.

2006-10-29 Thread [EMAIL PROTECTED]
Thank you very much for your information. -- http://mail.python.org/mailman/listinfo/python-list

Easy PIL Question?

2006-10-30 Thread [EMAIL PROTECTED]
I want to do something very simple: I want to read a palette image (256 color PNG or BMP for instance), and then just to output the image data as numbers (palette indexes, I guess). Makes sense? How do I do that? /David -- http://mail.python.org/mailman/listinfo/python-list

Re: Easy PIL Question?

2006-10-30 Thread [EMAIL PROTECTED]
Fredrik Lundh wrote: > > it's explained in the documentation, of course: > > http://effbot.org/imagingbook/image.htm#Image.getdata > But as I read it, this gives me pixel values, i.e. colors. I want palette indexes instead (which is what is really stored in a palette image). I guess I can mak

CHM help file for Python 2.5

2006-10-30 Thread [EMAIL PROTECTED]
Hello, For Python 2.4, documentation was available in .chm format. For new Python 2.5, I am missing this format (download page: http://docs.python.org/download.html). Can anyone point me to new location of this version of manual, or tell me why this format is no longer supported ... ? thanks --

Re: What's the best IDE?

2006-10-30 Thread [EMAIL PROTECTED]
ohn Salerno <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > >> as I have yet to try Vim - maybe I'll try tomarrow. > > > > Warning: Vim isn't something you just "try tomorrow" :) > > You can become proficient enough for

Re: How to convert " " in a string to blank space?

2006-10-30 Thread [EMAIL PROTECTED]
Is this what you want? py> s = 'This string contains   two times   - end' py> print s.replace(' ', ' '*6) This string containstwo times- end see http://docs.python.org/lib/string-methods.html On Oct 30, 6:26 pm, "一首诗" <[EMAI

Re: How can I import a script with an arbitrary name ?

2006-10-30 Thread [EMAIL PROTECTED]
I had to do something like this a while back for a modular IRC bot that I wrote. __import__() will do the trick, however to avoid getting a cache of the module I recomend doing something like... mod = reload( __import__("%s-%s-%s" % ( t[0], t[1], t[2] ) ) ) [EMAIL PROTECTED] wrote

Re: Python 123 introduction

2006-10-30 Thread [EMAIL PROTECTED]
This is great! A excellent tutorial for somone who has prior experience in programming and is starting out in python. My friend keeps wanting me to teach him python, I think this would be the perfect link for him. Thanks. Jeremy Sanders wrote: > Here is a brief simple introduction to Python I wro

Re: How to convert " " in a string to blank space?

2006-10-30 Thread [EMAIL PROTECTED]
On Oct 30, 6:44 pm, "一首诗" <[EMAIL PROTECTED]> wrote: > Oh, I didn't make myself clear. > > What I mean is how to convert a piece of html to plain text bu keep as > much format as possible. > > Such as convert " " to blank space and convert t

Re: Calling GNU/make from a Python Script

2006-10-30 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > Fredrik> build_dir = "path/to/makefile" > > Fredrik> cwd = os.getcwd() # get current directory > Fredrik> try: > Fredrik> os.chdir(build_dir) > Fredrik> os.system("make") > Fredrik

Re: I want to work on Python

2006-10-30 Thread [EMAIL PROTECTED]
I could use help with my project. It should be very popular when more of it is done and credit may be a good way to build your resume https://sourceforge.net/projects/dex-tracker ArdPy wrote: > Hi there, these days I am desperately searching everywhere on the > Internet for part time python job

Re: Why can't you assign to a list in a loop without enumerate?

2006-10-31 Thread [EMAIL PROTECTED]
I'm not quite sure what your asking, but I'll give it a shot. You do not have to use enumerate, you can use other methods just as range(len(sequence)), but the reason you cannot asign a value is because a for loop iterates a sequence meaning when you do for a in [1, 2, 3, 4, 5]: ... a is just

Re: Overriding traceback print_exc()?

2006-10-31 Thread [EMAIL PROTECTED]
You could always override sys.stderr with a instance of your own with a write() method. Though you will still have to catch the exceptions. Bob Greschke wrote: > I want to cause any traceback output from my applications to show up in one > of my dialog boxes, instead of in the command or terminal

Re: Overriding traceback print_exc()?

2006-10-31 Thread [EMAIL PROTECTED]
I usually have a function like this: def get_excinfo_str(): """return exception stack trace as a string""" (exc_type, exc_value, exc_traceback) = sys.exc_info() formatted_excinfo = traceback.format_exception(exc_type, exc_value, exc_traceback) excinfo_str = "".join(formatted_excin

Re: .pyc's

2006-10-31 Thread [EMAIL PROTECTED]
You can try decompyle http://packages.debian.org/unstable/python/decompyle It works only until python version 2.3 though -- http://mail.python.org/mailman/listinfo/python-list

Updating XML using XPath

2006-10-31 Thread [EMAIL PROTECTED]
Hi All, Is there a way that I can update the attributes of an XML node and MAKE IT PERSISTENT in the XML file through the Python XPath API? I tried the setContent method of the Node but i am only able to update the node variable not the file content itself. Thanks, Sundar -- http://mail.python

Re: best way to check if a file exists?

2006-11-01 Thread [EMAIL PROTECTED]
John Salerno wrote: > What is the best way to check if a file already exists in the current > directory? I saw os.path.isfile(), but I'm not sure if that does more > than what I need. > > I just want to check if a file of a certain name exists before the user > creates a new file of that name. > >

Re: best way to check if a file exists?

2006-11-01 Thread [EMAIL PROTECTED]
Ben Finney wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > > You could try to read the file, if that fails it doesn't exist: > > > > try: > > f = open('xxx') > > except IOError: > > f = open('xxx&#

Re: best way to check if a file exists?

2006-11-01 Thread [EMAIL PROTECTED]
Ben Finney wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > > Ben Finney wrote: > > > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > > > You could try to read the file, if that fails it doesn't exist: >

Re: best way to check if a file exists?

2006-11-01 Thread [EMAIL PROTECTED]
On Nov 1, 3:44 pm, Ben Finney <[EMAIL PROTECTED]> wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > Ben Finney wrote: > > > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > > > You could try to read the file,

trying to call main function with execfile with two arguments

2006-11-01 Thread [EMAIL PROTECTED]
I was trying to find out what my value for filename is but it will not print. The file I am calling csoundgrid2.main seems to work fine when I call it directly from spe with two values and I have used this file dialog to load other files the error I am getting is. thanks for any help in advance

Re: trying to call main function with execfile with two arguments

2006-11-01 Thread [EMAIL PROTECTED]
To extend and revise my notes this is the dialog box that comes with boa constructor with very little change. [EMAIL PROTECTED] wrote: > I was trying to find out what my value for filename is but it will not > print. The file I am calling csoundgrid2.main seems to work fine when >

The Python Journal

2006-11-01 Thread [EMAIL PROTECTED]
To whom it may concern, I have been involved in putting together a new Python journal, called (oh so originally) The Python Journal. This isn't related to a previous project also called The Python Journal although we have the approval of the group that put it together in using their name. http://

Re: compiling on AIX 5.3 with vacpp

2006-11-01 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > > indeed as you say. libintl.h is required so I hard coded it into > setup.py to no effect. At what point does setup.py get called? by make? Yes. When you do make, python itself is built. After that, with the built python setup.py gets called to build all th

Re: The Python Journal

2006-11-01 Thread [EMAIL PROTECTED]
t/projects/dex-tracker [EMAIL PROTECTED] wrote: > To whom it may concern, > > I have been involved in putting together a new Python journal, called > (oh so originally) The Python Journal. This isn't related to a previous > project also called The Python Journal although we have th

Re: other ways to check for ?

2006-11-02 Thread [EMAIL PROTECTED]
Christophe wrote: > Sybren Stuvel a écrit : > > elderic enlightened us with: > >> are there other ways than the ones below to check for >> 'function'> in a python script? > > > > First of all, why would you want to? If you want to call the object > > as a function, just do so. Handle the exceptio

refcounting errors???

2006-11-02 Thread [EMAIL PROTECTED]
Hi, I have a few problems with the C-API. I am trying to embed Python in a simulator that I am writing (I am replacing my previous Guile-based scripting system (mostly as pyrex is a lot nicer than swig and the fact that PyUnit is really nice)). Non the less, my problems come when dealing with cal

Re: other ways to check for ?

2006-11-02 Thread [EMAIL PROTECTED]
Python should have a TypeError subclass: "NotCallableError", to enforce BAFP. -- http://mail.python.org/mailman/listinfo/python-list

Re: The Python Journal

2006-11-02 Thread [EMAIL PROTECTED]
Thanks all for your comments. A number of people have mentioned the click-difficulty of getting to the journal. I'll work with the publisher to make that happen, otherwise I may be able to manually edit the front page to include a link to the latest version. It's great to have people visiting alre

Best way to have intermediate object description format

2006-11-02 Thread [EMAIL PROTECTED]
Hi, Is there any standard text format for storing data of object oriented nature. The text file should be readable. That is, Is there any better way than having to write out a file like this from the original place and read it in python and process it. # world = Worl

Re: Best way to have intermediate object description format

2006-11-02 Thread [EMAIL PROTECTED]
Thanks paddy, Since the original language from which I am translating does not support any of these formats, I will have to write one myself. So, which one is easy to write out in a C like environment. regards, Suresh Paddy wrote: > [EMAIL PROTECTED] wrote: > > Hi, > > Is there an

Re: refcounting errors???

2006-11-03 Thread [EMAIL PROTECTED]
Bingo, that works. Thanks! Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > > The invokation of the foo-function goes somewhere in the line of: > > > >PyObject *up = PyBool_FromLong(1L); > >if (! up) PyErr_Print();

Python Classes and dynamic class members

2006-11-03 Thread [EMAIL PROTECTED]
I have a text file that I am parsing. Each line is of the form: max_time 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10 0.11 0.12 The first item is the field name and the next twelve items are values for each month in the year. There are multiple lines each for some different variable. I a

Re: Python Classes and dynamic class members

2006-11-03 Thread [EMAIL PROTECTED]
James Stroud wrote: > [EMAIL PROTECTED] wrote: > > I have a text file that I am parsing. Each line is of the form: > > > > max_time 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10 0.11 0.12 > > > > The first item is the field name and the next twelve items are

Re: WSDL?

2006-11-03 Thread [EMAIL PROTECTED]
WSDL is a way to describe a webservice (using a XML dialect) in terms of: operations (that have input and output messages) and endpoints (the actual URL to access the webservice). When you accessed your other guy's URL, the "XML API description" you got back was the actual WSDL. So it wasnt' that

Re: WSDL?

2006-11-04 Thread [EMAIL PROTECTED]
; > On 11/4/06, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > > > >>In <[EMAIL PROTECTED]>, Jorge Vargas > >>wrote: > >> > >> > >>>and please please don't go to corba we need to kill that. > >> > &g

string to list of numbers conversion

2006-11-05 Thread [EMAIL PROTECTED]
Hi, I have a string '((1,2), (3,4))' and I want to convert this into a python tuple of numbers. But I do not want to use eval() because I do not want to execute any code in that string and limit it to list of numbers. Is there any alternative way? Thanks. Suresh -- http://mail.python.org/mai

finding the list of the matched strings

2006-11-05 Thread [EMAIL PROTECTED]
Hi, I have a list of strings. And I want to find the subset which matches a particular regular expression. import re ll = ('a', 'b', 's1', 's2', '3s') p = re.compile('^s.*') newList = filter(lambda s: p.match(s), ll) I suppose there should be simple function to do this in re module. Is there any?

Re: string to list of numbers conversion

2006-11-05 Thread [EMAIL PROTECTED]
resh Peter Otten wrote: > [EMAIL PROTECTED] wrote: > > > I have a string '((1,2), (3,4))' and I want to convert this into a > > python tuple of numbers. But I do not want to use eval() because I do > > not want to execute any code in that string and limit i

sneak peak: pythonic math in the silicon forest

2006-11-05 Thread [EMAIL PROTECTED]
Office of the National Budget and Royal Insurance Company of Bhutan (RICB). Kirby Urner Ministry of Education Python Nation [EMAIL PROTECTED] [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Projecting MUD maps

2006-11-05 Thread [EMAIL PROTECTED]
BJörn Lindqvist wrote: > Hello, I'm looking for an algorithm to project "MUD maps" such as the > following map: http://www.aww-mud.org/maps/MUD_Maps/Caerin-colour.jpg > > MUD:s consists of rooms, each rooms has up to four orthogonal edges > (north, east, west and south) that connects it to another

Re: wing ide vs. komodo?

2006-11-05 Thread [EMAIL PROTECTED]
Karlo Lozovina wrote: > "vj" <[EMAIL PROTECTED]> wrote in news:1162708898.962171.161120 > @e3g2000cwe.googlegroups.com: > > > The embedded python shell is also a useful feature. > > Yes, but Debug Probe and Stack Data absolutely rock! Can't live without

building python with utf-8 default encoding?

2006-11-06 Thread [EMAIL PROTECTED]
I am playing around with OpenSwarm and was shocked to see that I cannot build Python with default encoding of utf-8 by passing a flag to configure... did I miss the option for doing so? -- http://mail.python.org/mailman/listinfo/python-list

Re: Learning Python

2006-11-06 Thread [EMAIL PROTECTED]
some J (if you're curious about a really *different* language): http://www.4dsolutions.net/ocn/cp4e.html Kirby Oregon Curriculum Network [EMAIL PROTECTED] kaushal wrote: > Hi > > How do i start Learning Python,is there any reference material which I > can refer since I dont have

Re: sqlite error?

2006-11-06 Thread [EMAIL PROTECTED]
John Salerno wrote: > Am I using the ? placeholder wrong in this example? > > > t = ('hi', 'bye') > > self.connection.execute("INSERT INTO Personal (firstName, lastName) > VALUES ?", t) > > > > Traceback (most recent call last): >File "C:\Python25\myscripts\labdb\dbapp.py", line 93, in OnSaveR

sound process moduls in python ?

2006-11-06 Thread [EMAIL PROTECTED]
Hi, When I was talking with my friend, I wanted to share the music I'm listening with my friend. I mean, I wanted my friend to hear my music and my own sound . I order to achieve this, I think I need to append the output of my sound card to the input of the sound card. My questions: 1. Is my

using split function

2006-11-06 Thread [EMAIL PROTECTED]
Hi, I have to write a code in python to read a matrix from a text file and for that i am using following code. But it gives an error saying "NameError: name 'split' is not defined". Can anyone help me with this. - #!/usr/bin/python import numpy file

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