Re: suggestions between these two books

2005-10-26 Thread John Salerno
Correction: LP covers 2.3. The other covers 2.4. John Salerno wrote: > Hi all. I'm fairly new to programming and I thought I'd like to try > Python. I'm trying to decide between these two books: > > Learning Python (O'Reilly) > Beginning Python: From Novice to Professional (APress) > > and I

online story about python

2005-10-26 Thread Curt Finch
http://software.itmanagersjournal.com/software/05/10/25/1631220.shtml?tid=12 has a good article that talks about why python rocks -- http://mail.python.org/mailman/listinfo/python-list

RE: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Tim Golden
[Tim Golden] > Just occasionally you read posts from people who say (synthesised) > "The Windows command line is rubbish", [Sybren Stuvel] > It is. Let me give an example. I have the following files: [.. snip example of finding .somefile when you type som ..] Well, fair enough. Although I don't

Re: tool for syntax coloring in html

2005-10-26 Thread Andrew Thompson
Xah Lee wrote: > Is there a tool that produce codes in html with syntax coloring? Does that mean you intend simply posting links to your 'articles' on computing in future? > Thanks. I am confident a lot of us would be (thankful if you did). -- http://mail.python.org/mailman/listinfo/python

DrPython - auto complete

2005-10-26 Thread jas
Hi, I just started to use DrPython and I have installed the CodeCompletion plugin. I am using DrPython 161 (on windows) with wxPython 2.6.1. Anyhow, when I try something like x = [] x. ...it pops up "x.filename", "x.prepend" and "x.word". Shouldn't it show "x.append", "x.pop", etc? Just cur

Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Thomas Heller
"Tim Golden" <[EMAIL PROTECTED]> writes: > [Sybren Stuvel] >> You can't resize it horizontally > > Well, peculiarly, you can do this (as you're probably aware) from > the Properties menu and it'll work immediately, albeit without > advising the running programs that it's resized, so only new > li

RE: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Tim Golden
[Giovanni Dall'Olio] Tim Golden ha scritto: [... bash vs Win command-line ...] > Argh!! ;) > How about reading a simple tutorial on bash? [... snip signs of aggravation over my ignorance ...] I am quite well aware of all of the ways you mention of recalling history etc. etc. When I've tried usi

Re: xml.dom.minidom - parseString - How to avoid ExpatError?

2005-10-26 Thread Gregory Piñero
Should I try some sort of XML group instead?  I'm still stuck on this. -Greg On 10/25/05, Gregory Piñero <[EMAIL PROTECTED]> wrote: Hi guys, I was hoping some XML expert could help me make this code work.  Below is sample code with sample XML similar to what I'm dealing with. How can I make the

Re: Set an environment variable

2005-10-26 Thread Alex Martelli
Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2005-10-24, Eric Brunel <[EMAIL PROTECTED]> wrote: > > >> The only think you can export an environment variable to is a > >> child process > > > > Well, you know that, and I know that too. From my experience, > > many people don't... > > True. Using

Re: namespace dictionaries ok?

2005-10-26 Thread Alex Martelli
Ron Adam <[EMAIL PROTECTED]> wrote: ... > class namespace(dict): > def __getattr__(self, name): > return self.__getitem__(name) ... > Any thoughts? Any better way to do this? If any of the keys (which become attributes through this trick) is named 'update', 'keys'

Re: Execute C code through Python

2005-10-26 Thread Ernesto
Peter Hansen wrote: > > Google found the following (after I read the docs for subprocess and > learned about the "startupinfo" flag, and searched for "subprocess > startupinfo"). Does this help? > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/409002 > > -Peter Thanks Peter! That's

RE: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread skip
Tim> I am quite well aware of all of the ways you mention of recalling Tim> history etc. etc. When I've tried using them, they all seem Tim> tiresomely cumbersome ... That's not at all surprising (at least not to me). An important point to realize is that readline's command recall is

Re: suggestions between these two books

2005-10-26 Thread rdsteph
Both of these books are great. Youc an't go wrong with either one. The Beginning Python has an itroduction to the language and then also some projects. Learning Python doens't have projects but is a great introduction to the language. Ron John Salerno wrote: > Hi all. I'm fairly new to programmin

Re: Pickle to source code

2005-10-26 Thread Olivier Dormond
Gabriel Genellina wrote: > Or perhaps: > > xxx = new.instance(MyClass, {'a':1,'b':2,'done':1}) > > In other words, I need a *string* which, being sent to eval(), would > return the original object state saved in the pickle. > As has been pointed, repr() would do that for simple types. But I need

Re: Top-quoting defined [was: namespace dictionaries ok?]

2005-10-26 Thread Grant Edwards
On 2005-10-26, Duncan Booth <[EMAIL PROTECTED]> wrote: > James Stroud wrote: >> On Tuesday 25 October 2005 00:31, Duncan Booth wrote: >>> P.S. James, *please* could you avoid top-quoting >> >> Were it not for Steve Holden's providing me with a link off the list, >> I would have never known to what

Re: textwidget.tag_bind("name", "", self.donothing) not working

2005-10-26 Thread Christopher Subich
shannonl wrote: > Hi all, > > For some reason this bind is calling the donothing function, like it > should, but is then allowing the text to be inserted into the Text > widget. [...] > This bind does work on the text widget as a whole, but on a individual > tag, it does not. You're trying to pre

Re: How best to reference parameters.

2005-10-26 Thread Ron Adam
David Poundall wrote: > However, what I really would like is something like... > > class c_y: > def __init__(self): > self.P1 = [0, 'OB1', 0 ] > self.P2 = [0, 'OB1', 1 ] > self.P3 = [0, 'OB1', 2 ] > self.P4 = [0, 'OB1', 3 ] > > Because that way I can also hol

Re: xml.dom.minidom - parseString - How to avoid ExpatError?

2005-10-26 Thread John Abel
Try this page: http://docs.python.org/lib/module-xml.sax.saxutils.html I've just tried the code, taking out the  , and adding in the belo, as the XML is not well formed, otherwise. The code then works. HTH J Gregory Piñero wrote: > Should I try some sort of XML group instead? I'm still s

Re: suggestions between these two books

2005-10-26 Thread Micah Elliott
On Oct 26, John Salerno wrote: > Hi all. I'm fairly new to programming and I thought I'd like to try > Python. I'm trying to decide between these two books: > > Learning Python (O'Reilly) > Beginning Python: From Novice to Professional (APress) Consider first reading the tutorial. If you prefer

How to processing multi redirect?

2005-10-26 Thread Gonnasi
I want fetching some articles from nytimes.com for my Palm, and I want a clear, simple article too, my Palm has only 8M RAM. With the WGET, I can fetching the page like: "http://www.nytimes.com/2005/10/26/business/26fed.html?pagewanted=print";, and when WGET works, I can see the URL have been redi

SimpleXMLRPCServer

2005-10-26 Thread dcrespo
Hello, Here's my SimpleXMLRPCServer derived class for serving XMLRPC functions. Note that this class enables you to shutdown the xml-rpc server in the moment you want just accesing the QuitFlag variable of the class. I would like to add SSL functionality to that. What do I have to add or modify in

Re: suggestions between these two books

2005-10-26 Thread rpdooling
Many different opinions on books. But if you are learning programming and learning Python, you can't beat the online book: How To Think Like A Computer Scientist: Learning Pythong http://www.ibiblio.org/obp/thinkCSpy/ It's concise and well-written. rd -- http://mail.python.org/mailman/listinfo

Re: suggestions between these two books

2005-10-26 Thread John Salerno
Thanks for the suggestions everyone. I should mention that I misspoke when I said I'm new to programming. I've actually been learning C# for the past few months, and I'm fairly familiar with a lot of programming basics. I just wanted to make sure no one recommended an "Expert" level book! :)

Re: Microsoft Hatred FAQ

2005-10-26 Thread Tor Iver Wilhelmsen
entropy <[EMAIL PROTECTED]> writes: > IBM seems to have had a history of squeezing out competition in the > same way Microsoft has, if I recall correctly. ... and were told not to by a court. Which is the whole reason for the existence of IBM clones, whether PCs or mainframes. -- http://mail.py

Re: WinXP vs. Win98

2005-10-26 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I use Python 2.3.3 (Enthought edition) with wxPython and it is > installed on both WinXP and Win98. On Win98 machine I have the > following error: > File "C:\PYTHON23\lib\site-packages\freetype\font_lookup.py", line > 24, in ? > font_dirs.append(os.path.join(os.en

Re: distutils - distributing non-python data files

2005-10-26 Thread Micah Elliott
On Oct 25, RickMuller wrote: > I really appreciate the ease that the distutils make distributing > Python modules. However, I have a question about using them to > distribute non-Python (i.e. text) data files that support Python > modules. It's not clear from your questions whether this is user-co

Re: How best to reference parameters.

2005-10-26 Thread David Poundall
Sadly Ron, c_y can only see index and showall in your example. -- http://mail.python.org/mailman/listinfo/python-list

Re: distutils - distributing non-python data files

2005-10-26 Thread Jorgen Grahn
On 25 Oct 2005 10:35:53 -0700, RickMuller <[EMAIL PROTECTED]> wrote: > I really appreciate the ease that the distutils make distributing > Python modules. However, I have a question about using them to > distribute non-Python (i.e. text) data files that support Python > modules. I think you forgot

Re: Would there be support for a more general cmp/__cmp__

2005-10-26 Thread Steven Bethard
Antoon Pardon wrote: > Christopher Subich schreef : > >> Antoon Pardon wrote: >>> >>>from decimal import Decimal >>> >>>Zero = Decimal(0) >>> >>>cmp( ( ) , Zero) >>> -1 >>> >>>cmp(Zero, 1) >>> -1 >>> >>>cmp(1, ( ) ) >>> -1 >> >> I'd argue that the wart here is that cmp doesn't throw an exception,

Re: Set an environment variable

2005-10-26 Thread Jorgen Grahn
On Wed, 26 Oct 2005 07:42:19 -0700, Alex Martelli <[EMAIL PROTECTED]> wrote: > Grant Edwards <[EMAIL PROTECTED]> wrote: > >> On 2005-10-24, Eric Brunel <[EMAIL PROTECTED]> wrote: >> >> >> The only think you can export an environment variable to is a >> >> child process >> > >> > Well, you know tha

Re: WinXP vs. Win98

2005-10-26 Thread sidanko
Thanks a lot! I have set the environment variable and now it runs just fine! -- http://mail.python.org/mailman/listinfo/python-list

Re: WinXP vs. Win98

2005-10-26 Thread sidanko
Thanks a lot! I have set the environment variable and now it runs just fine! AS -- http://mail.python.org/mailman/listinfo/python-list

Re: Double replace or single re.sub?

2005-10-26 Thread SPE - Stani's Python Editor
Of course it is better to precompile the expression, but I guess replace will beat even a precompiled regular expression. You could see this posting: http://groups.google.nl/group/comp.lang.python/msg/32af24eab9024f60?&hl=nl&q=replace+re+speed+python+sub But performance should be measured, not gue

Re: Top-quoting defined [was: namespace dictionaries ok?]

2005-10-26 Thread Duncan Booth
Grant Edwards wrote: > Uh, no. Isn't what we're doing here top-quoting? The quoted > stuff is at the top. Everything is in chronological order. I > think what you're referring to is "top-posting". Yes, Iain King already pointed this out. -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Diez B. Roggisch
> Thanks to both of you. But that much I already knew. It's not > that I have *no* knowledge about readline: I did at least > read the manuals when I got stuck! But as far as I can tell > from my experience and from the docs -- and I'm not near a > Linux box at the mo -- having used ctrl-r to reca

Using Python to add thumbnails to Explorer

2005-10-26 Thread c d saunter
Greetings All, In Widows Explorer there is a thumbnail view, where you see images as thumbnails. Applications such as MS Office and OpenOffice, when installed, cause their respective filetypes to be previewed as thumbnails as well. Thumbnails are stored in the Thumbs.db hidden file.

Re: simple send only command line jabber client in python?

2005-10-26 Thread fuzzylollipop
thanks, I found that but I can't get it to work with the server I am using. I installed the lastest verison of the Jive Messaging Server and it just won't authenticate against it. All my desktop clients work with it, I can't get xmppy to work on OSX or Linux. -- http://mail.python.org/mailman/lis

Re: tool for syntax coloring in html

2005-10-26 Thread usenet
Xah Lee wrote: > Is there a tool that produce codes in html with syntax coloring? Sure. It's called "Cascading Style Sheets" (CSS), which is how these sites have done it (as you can see if you "view source"). See articles on SitePoint.com (and MANY others) for info. But this really has nothing to

Re: Top-quoting defined [was: namespace dictionaries ok?]

2005-10-26 Thread Grant Edwards
On 2005-10-26, Duncan Booth <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: > >> Uh, no. Isn't what we're doing here top-quoting? The quoted >> stuff is at the top. Everything is in chronological order. I >> think what you're referring to is "top-posting". > > Yes, Iain King already pointed th

Re: xml.dom.minidom - parseString - How to avoid ExpatError?

2005-10-26 Thread Gregory Piñero
What do you mean by well-formed?  What is required to make XML well formed? -Greg On 10/26/05, John Abel <[EMAIL PROTECTED]> wrote: Try this page:http://docs.python.org/lib/module-xml.sax.saxutils.htmlI've just tried the code, taking out the  , and adding in the belo, as the XML is not well formed

Re: XML Tree Discovery (script, tool, __?)

2005-10-26 Thread uche . ogbuji
""" The output I was contemplating was a DOM "DNA" - that is the DOM without the instances of the elements or their data, a bare tree, a prototype tree based on what is in the document (rather than what is legal to include in the document). Just enough data that for an arbitrary element I would kn

64 bit python binaries (or builds) for Xeon and Opteron architectures on Windows platforms

2005-10-26 Thread [EMAIL PROTECTED]
Does anyone have any information about 64 bit python support for Xeon and Opteron architectures on Windows platforms? If anyone has built the python runtime on either of these platforms before I would be really interested. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Tim G
Thomas Heller wrote: > FYI, if you don't know this already: You also can resize the console without > going through the properties menu with 'mode con cols=... lines=...'. Good grief! I haven't used "mode con" in years; forgotten it even existed! Thanks for bringing that back, Thomas. TJG -- ht

Re: Weird import behavior

2005-10-26 Thread Tommytrojan
Thanks for the clarification. I never ran into this before although I have been working with Python for over 8 years. Good to learn something new. Cheers, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-26 Thread axel
In comp.lang.perl.misc Steven D'Aprano <[EMAIL PROTECTED]> wrote: >> Heck, I dunno. Like you, I don't even really care all that much. > You don't care that innovation in desktop software has been crippled by > the actions of the monopoly player Microsoft? > In 1988, there were something li

Problem ... with threads in Python

2005-10-26 Thread Negoescu Constantin
Hello.       I know that Python is not fully threadsafe. Unlike Java, where threading was considered to be so important that it is a part of the syntax, in Python threads were laid down at the altar of Portability. But, i really have to finish a project  which uses multiple threads in Python

Jpg

2005-10-26 Thread Tuvas
I am building a GUI interface at the moment, and would like to have support for displaying a jpg file, and a FITS file if possible. Is there any way to do this? My interface has been written in Tkinter at the moment, especially because of it's great portability, I wouldn't have to install the other

simulate DoEvents by python/wxpython

2005-10-26 Thread James Hu
Hi, all gurus,   I  need to simulate DoEvents in VB by python/wxPython, My application needs to capture live image in a loop until one specific button pressed Multi-thread is also not very good solution, for there are big number of data to exchange between the two threads.   Win32g

Raw string fu

2005-10-26 Thread Joshua Ginsberg
>>> r'\' File "", line 1 r'\' ^ SyntaxError: EOL while scanning single-quoted string >>> r'\\' '' Does that seem wrong to anybody else? Shouldn't the first one be syntactically correct? -jag -- http://mail.python.org/mailman/listinfo/python-list

Python 2.3.4, Berkeley db 1.85, db file format not recognized

2005-10-26 Thread Dan M
I'm working on a script that will interface with sendmail on my FreeBSD box. I'm trying to read my access.db file (yes, it's for a quick and dirty SMTP-after-POP application). I'm trying: import bsddb bsddb.hashopen("access.db") but I get: bsddb._db.DBInvalidArgError: (22, 'Invalid argument -- ac

Re: suggestions between these two books

2005-10-26 Thread hrh1818
I suggest you widen your search and you take a look at Chris Fehily's Python book. It is one of Peachpit Press's Visual Quickstart Guide books. The reason I suggest this book is it provides a lot more short examples of basic Python code than the two in your list. Howard John Salerno wrote: > Hi

Re: Raw string fu

2005-10-26 Thread Jaime Wyant
This URL has a good section on raw strings. http://www.ferg.org/projects/python_gotchas.html r'\' is wrong because raw strings were originally added to make regular expressions easier to write. And you can't have a regexp that ends with \. Also, you can use the \ to escape your original quote c

Re: Raw string fu

2005-10-26 Thread Jaime Wyant
Doh. that example was supposed to be -> >>> r'I can\'t end strings with a \.' "I can\\'t end strings with a \\." On 10/26/05, Jaime Wyant <[EMAIL PROTECTED]> wrote: > This URL has a good section on raw strings. > > http://www.ferg.org/projects/python_gotchas.html > > r'\' is wrong because raw stri

Re: XML Tree Discovery (script, tool, __?)

2005-10-26 Thread Istvan Albert
All I can add to this is: - don't use SAX unless your document is huge - don't use DOM unless someone is putting a gun to your head There's a good selection of nice and simple XML processing libraries in python. You could start with ElementTree. -- http://mail.python.org/mailman/listinfo/python

Re: How best to reference parameters.

2005-10-26 Thread Istvan Albert
Sounds like the Bunch: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52308 -- http://mail.python.org/mailman/listinfo/python-list

Re: How to processing multi redirect?

2005-10-26 Thread David Wahler
Gonnasi wrote: > I want fetching some articles from nytimes.com for my Palm, and I want > a clear, simple article too, my Palm has only 8M RAM. > > With the WGET, I can fetching the page like: > "http://www.nytimes.com/2005/10/26/business/26fed.html?pagewanted=print";, > and when WGET works, I can

Re: tool for syntax coloring in html

2005-10-26 Thread Googmeister
Xah Lee wrote: > in some online documentations, for examples: > > http://perldoc.perl.org/perlref.html > http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme-Z-H-17.html > http://www.haskell.org/hawiki/HaskellDemo > > the codes are syntax colored. > > Is there a tool that produce codes in html

Re: XML Tree Discovery (script, tool, __?)

2005-10-26 Thread Kent Johnson
Istvan Albert wrote: > All I can add to this is: > > - don't use SAX unless your document is huge > - don't use DOM unless someone is putting a gun to your head +1 QOTW -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-26 Thread David Schwartz
"Peter T. Breuer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In comp.os.linux.misc David Schwartz <[EMAIL PROTECTED]> wrote: >> "Peter T. Breuer" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> I don't know what drugs you're on, but the McDonald's corpo

Re: Microsoft Hatred FAQ

2005-10-26 Thread David Schwartz
"Eike Preuss" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> Right, except that's utterly absurd. If every vendor takes their tiny >> cut of the 95%, a huge cut of the 5% is starting to look *REALLY* good. > Sure, that would be true if the market would be / would have been r

Re: Microsoft Hatred FAQ

2005-10-26 Thread David Schwartz
"Tor Iver Wilhelmsen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > entropy <[EMAIL PROTECTED]> writes: >> IBM seems to have had a history of squeezing out competition in the >> same way Microsoft has, if I recall correctly. > ... and were told not to by a court. Which is the w

Re: Jpg

2005-10-26 Thread c d saunter
Tuvas ([EMAIL PROTECTED]) wrote: : I am building a GUI interface at the moment, and would like to have : support for displaying a jpg file, and a FITS file if possible. Is : there any way to do this? My interface has been written in Tkinter at : the moment, especially because of it's great portabil

Attribute value of instance method non-modifiable?

2005-10-26 Thread Stefan Behnel
Hi! I just stumbled over this: .>>> class test(object): ... def t(): pass ... t.testval = 1 ... .>>> test.t .>>> test.t.testval 1 .>>> test.t.testval = 2 Traceback (most recent call last): File "", line 1, in ? AttributeError: 'instancemethod' object has no attribute 'testval' .>>> dir(te

Re: Raw string fu

2005-10-26 Thread Fredrik Lundh
Joshua Ginsberg wrote: > >>> r'\' > File "", line 1 > r'\' > ^ > SyntaxError: EOL while scanning single-quoted string > >>> r'\\' > '' > > Does that seem wrong to anybody else? Shouldn't the first one be > syntactically correct? the "r" prefix doesn't change how string literals are parsed; it

Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Sybren Stuvel
Tim Golden enlightened us with: > Well, fair enough. Although I don't think that on its own this > constitutes "rubbish". True - it's just one of the reasons that shift its status toward rubishness ;-) > Not quite sure what this means. As in ANSI support? (Perfectly true > - definitely lacking th

Re: Problem ... with threads in Python

2005-10-26 Thread Jeremy Jones
Negoescu Constantin wrote: > Hello. > > I know that Python is */not fully threadsafe/*. Unlike Java, where > threading was considered to be so important that it is a part of the > syntax, in Python threads were laid down at the altar of Portability. > But, i really have to finish a projec

Re: Windows vs Linux

2005-10-26 Thread Tim G
Bernhard Herzog wrote: > "Tim Golden" <[EMAIL PROTECTED]> writes: > > > But as far as I can tell > > from my experience and from the docs -- and I'm not near a > > Linux box at the mo -- having used ctrl-r to recall line x > > in the history, you can't just down-arrow to recall x+1, x+2 etc. > > O

Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread James Stroud
On Wednesday 26 October 2005 07:20, Tim Golden wrote: > I'm sure you're right: given moderately naive users, a Windows box > is *extremely* likely to be zombified. It's just that it doesn't > have to be that way with the proper care and attention. With $200 dollars of antivirus software (on top of

Re: Python 2.3.4, Berkeley db 1.85, db file format not recognized

2005-10-26 Thread skip
Dan> import bsddb Dan> bsddb.hashopen("access.db") Dan> but I get: Dan> bsddb._db.DBInvalidArgError: (22, 'Invalid argument -- access.db: unexpected file type or format') Dan> Any suggestions on how to read this file? See if the bsddb185 module is available: % p

Re: replace words

2005-10-26 Thread Paul McGuire
[EMAIL PROTECTED] wrote: > What is the way for replacing in a string from . to . the sentence? > for example: > "been .taken. it may be .left. there, > even if the .live coals were not. cleared" > I want to do this-> replace(\.(.*)\.,\.start (1) end\.) > result: > "been .start taken end. it may

Re: Raw string fu

2005-10-26 Thread Paul McGuire
"Raw string fu"? A new martial art? -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows vs Linux

2005-10-26 Thread Sybren Stuvel
Tim G enlightened us with: > Sadly, this seems not to be the case on my Ubuntu Breezy: bash > 3.00.16, libreadline 4.3/5.0 (not sure which one bash is using). > ctrl-r is fine; but you can't down-arrow from there; it just beeps > at you. Is there some setting I'm missing? See my other post in this

Re: Python 2.3.4, Berkeley db 1.85, db file format not recognized

2005-10-26 Thread Dan M
On Wed, 26 Oct 2005 14:23:49 -0500, skip wrote: > > Dan> import bsddb > Dan> bsddb.hashopen("access.db") > > Dan> but I get: > Dan> bsddb._db.DBInvalidArgError: (22, 'Invalid argument -- access.db: > unexpected file type or format') > > Dan> Any suggestions on how to r

Re: Using Python to add thumbnails to Explorer

2005-10-26 Thread Roger Upole
As you guessed, the icon locations are stored in the registry. There's a key under HKEY_CLASSES_ROOT for each registered file type, with a default value holding the class name. Under the class name, there's a DefaultIcon key that gives the path to the icon. Using python files an an example, you ha

Re: Double replace or single re.sub?

2005-10-26 Thread Josef Meile
Hi Iain, > Would this be a quicker/better way of doing it? I don't know if this is faster, but it is for sure more elegant: http://groups.google.ch/group/comp.lang.python/msg/67b8767c793fb8b0 I really like it because of its simplicity an easy use. (Thanks to Fredrik Lundh for the script). Howev

Re: textwidget.tag_bind("name", "", self.donothing) not working

2005-10-26 Thread shannonl
No I haven't, but I will give it a try. Thanks for your reply! -- http://mail.python.org/mailman/listinfo/python-list

Re: textwidget.tag_bind("name", "", self.donothing) not working

2005-10-26 Thread shannonl
I don't know if Tk supports this or not. I guess it just made since to me that it should. If you can bind events to a tag then why not a tag inside a text widget. The actual bind itself works. donothing() is called, the problem is that after donothing() is called and I return "break", Tk contin

Re: Small utility program for the windows

2005-10-26 Thread Roger Upole
It works fine for me (XP, Python 2.4.2). Where exactly do you get the access denied ? When writing to the registry, or trying to start python, or within the python code ? Roger "Iyer, Prasad C" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi, I am trying to create a small u

Re: textwidget.tag_bind("name", "", self.donothing) not working

2005-10-26 Thread jean-marc
but you don't want to use the state=DISABLED option because it gray's out the field showing people that it is not available for editing, right? -- http://mail.python.org/mailman/listinfo/python-list

Re: textwidget.tag_bind("name", "", self.donothing) not working

2005-10-26 Thread jean-marc
Sorry, kinda wrote over your intentions... -- http://mail.python.org/mailman/listinfo/python-list

Re: Set an environment variable

2005-10-26 Thread Mike Meyer
Jorgen Grahn <[EMAIL PROTECTED]> writes: > On Wed, 26 Oct 2005 07:42:19 -0700, Alex Martelli <[EMAIL PROTECTED]> wrote: >> Grant Edwards <[EMAIL PROTECTED]> wrote: >>> On 2005-10-24, Eric Brunel <[EMAIL PROTECTED]> wrote: >>> >> The only think you can export an environment variable to is a >>> >> c

Re: Looping Problem (Generating files - only the last record generates a file)

2005-10-26 Thread vasilijepetkovic
Guys - This fixed the issue - thanks to all -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-26 Thread Peter T. Breuer
In comp.os.linux.misc David Schwartz <[EMAIL PROTECTED]> wrote: > "Peter T. Breuer" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> In comp.os.linux.misc David Schwartz <[EMAIL PROTECTED]> wrote: >>> "Peter T. Breuer" <[EMAIL PROTECTED]> wrote in message >>> news:[EMAIL PROTECT

Re: textwidget.tag_bind("name", "", self.donothing) not working

2005-10-26 Thread jean-marc
To make amends, I tried my own search and came up with this (that you might already have...): http://groups.google.com/group/comp.lang.python/browse_thread/thread/1384f49c35ffba9b/5928092247429e9a%235928092247429e9a?sa=X&oi=groupsr&start=1&num=3 Maybe you'll understand it better than me :-) --

Re: assignment to reference

2005-10-26 Thread Bruno Desthuilliers
Loris Caren a écrit : > If > > a = 'apple' > b = 'banana' > c = 'cabbage' > > How can I get something like:- > > for i in 'abc': > r = eval(i) > if r == 'cabbage': r = 'coconut' > > actually change the object referenced by r rather > than creating a new object temporarily referenced

Re: Microsoft Hatred FAQ

2005-10-26 Thread David Schwartz
"Peter T. Breuer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In comp.os.linux.misc David Schwartz <[EMAIL PROTECTED]> wrote: > No they aren't. A pc o/s is something you load on an IBM pc, and an IBM > pc is an open format. There is no "microsoft computer", and there is no >

Re: Using Python to add thumbnails to Explorer

2005-10-26 Thread c d saunter
Hi Roger, Thanks for the info - I was actually interested in custom per file thumbnails rather than icons, but your message sentt me pouring through seemingly relevent parts of the registry - however what I need isn't there. Turns out I need to use a .dll shell

Re: 64 bit python binaries (or builds) for Xeon and Opteron architectures on Windows platforms

2005-10-26 Thread Larry Bates
We are running 64 bit compiled python on Red Hat Fedora Core 3. Hardware is 64 bit on Dual Opteron HP servers running SMP. FYI, Larry [EMAIL PROTECTED] wrote: > Does anyone have any information about 64 bit python support for Xeon > and Opteron architectures on Windows platforms? If anyone has bu

python in the news

2005-10-26 Thread [EMAIL PROTECTED]
http://software.itmanagersjournal.com/software/05/10/25/1631220.shtml... -- http://mail.python.org/mailman/listinfo/python-list

Re: How best to reference parameters.

2005-10-26 Thread Ron Adam
David Poundall wrote: > Sadly Ron, c_y can only see index and showall in your example. Well, don't give up! The approach is sound and I did say it was untested. Here's a tested version with a few corrections. :-) Cheers, Ron class Pump(object): def __init__(self, name, ptype, n

Re: assignment to reference

2005-10-26 Thread Michael Tobis
I apparently don't understand this question in the same way the way others do. I think the question is about the mutability of strings. To my understanding of your question, it is impossible, at least if the referenced objects are strings or other objects of immutable type. 'cabbage' cannot be c

syntax question - if 1:print 'a';else:print 'b'

2005-10-26 Thread Gregory Piñero
Any idea why I can't say: if 1:print 'a';else:print 'b' all in one line like that? It's just a random question I ran across a few days ago. -- Gregory PiñeroChief Innovation OfficerBlended Technologies(www.blendedtechnologies.com ) -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-26 Thread Peter T. Breuer
In comp.os.linux.misc David Schwartz <[EMAIL PROTECTED]> wrote: > "Peter T. Breuer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> In comp.os.linux.misc David Schwartz <[EMAIL PROTECTED]> wrote: > That doesn't at all address my point. The point is, there are large > numbers of

strange problems with urllib2

2005-10-26 Thread jdonnell
When I run this code on windows it runs quickly (about a second per image) but when I run it on linux it runs very very slowly (10+ seconds per image). Is this a bug or am I missing something? On windows I tried 2.4.2 and 2.4.1 on linux i'm running 2.4.1 print 'starting' f = urllib2.urlopen('http:

NEWBIE

2005-10-26 Thread brenden
hey everyonei'm new to all this programming and all this stuff and i just wanted to learn how to do it... does anyone think they can teach me how to work with python? i've been reading up a lot on it and i've downloaded the program and all that i'm just not quite following the whole thing...

Re: syntax question - if 1:print 'a';else:print 'b'

2005-10-26 Thread Fredrik Lundh
Gregory Piñero wrote: > Any idea why I can't say: > > if 1:print 'a';else:print 'b' > > all in one line like that? because ";" can only be used to separate simple statements, not the different parts in a compound statement. see the grammar for details: http://docs.python.org/ref/grammar.txt

Re: Pickle to source code

2005-10-26 Thread Gabriel Genellina
Jean-Paul Calderone ha escrito: > >In other words, I need a *string* which, being sent to eval(), would > >return the original object state saved in the pickle. > > You may find twisted.persisted.aot of some use. Here is an example: > > AOT is unmaintained in Twisted, and may not support some ne

Re: Pickle to source code

2005-10-26 Thread Gabriel Genellina
Olivier Dormond ha escrito: > > xxx = new.instance(MyClass, {'a':1,'b':2,'done':1}) > > > > In other words, I need a *string* which, being sent to eval(), would > > return the original object state saved in the pickle. > > Doesn't pickle.loads just do what you need ? e.g.: > > >>> pickled = file('

Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Chris F.A. Johnson
On 2005-10-26, Tim Golden wrote: > [Sybren Stuvel] > > Tim Golden enlightened us with: >> > Well, I'm with you. I'm sure a lot of people will chime in to point >> > out just how flexible and useful and productive Linux is as a >> > workstation, but every time I try to use it -- and I make an honest

Re: NEWBIE

2005-10-26 Thread beliavsky
brenden wrote: > hey everyonei'm new to all this programming and all this stuff and > i just wanted to learn how to do it... > > does anyone think they can teach me how to work with python? Don't waste readers' time with such vague and broad requests. Instead, post a specific question, for exa

<    1   2   3   >