Re: How To Read Excel Files In Python?

2005-12-13 Thread gene tani
Anand wrote: > Hello, > > Can I get some help on how to read the excel files using python? > > from win32com.client import Dispatch > xlApp = Dispatch("Excel.Application") > xlWb = xlApp.Workbooks.Open("Read.xls") > xlSht = xlWb.WorkSheets(1) > > But sadly, I am unable to proceed further about how

Re: Visual Python, really "Visual"?

2005-12-13 Thread Luis M. Gonzalez
The IDEs you've been looking at have no visual GUI designers. For that, you can check Boa Constructor or PythonCard. These two are based on the wxPython toolkits. There are other commercial IDEs based on QT but I cannot comment on these cause I've never used them. Visual Python is a plug-in for Vi

Re: Still Loving Python

2005-12-13 Thread Jérôme Laheurte
On Tue, 13 Dec 2005 17:35:40 +0100, Ivan Voras wrote: > Maybe the OP really wants a GUI builder. > More than 5 years ago, i programmed in Visual Basic and Delphi and I > still miss the wonderful ease of graphically creating the user interface > in WYSIWYG mode. If you haven't tried it, you don'

Re: Visual Python, really "Visual"?

2005-12-13 Thread Fredrik Lundh
"Tolga" wrote: > After a very rapid entrance into the Python, I have immediately looked > for a good IDE. Komodo and Wing IDE look very good and I think they are > enough. But now, I am searching for a Pyhton environment which should > look like Delphi / Kylix, Borland's C++ builder or Allegro Com

Re: how can i change the default python?

2005-12-13 Thread gene tani
Koray Bostanci wrote: > Hi all, > > When i type python in terminal it runs the python2.3 interpreter, but i > want to use 2.4 and Python2.4 package is already installed. > > How can i change the default python in my system? I searched google for > a little but couldn't find. > > Using Debian GNU/L

Re: IsString

2005-12-13 Thread Fredrik Lundh
Steve Holden wrote: > In Python a name (*not* a "variable", though people do talk loosely > about "instance variables" and "class variables" just to be able to use > terms familiar to users of other to languages) is simply *bound* to a > value. The only storage that is required, therefore, is eno

Re: Still Loving Python

2005-12-13 Thread Benji York
Ivan Voras wrote: > Are there any easy GUI builders for any Python-supported toolkits? wxDesigner is a really good commercial product, it's pretty inexpensive, too. http://www.roebling.de/ -- Benji York -- http://mail.python.org/mailman/listinfo/python-list

Which Python web framework is most like Ruby on Rails?

2005-12-13 Thread [EMAIL PROTECTED]
I'm interested in knowing which Python web framework is most like Ruby on Rails. I've heard of Subway and Django. Are there other Rails clones in Python land I don't know about? Which one has largest community/buzz about it? Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: IsString

2005-12-13 Thread Xavier Morel
Tom Anderson wrote: > In what sense are the names-bound-to-references-to-objects not variables? > In the sense that a variable has various meta-informations (at least a type) while a Python name has no information. A Python name would be equivalent to a C void pointer, it can mean *any*thing an

Re: "0 in [True,False]" returns True

2005-12-13 Thread Xavier Morel
Mike Meyer wrote: > But this isn't necessarilly true: is perfectly legal. > > http://mail.python.org/mailman/listinfo/python-list

Re: Which Python web framework is most like Ruby on Rails?

2005-12-13 Thread Jorge Godoy
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > Are there other Rails clones in Python land I don't know about? > > Which one has largest community/buzz about it? http://www.turbogears.com ;-) -- Jorge Godoy <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list

Re: Still Loving Python

2005-12-13 Thread Steve Holden
Lawrence Oluyede wrote: > Il 2005-12-13, Ivan Voras <[EMAIL PROTECTED]> ha scritto: > >>More than 5 years ago, i programmed in Visual Basic and Delphi and I >>still miss the wonderful ease of graphically creating the user interface >>in WYSIWYG mode. If you haven't tried it, you don't know what

Re: Horribly noobful string question

2005-12-13 Thread Xavier Morel
Fredrik Lundh wrote: > "SeNTry" wrote: > >> My first post here as I just begin to learn programming in general and >> python in particular. I have all the noobie confused questions, but as I >> work thru the tutorials I'm sure I'll find most my answers. >> >> This one is eluding me tho... I am wo

Re: Which Python web framework is most like Ruby on Rails?

2005-12-13 Thread bonono
I like TurboGears best(haven't used any of those you mentioned, just a brief browse and don't like any of them) and it has a very helpful community. [EMAIL PROTECTED] wrote: > I'm interested in knowing which Python web framework is most like Ruby > on Rails. > > I've heard of Subway and Django. >

Re: Still Loving Python

2005-12-13 Thread gene tani
Lawrence Oluyede wrote: > Il 2005-12-13, Kamilche <[EMAIL PROTECTED]> ha scritto: > > Python still suffers from the lack of a good GUI, which I believe is > > slowing its acceptance by the programming community at large. (I know > > about tKinter, no need to post links to it, thanks.) > > Let me s

Re: Still Loving Python

2005-12-13 Thread Ravi Teja
Nothing beats Delphi for the raw design speed and choices for GUI development. .NET is another good option. The good news is you don't have to loose their benefits just because we chose Python. Python for Delphi works quite well to get you the best of both worlds. I develop the app in Python as a l

Re: Pattern matching with string and list

2005-12-13 Thread BartlebyScrivener
Even without the marker, can't you do: sentence = "the fabric is red" colors = ["red", "white", "blue"] for color in colors: if (sentence.find(color) > 0): print color, sentence.find(color) -- http://mail.python.org/mailman/listinfo/python-list

Re: Which Python web framework is most like Ruby on Rails?

2005-12-13 Thread gene tani
[EMAIL PROTECTED] wrote: > I'm interested in knowing which Python web framework is most like Ruby > on Rails. > > I've heard of Subway and Django. > > > Are there other Rails clones in Python land I don't know about? > > Which one has largest community/buzz about it? > > > Chris Subway and Django

Re: how can i change the default python?

2005-12-13 Thread Xavier Morel
Koray Bostancı wrote: > Hi all, > > When i type python in terminal it runs the python2.3 interpreter, but i > want to use 2.4 and Python2.4 package is already installed. > > How can i change the default python in my system? I searched google for > a little but couldn't find. > > Using Debian GNU

Bad marshal data

2005-12-13 Thread Michael McGarry
Hi, I am using the marshal module in python to save a data structure to a file. It does not appear to be portable. The data is saved on a Linux machine. Loading that same data on a Mac gives me the bad marshal data message. Is this data really not portable or I am doing something wrong here. I th

Re: PyQt on Mac OS X

2005-12-13 Thread Michael McGarry
Thanks, that worked. -- http://mail.python.org/mailman/listinfo/python-list

Re: Visual Python, really "Visual"?

2005-12-13 Thread SPE - Stani's Python Editor
Or try out SPE: http://pythonide.stani.be It ships with a visual gui designer, called wxGlade, debugger WinPdb, etc... Stani -- http://mail.python.org/mailman/listinfo/python-list

Re: Visual Python, really "Visual"?

2005-12-13 Thread Jonathan Ellis
Luis M. Gonzalez wrote: > The IDEs you've been looking at have no visual GUI designers. > For that, you can check Boa Constructor or PythonCard. These two are > based on the wxPython toolkits. There are other commercial IDEs based > on QT but I cannot comment on these cause I've never used them. >

Re: hp-ux crash: threading within a c++ module.

2005-12-13 Thread [EMAIL PROTECTED]
I finally figured this threading problem out. S simple. The thread stack size needed to be increasedthe default thread stack size on hp-ux is insufficient. I suggest that change be added to the default Python build process ... or a note added to the README under the HP-UX section at leas

Re: writing IM bots

2005-12-13 Thread Jarek Zgoda
David Wahler napisał(a): >>I am trying to write an IM Bot, which automatically replies to a >>message, in Python. >>I was wondering If there are python modules for connecting to Yahoo!, >>msn networks ... >>ideally I would like to have a multithreaded module. > > I have found that the best soluti

Re: PyQt on Mac OS X

2005-12-13 Thread Diez B. Roggisch
Fredrik Lundh wrote: > Michael McGarry wrote: > >> I am using the default Python installation that comes with Mac OS X >> Tiger. I want to use the Qt module. How can I install the Qt module? > > http://pdb.finkproject.org/pdb/search.php?summary=pyqt > > ? No, that's the X11 version. -- Regar

Re: Which Python web framework is most like Ruby on Rails?

2005-12-13 Thread [EMAIL PROTECTED]
Gene Thanks for your kind email. I am a newbie web developer that just was hoping *any* framework was bubbling to surface to standout amongst all the rest. I don't know /why/ Rails is getting buzz. I've just heard some good things about it but don't want to switch to Ruby. My main goal is to su

Help designing reading/writing a xml-fileformat

2005-12-13 Thread Jacob Kroon
I'm writing a block-diagram editor, and could use some tips about writing/reading diagrams to/from an xml file format. The basic layout of my code : class Diagram { Blocks blocks[] } class Block { int x, y } class Square(Block) { int width, height } class Circle(Block) { int ra

Re: Which Python web framework is most like Ruby on Rails?

2005-12-13 Thread gene tani
[EMAIL PROTECTED] wrote: > Gene > > Thanks for your kind email. I am a newbie web developer that just was > hoping > *any* framework was bubbling to surface to standout amongst all the > rest. > I don't know /why/ Rails is getting buzz. I've just heard some good > things > about it but don't wan

Re: Help designing reading/writing a xml-fileformat

2005-12-13 Thread Alan Kennedy
[Jacob Kroon] > I'm writing a block-diagram editor, and could use some tips about > writing/reading > diagrams to/from an xml file format. I highly recommend reading David Mertz excellent articles on the conversion of objects to xml and vice-versa. On the 'Pythonic' treatment of XML documents a

pyGTK gtk.Style obj

2005-12-13 Thread ivan.dm
Hi all. in this sentence: self.area = gtk.DrawingArea() self.style = self.area.get_style() self.gc = self.style.fg_gc[gtk.STATE_NORMAL] where can I find about style and its property? thanks Ivan -- http://mail.python.org/mailman/listinfo/python-list

Is unicode_escape broken?

2005-12-13 Thread mtnBikingMark
Hi, I am confused by unicode_escape functionality - it doesn't seem to follow string_escape functionality. I would expect that given the same string (or at least a non-unicode and unicode string appropriately) that they would produce more or less the same output, but: >>> "\t\\t".encode('string

Re: Newbie: executing a system command from my Python app

2005-12-13 Thread mwilliams
You may also look into the PExpect modules as well. If you're that's truly what you wish to do. Regards, Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: pyGTK gtk.Style obj

2005-12-13 Thread Lawrence Oluyede
Il 2005-12-13, ivan.dm <[EMAIL PROTECTED]> ha scritto: > Hi all. > > in this sentence: > self.area = gtk.DrawingArea() > self.style = self.area.get_style() > self.gc = self.style.fg_gc[gtk.STATE_NORMAL] > > where can I find about style and its property? In the tutorial: http://www.pygtk.org/pygtk2

How can I refresh the windows desktop using the python script?

2005-12-13 Thread muttu2244
Hi Everybody Here i have a query for you, that is How can I refresh the windows desktop using the python script? Thanks in advance for having given a thought on my query. Regards yogi -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie: generate a function based on an expression

2005-12-13 Thread Paul Rubin
"Jacob Rael" <[EMAIL PROTECTED]> writes: > I read about the security concerns involved in using eval(). I don't > expect this project to grow to the point where I require a web > interface. However, since I am learning, I might as well learn the > right way. I think you're going to have to write a

Re: I want a Python Puppy !

2005-12-13 Thread Paul Rubin
Claudio Grondi <[EMAIL PROTECTED]> writes: > Currently Ubuntu is my favorite, because it seems to be at the moment > the only Linux distribution supporting already Python 2.4.2 out of the > box, Are you seriously saying that whatever distro came out most recently (and therefore have the latest Pyt

Re: Bad marshal data

2005-12-13 Thread Paul Rubin
"Michael McGarry" <[EMAIL PROTECTED]> writes: > Marshal should save the data in a readable text format, but I guess it > does not. > > Any help would be appreciated, RTFM. Marshal is not intended for what you're doing. Use Pickle, which is. -- http://mail.python.org/mailman/listinfo/python-lis

Re: How To Read Excel Files In Python?

2005-12-13 Thread Do Re Mi chel La Si Do
Hi! I had few modif. your code : import time from win32com.client import Dispatch xlApp = Dispatch("Excel.Application") xlApp.Visible=True xlWb = xlApp.Workbooks.Open("Read.xls") print "D3:",xlWb.ActiveSheet.Cells(3,4).Value time.sleep(2) xlWb.Close(SaveChanges=0) xlApp.Quit() This run OK on my

Re: Python Graph API

2005-12-13 Thread Nathan Gilbert
Steven Bethard <[EMAIL PROTECTED]> once said: > Nathan Gilbert wrote: >> Has there been any work done lately on the Python Graph API? > > Well there doesn't really seem to be a standard one. The wiki was last > updated in August. > > http://wiki.python.org/moin/PythonGraphApi > > STeVe Y

newbie-name mangling?

2005-12-13 Thread bobueland
I'm reading van Rossum's tutorial. Mostly it is well written and examples are given. However sometimes I get lost in a text, when it doesn't give any examples and no clues. There are several examples of this in chapter 9 about classes. Here's one from 9.6 (Private Variables). I quote "There is lim

Re: How can I refresh the windows desktop using the python script?

2005-12-13 Thread Dieter Deyke
[EMAIL PROTECTED] writes: > Hi Everybody > > > Here i have a query for you, that is > > How can I refresh the windows desktop using the python script? > > Thanks in advance for having given a thought on my query. > > Regards > yogi > SPI_SETDESKWALLPAPER = 20 ctypes.windll.user32.SystemParamete

Re: how can i change the default python?

2005-12-13 Thread BartlebyScrivener
Another thread touched on the dangers of doing this, if other applications depend on the older version of Python. http://groups.google.com/group/comp.lang.python/browse_frm/thread/51c8fba4098879ad/734b6bdac1d74b89?lnk=st&q=&rnum=10#734b6bdac1d74b89 -- http://mail.python.org/mailman/listinfo/pyth

Bug in python (Weird UnicodeDecodeError)

2005-12-13 Thread dbri . tcc
Hello I am getting somewhat random UnicodeDecodeError messages in my program. It is random in that I will be going through a pysqlite database of records, manipulate the results, and it will throw UnicodeDecodeError apparently without regard as to what data is being used. For example I am readin

Re: newbie-name mangling?

2005-12-13 Thread Diez B. Roggisch
> > Could someone provide an example of the above or direct me to a page > where it is used. class MangledMembers: def __init__(self): self.__mangled_propertyname = "fooo" mm = MangledMembers() try: print mm.__mangled_propertyname except AttributeError: print "It's pr

Re: "0 in [True,False]" returns True

2005-12-13 Thread Steven D'Aprano
On Tue, 13 Dec 2005 09:46:30 +, Steve Holden wrote: > Paul Rubin wrote: >> Steve Holden <[EMAIL PROTECTED]> writes: >> >>>The really interesting question your post raises, though, is "Why do >>>you feel it's necessary to test to see whether a variable is a >>>Boolean?". >> >> >> What's the

Re: Newbie: executing a system command from my Python app

2005-12-13 Thread Dan M
> Few points points: > > 1. Generally: I would try to minimize system calls. They make your code less > portable. Excellent point. In this case the app will never live anywhere other than one specific FreeBSD machine, but I do appreciate the value of the advice anyway. Therefore... > 2. Look

simple TkInter question - labels

2005-12-13 Thread headspin
I know how to switch a label from text to an image; simply config the image property to an existing image. But how do you do the opposite? Once a label displays an image, how do you switch it back to displaying text? Setting the image property to None doesn't seem to do the trick. By the way, I i

Re: newbie-name mangling?

2005-12-13 Thread Brian van den Broek
[EMAIL PROTECTED] said unto the world upon 2005-12-13 15:05: > I'm reading van Rossum's tutorial. Mostly it is well written and > examples are given. However sometimes I get lost in a text, when it > doesn't give any examples and no clues. There are several examples of > this in chapter 9 about cla

Re: Visual Python, really "Visual"?

2005-12-13 Thread Luis M. Gonzalez
> You're poorly informed. Komodo, for instance, does indeed offer a GUI > designer for tkinter. You're right. Sorry... I guess I exagerated a little bit :-) I tried Komodo and WingIDE some time ago, but it was just a quick look. I had the impression that they didn't offer much more than other fre

Re: newbie-name mangling?

2005-12-13 Thread bobueland
Thanks Diez, Everything becomes very clear from this example Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: pyGTK gtk.Style obj

2005-12-13 Thread ivan.dm
Lawrence Oluyede ha scritto: > Il 2005-12-13, ivan.dm <[EMAIL PROTECTED]> ha scritto: > >>Hi all. >> >>in this sentence: >>self.area = gtk.DrawingArea() >>self.style = self.area.get_style() >>self.gc = self.style.fg_gc[gtk.STATE_NORMAL] >> >>where can I find about style and its property? > > > I

newbie-one more example of difficulty in van Rossum's tutorial

2005-12-13 Thread bobueland
This is from 9.6 (Private variables). I quote - "Notice that code passed to exec, eval() or evalfile() does not consider the classname of the invoking class to be the current class; this is similar to the effect of the global statement, the effect of which is likewise restricted to code that is by

Re: Bug in python (Weird UnicodeDecodeError)

2005-12-13 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: > ... partway through the database results I get something like this: > for item in list: > UnicodeDecodeError : 'utf8' codec can't decode bytes in position 26-28: > invalid data It is quite likely that the position is not what you think it is. For one of the bad string

Re: IsString

2005-12-13 Thread Steven D'Aprano
On Tue, 13 Dec 2005 15:28:32 +, Tom Anderson wrote: > On Tue, 13 Dec 2005, Steven D'Aprano wrote: > >> On Mon, 12 Dec 2005 18:51:36 -0600, Larry Bates wrote: >> >> [snippidy-doo-dah] >> >>> I had the same thought, but reread the post. He asks "if a given >>> variable is a character or a num

Re: newbie-name mangling?

2005-12-13 Thread bobueland
Good example Brian It shows clearly the special role that two underscores play in a class definition. Thanks Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: Which Python web framework is most like Ruby on Rails?

2005-12-13 Thread [EMAIL PROTECTED]
Django might be the answer. -- http://mail.python.org/mailman/listinfo/python-list

Re: Bug in python (Weird UnicodeDecodeError)

2005-12-13 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I am getting somewhat random UnicodeDecodeError messages in my program. > > It is random in that I will be going through a pysqlite database of > records, manipulate > the results, and it will throw UnicodeDecodeError apparently without > regard > as to what data is bein

Re: Another newbie question

2005-12-13 Thread Mike Meyer
Antoon Pardon <[EMAIL PROTECTED]> writes: > Op 2005-12-11, Steven D'Aprano schreef <[EMAIL PROTECTED]>: >> On Sat, 10 Dec 2005 15:46:35 +, Antoon Pardon wrote: >> Do you really think that my class and some other class written by >> another person will have the same API? > If both writers try to

Re: sql using characters like é and ã

2005-12-13 Thread Erik Max Francis
[EMAIL PROTECTED] wrote: > Utf-8 is the same as Unicode? No, UTF-8 is one (of several) possible encodings for expressing Unicode as a stream of bytes. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis Exercise

How can I load python script into Html ??

2005-12-13 Thread PatPoul
I want to do the same thing as but with a python script : == if xxx.py : def mytest(): alert("test") window.document.write('test') == and test.html : mytest() == I always got

Re: Visual Python, really "Visual"?

2005-12-13 Thread malv
Look at eric3. Has the QtDesigner. In my view Qt beats anything. http://www.die-offenbachs.de/detlev/eric3.html -- http://mail.python.org/mailman/listinfo/python-list

Amara (XML) problem on Solaris

2005-12-13 Thread Doru-Catalin Togea
Hi! I have ActiveState Python 2.4.1 on Win XP Pro, with Amara 1.1.6. I have a script which works fine. I am trying to run the same script on a Solaris machine, with Python 2.4.2 and Amara 1.1.6. It gives me this error: bash-2.03$ python generateXML.py Traceback (most recent call last): File

Re: newbie: generate a function based on an expression

2005-12-13 Thread Mike Meyer
"Jacob Rael" <[EMAIL PROTECTED]> writes: > In CppSim, classes are defined that allow various functions to be > defined, like amplifiers. In some cases they are linear: > > y = A*x > > some have offsets: > > y = A*x + off > > some are non-linear > > y = A*x - C*x**3 > > The coefficients and the func

*tuple vs tuple example print os.path.join(os.path.dirname(os.tmpnam()), *("a", "b", "c"))

2005-12-13 Thread Steve
I have been trying to find documentation on the behavior Can anyone tell me why the first example works and the second doesn't and where I can read about it in the language reference? Steve print os.path.join(os.path.dirname(os.tmpnam()),*("a","b","c")) #works OUTPUT:/var/tmp/a/b/c and print os

Re: Newbie: executing a system command from my Python app

2005-12-13 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Dan M <[EMAIL PROTECTED]> wrote: (quoting someone) > > 4. If you only have one argument, you don't need a tuple > > for string formatting. > > 5. "(dateYest)" is not a tuple anyway--the parentheses are > > superfluous 6. Single item tuples can be created with "(ani

Re: How can I load python script into Html ??

2005-12-13 Thread Steve M
Man, I don't even know where to start. There is no way this will work if you don't have a web browser that can interpret Python. I don't know of one, and I don't think anybody wants one because using a browser that would execute arbitrary Python code provided by the server would be an obscene secur

Re: IsString

2005-12-13 Thread Xavier Morel
Steven D'Aprano wrote: > name = "spam spam spam spam" > > the value of the variable "name" is a pointer, and not a string. Riiight. > Yes, it's a reference to an object of type string holding the value > def increment(n): > """Add one to the argument changing it in place.""" > # In Pas

Re: How To Read Excel Files In Python?

2005-12-13 Thread Steve M
"""Derived from _Python Programming on Win32_ by Mark Hammond and Andy Robinson""" import win32com.client import win32com.client.dynamic class Excel: def __init__(self, filename=None): self.xlApp = win32com.client.dynamic.Dispatch('Excel.Application') if filename:

Re: How can I load python script into Html ??

2005-12-13 Thread Berislav Lopac
> Javascript is specifically designed for client-side scripting Actually, Javascript's client-side implementation is specifically designed for client-side scripting. It has originally been envisioned by Netscape for both server and sclient side scripting. Berislav -- http://mail.python.org/mail

Re: How can I load python script into Html ??

2005-12-13 Thread Xavier Morel
Shouldn't have hit the "send" button so fast... Addendum: the script element doesn't have any language attribute, the attribute you're supposed to use is "type" and it takes the MIME type of your script as a value. s/language="javascript"/type="text/javascript"/ -- http://mail.python.org/mailm

Re: How can I load python script into Html ??

2005-12-13 Thread Xavier Morel
PatPoul wrote: > I want to do the same thing as > > > but with a python script : > > > == > if xxx.py : > def mytest(): > alert("test") > window.document.write('test') > == > and test.html : > > > > > mytest() > >

attaching to running python program with the debugger?

2005-12-13 Thread Andy Leszczynski
Hi, I have a program which somewhere gets into infinite look and take 100% of CPU. How can attach to it with the debugger to find out where it takes place? A. -- http://mail.python.org/mailman/listinfo/python-list

Xlib sync on different instance of Xlib.display.Display()?

2005-12-13 Thread Ferry Boender
Hi, I'm relatively new to Xlib programming, and I ran into a little problem. I'm trying to insert keypress events into a X window. The following code works: --8< #!/usr/bin/python import Xlib.display import Xlib.X import Xlib.XK impo

Re: *tuple vs tuple example printos.path.join(os.path.dirname(os.tmpnam()), *("a", "b", "c"))

2005-12-13 Thread Fredrik Lundh
Steve wrote: > I have been trying to find documentation on the behavior the behaviour of what ? > Can anyone tell me why the first example works and the second doesn't > and where I can read about it in the language reference? the os.path.join documentation (in the library reference) says

Keep-alived RPC in Python

2005-12-13 Thread Dody Suria Wijaya
I'm looking for a RPC library in Python that can keep its TCP connection alive for the duration of a user's login session. The reason is, each user login to the application server will impose a single dedicated database connection, and a TCP disconnect will indiciate application server to then

Re: PythonWin troubleshooting

2005-12-13 Thread chuck
chuck wrote: > Sticking with 2.4.2 I reverted to win32 ext 204 and problems were the > same or worse. Then I uninstalled both, removed the dangling py*24.dll > and then installed "ActivePython 2.3.5.236". All the problems went > away. > > I hate to go back to 2.3 cause there are some nice update

Re: Still Loving Python

2005-12-13 Thread Mike Meyer
Jérôme Laheurte <[EMAIL PROTECTED]> writes: > On Tue, 13 Dec 2005 17:35:40 +0100, Ivan Voras wrote: >> Maybe the OP really wants a GUI builder. >> More than 5 years ago, i programmed in Visual Basic and Delphi and I >> still miss the wonderful ease of graphically creating the user interface >> in

Re: simple TkInter question - labels

2005-12-13 Thread James Stroud
headspin wrote: > I know how to switch a label from text to an image; simply config the > image property to an existing image. > > But how do you do the opposite? Once a label displays an image, how do > you switch it back to displaying text? Setting the image property to > None doesn't seem to do

Re: IsString

2005-12-13 Thread Fredrik Lundh
Xavier Morel wrote: > Now use a mutable type instead of an immutable int and you'll notice a > pass-by-reference behavior. python passes a reference to the value, not a reference to the variable. call-by-reference usually refers to the latter. see e.g. http://foldoc.org/?call-by-reference

Re: IsString

2005-12-13 Thread Steven D'Aprano
On Tue, 13 Dec 2005 23:21:02 +0100, Xavier Morel wrote: > Steven D'Aprano wrote: >> name = "spam spam spam spam" >> >> the value of the variable "name" is a pointer, and not a string. Riiight. >> > Yes, it's a reference to an object of type string holding the value > The underlying C implemen

Re: PythonWin troubleshooting

2005-12-13 Thread chuck
Thanks for the suggestions but I have all of the MFC dll's. In fact I have Visual Studio 2003 installed on the box. However my mfc42.dll is different than the size stated on that link. In fact the download is a different size that what is stated on the link. -- http://mail.python.org/mailman/l

Re: Pattern matching with string and list

2005-12-13 Thread Brett g Porter
BartlebyScrivener wrote: > Even without the marker, can't you do: > > sentence = "the fabric is red" > colors = ["red", "white", "blue"] > > for color in colors: > if (sentence.find(color) > 0): > print color, sentence.find(color) > That depends on whether you're only looking for who

Re: Which Python web framework is most like Ruby on Rails?

2005-12-13 Thread Dody Suria Wijaya
Django is the closest one. [EMAIL PROTECTED] wrote: > I'm interested in knowing which Python web framework is most like Ruby > on Rails. > > I've heard of Subway and Django. > > > Are there other Rails clones in Python land I don't know about? > > Which one has largest community/buzz about it?

Re: Still Loving Python

2005-12-13 Thread Peter Maas
Mike Meyer schrieb: > I agree. I've tried a number of different gui builders. I find it much > faster to type something like: > > ui.add_button("New", self.new) > ui.add_button("Open", self.open) > ui.add_button("Save", self.save) > ui.add_button("Save As", self.save_as) > > Than

Re: Still Loving Python

2005-12-13 Thread Luis M. Gonzalez
I just wanted to mention that, according to the latest news from Ironpython's mailing list, an Ironpython plug-in for Visual Studio is on the works. Read on: Aaron Marten wrote: > Hi Giles, > I'm on the Visual Studio SDK team here at Microsoft. In > co-operation with the IronPython team, we'

Re: Still Loving Python

2005-12-13 Thread DH
Ivan Voras wrote: > Maybe the OP really wants a GUI builder. > > More than 5 years ago, i programmed in Visual Basic and Delphi and I > still miss the wonderful ease of graphically creating the user interface > in WYSIWYG mode. If you haven't tried it, you don't know what you're > missing :) >

Re: attaching to running python program with the debugger?

2005-12-13 Thread SPE - Stani's Python Editor
Hi, The new version of SPE 0.8.1.b (Python IDE) supports this. On the toolbar press the "run/stop with winpdb button" button ('gear with bug in it' icon) and when you want to find out, press the debug button (bug icon), then the debugger will break your script and you are even able to alter values

Re: Help designing reading/writing a xml-fileformat

2005-12-13 Thread uche . ogbuji
Jacob Kroon wrote: > I'm writing a block-diagram editor, and could use some tips about > writing/reading > diagrams to/from an xml file format. The basic layout of my code : > > class Diagram { > Blocks blocks[] > } > > class Block { > int x, y > } > > class Square(Block) { > int width,

Re: ActivePython and Amara

2005-12-13 Thread Jay
Ok, ok, i over-reacted. When first reading it seemed as an attack and i quickly put up a defense because i dont like being attacked for no reason. I was actually quite obnoxious and i apoligize. And again, thx James for pointing that out. Once again, i apoligize for my actions and words and i will

Threading in python

2005-12-13 Thread Carl J. Van Arsdall
Hi everyone, I'm trying to use the threading module with python 2.2 and I have some questions regarding python's threading. 1. Who schedules which threads run and when? Is this something left up to the operating system or does python provide a mechanism for this? 2. I've read that python thr

Re: Amara (XML) problem on Solaris

2005-12-13 Thread Alan Franzoni
Doru-Catalin Togea wrote: > AttributeError: 'module' object has no attribute 'create_document' > bash-2.03$ > > Any ideas what is going on? I would say it's a problem with the Amara installation on Solaris. I've never used it, but maybe it's a package from another source which acts a bit differen

Re: Is unicode_escape broken?

2005-12-13 Thread jepler
I also believe this is a bug. Here's an even shorter demonstration of the behavior: >>> u"\\".encode("unicode_escape").decode("unicode_escape") Traceback (most recent call last): File "", line 1, in ? UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 0: \ at end of str

Re: threading IOError

2005-12-13 Thread Andrew MacIntyre
Gabriel Genellina wrote: > Hi > > I'm using Python 2.4.2 on Windows 98 SE. > > In a program with several threads, sometimes (I cant determine exactly > when or why) one thread dies with the following traceback: > > 12/13/05 02:17:47 (WatchDog ) Unhandled thread exception > Traceback (most

Re: Threading in python

2005-12-13 Thread Aahz
In article <[EMAIL PROTECTED]>, Carl J. Van Arsdall <[EMAIL PROTECTED]> wrote: > >I have some questions regarding python's threading. These answers assume you're using CPython; Jython and IronPython have different answers. >1. Who schedules which threads run and when? Is this something left up

Re: IsString

2005-12-13 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: > But neither is it call by reference. If it were call by reference, I could > write something like this: > > def increment(n): > """Add one to the argument changing it in place.""" > # In Pascal, I would need the var keyword to get this behaviour

Comparing dictionaries, is this valid Python?

2005-12-13 Thread François Pinard
Hi, people. I noticed today that dictionaries seem to support `==' comparison. (Retrospectively, it is strange that I never needed it before! :-) Yet, before relying on this, I seeked for confirmation in the Python manuals, and did not succeed in finding it. In particular: http://www.pytho

Re: Developing a network protocol with Python

2005-12-13 Thread Irmen de Jong
Laszlo Zsolt Nagy wrote: >> > I need to send Python objects too. They are too elaborate to convert > them to XML. (They are using cyclic weak references and other Python > specific stuff.) I can be sure that on both sides, there are Python > programs. Is there any advantage in using XML if I al

Re: python24.dll and encodings ?

2005-12-13 Thread Bugs
Martin v. Löwis wrote: > Not only that (but also). In addition, it also contains modules that > were previously implemented as separate .pyd files (_csv, _sre, > _symtable, _winreg, datetime, mmap, parser). > [snip] > > I previously said that I would do such a thing if somebody provided a > spe

Re: Is unicode_escape broken?

2005-12-13 Thread Mark Mc Mahon
On 12/13/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I also believe this is a bug.Here's an even shorter demonstration of the behavior: >>> u"\\".encode("unicode_escape").decode("unicode_escape")Traceback (most recent call last):  File "", line 1, in ?UnicodeDecodeError: 'unicodeescape' codec

<    1   2   3   >