Re: NEWBIE

2005-10-26 Thread BartlebyScrivener
Start here http://www.ibiblio.org/obp/thinkCSpy/ and here http://wiki.python.org/moin/BeginnersGuide bs -- http://mail.python.org/mailman/listinfo/python-list

mxODBC sql MSAccess

2005-11-21 Thread BartlebyScrivener
Hello, I'm new to python and trying to get records from an MSAccess database using mxODBC. It works, but the output is not formatted the way I want it. Here's the script: import mx.ODBC.Windows as odbc driv='DRIVER={Microsoft Access Driver (*.mdb)};DBQ=d:/Access Databases/Quotations2005' conn =

Re: mxODBC sql MSAccess

2005-11-21 Thread BartlebyScrivener
Works!! Thank you all so much. I didn't know it was coming back as a tuple, and I'm sure that would have taken me four hours to figure out. Appreciate it! bs Chris Curvey wrote: > mxODBC implements the Python DB-API spec, which states that each "row" > of query results is returned as

Re: Python book for a non-programmer

2005-11-25 Thread BartlebyScrivener
Simon Brunning wrote: > I have a non-programming friend who wants to learn Python. It's been > so long since I've been in her shoes that I don't feel qualified to > judge the books aimed at people in her situation. I know of two such > books: > > >

Re: How to get started in GUI Programming?

2005-11-25 Thread BartlebyScrivener
Search this group for PythonCard and wxPython for gobs of opinions. For descriptions of other resources, try: http://www.fredshack.com/docs/python.html bs -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get started in GUI Programming?

2005-11-25 Thread BartlebyScrivener
Search this group for PythonCard and wxPython for many posts on this subject. Also see the following link for descriptions of other alternatives: http://www.fredshack.com/docs/python.html bs -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get started in GUI Programming?

2005-11-25 Thread BartlebyScrivener
[EMAIL PROTECTED] wrote: > I am trying to learn GUI programming in Python, but have to confess I > am finding it difficult. > > I am not an experienced programmer - just someone who from time to > time writes small programs for my use. Over the years I have moved > from GWBASIC to QBASIC to Visua

Re: Looking for good beginner's tutorial

2005-11-29 Thread BartlebyScrivener
It's deja vu all over again. If the link breaks, search the group non-programming tutorial http://groups.google.com/group/comp.lang.python/browse_frm/thread/4b7a01e1feb128fa/a6b51baa0ca01c19?q=fehily+&rnum=10#a6b51baa0ca01c19 Good luck bs Roy Smith wrote: > My wife wants to learn Python. Can a

Re: Eclipse best/good or bad IDE for Python?

2005-12-03 Thread BartlebyScrivener
>>if it is the *best* IDE for Python. << Nobody can answer this for you. Just try them all. The two I like that I don't see mentioned in this thread are PythonCard (which is free) and WingWare (which costs $30.00 but you can try for free.) bs -- http://mail.python.org/mailman/listinfo/python-li

Python Equivalent to Text::Autoformat

2005-12-03 Thread BartlebyScrivener
I'm new to both Perl & Python. Is there a Python module or script somewhere comparable to the useful Perl module - Text::Autoformat? Thanks, BS -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Equivalent to Text::Autoformat

2005-12-04 Thread BartlebyScrivener
>>try searching on text wrapping<< I tried that before I posted. Text::Autoformat does a lot more than textwrap. "The fundamental task of the autoformat subroutine is to identify and rearrange independent paragraphs in a text. Paragraphs typically consist of a series of lines containing at least

Re: Python Equivalent to Text::Autoformat

2005-12-04 Thread BartlebyScrivener
Formatter and docutils both look promising. Thanks for providing the terminology to search on. -rpd -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-04 Thread BartlebyScrivener
>>Hmmm... I'm not an expert in this subject but isn't Ubuntu based on Debian? << I'm no expert either. I've played with Ubuntu and Debian, and Debian seemed infinitely more stable, and also, for me, Debian installed more easily. Since it's a python board I'm most interested in the python implicat

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-05 Thread BartlebyScrivener
Thank you, malv & Frederik, for the warnings. I am learning Python on windows with the hope of moving to Linux. I would have just assumed the new Python would be backward compatible and didn't realize how dependent the os was on the old version.. At least now I am aware of the issues. bs -- http

Re: Learning Python...

2005-12-05 Thread BartlebyScrivener
Wow, That's one I hadn't seen before. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Bitching about the documentation...

2005-12-05 Thread BartlebyScrivener
>> It's tough to put yourself in the shoes of a novice, so it's tough to write documentation that would be helpful for new users. It's extremely helpful if new users submit documentation patches as they figure things out. It's generally unnecessary to write large tomes. Often all that's needed is

Re: Bitching about the documentation...

2005-12-05 Thread BartlebyScrivener
Go to Python.org Click on DEVELOPERS The lead sentence says: Contributors and potential contributors should read Documenting Python, which describes in details the conventions and markup used in creating and maintaining the Python documentation. The CVS trunk version is the recommended version f

Re: Bitching about the documentation...

2005-12-05 Thread BartlebyScrivener
Thank you. I shall try that the next time I see something in the documentation for beginners. Generally the Python docs are quite good, in my opinion. I was merely taking issue with the poster who suggested that Python novices and nonprogrammers should complain less and contribute more. It's not im

Re: Bitching about the documentation...

2005-12-05 Thread BartlebyScrivener
>>Let me repeat this for the umpteenth time: You do not have to learn LaTeX to contribute to docs. << Noted. And thanks again to all who responded. The tone of this whole thing is really antagonistic in parts, which is unfortunate. I'll offer my services through the proper channels, because I appr

Re: Bitching about the documentation...

2005-12-05 Thread BartlebyScrivener
>>The solution is clear: the distro maintainers should require that all code contributions must come with good docs. When a code submission comes in, the distro maintainers should critically review the accompanying docs, note any shortcomings and constructively ask for improvements from the contri

Re: Bitching about the documentation...

2005-12-05 Thread BartlebyScrivener
>>Or, better still, by an accomplished writer who has access to the code's author. This was indeed my experience in writing the docs for previously undocumented modules. The author was happy to help me by answering questions, and this did make the docs better than they'd otherwise have been. << No

Re: Documentation suggestions

2005-12-06 Thread BartlebyScrivener
>> A series of examples seems more concrete than a formal description,<< Amen. This is why people buy the books: The good ones have lots of examples. The wizards glance at them in passing and think, "Duh." And the rest of us (including the intermediate folks, I'll bet) are grateful for the chance

Re: Documentation suggestions

2005-12-06 Thread BartlebyScrivener
You are correct about the tutorial. Just try to look at the home page through the eyes of a curious Windows user who wants to learn programming and is trying to decide whether to take up Perl, Ruby, Python, or Visual Basic, let's say. On the home page, the first link that catches the eye for this

Re: Documentation suggestions

2005-12-07 Thread BartlebyScrivener
Yep, Guido's tutorial belongs on the Python for Programmers page where people know who he is and are able to understand him. > Alan Gauld's tutorial is very popular on the > tutor list, so is A Byte of Python (which is not listed on the > NonProgrammers page). I would list them first. Or maybe tak

Re: Documentation suggestions

2005-12-07 Thread BartlebyScrivener
Might be better as: "Many popular tutorials use Python to teach computer programming, because Python is free, easy to learn, immediately useful, and fun!" -- http://mail.python.org/mailman/listinfo/python-list

Re: Documentation suggestions

2005-12-08 Thread BartlebyScrivener
Andrew, The site changes for the new-to-Python person are a big improvement in terms of the sequence of exposures, but from a marketing perspective, the first thing they read about Python is still aimed at a programmer. The bulleted points in BeginnersGuide/Overview are, again, things that are imp

Re: Bitching about the documentation...

2005-12-08 Thread BartlebyScrivener
The actress Margaret Anglin left this note in the dressing froom of another actress: 'Margaret Anglin says Mrs. Fiske is the best actress in America.' Mrs. Fiske added two commas and returned the note: 'Margaret Anglin, says Mrs. Fiske, is the best actress in America.' Or this, from a George Wil

Re: Documentation suggestions

2005-12-08 Thread BartlebyScrivener
You guys are all wizards from mars. If it's easy to do I can tell you that it would very seductive to a prospective Pythoner, and you avoid the problem of making them download before they can try out a tutorial. Thanks for looking at it. rd -- http://mail.python.org/mailman/listinfo/python-list

Re: Another newbie question

2005-12-09 Thread BartlebyScrivener
>>http://en.wikipedia.org/wiki/Law_of_Demeter << That was fun. Thanks, Kent. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to detect the presence of a html file

2005-12-09 Thread BartlebyScrivener
Even weirder, os.path.isfile(r'c://bookmarks.html') also seems to work. How is that? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to detect the presence of a html file

2005-12-09 Thread BartlebyScrivener
> Even weirder, > os.path.isfile(r'c://bookmarks.html') Never mind. It works that way from the command line, too. Never tried it before. rd -- http://mail.python.org/mailman/listinfo/python-list

Re: Documentation suggestions

2005-12-09 Thread BartlebyScrivener
Mike, This is probably a dumb thing to suggest, but I'm interested in knowing why it's dumb, if that makes sense? Could you use one of those free VMWare players? It makes a virtual operating system within an operating system as I understand it. http://www.vmware.com/products/player/ I just thin

Re: reddit.com rewritten in Python

2005-12-10 Thread BartlebyScrivener
More http://reddit.com/blog/2005/12/on-lisp.html and more http://www.findinglisp.com/blog/2005/12/reddit-and-lisp-psychosis.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Great books on Python?

2005-12-11 Thread BartlebyScrivener
http://www.awaretek.com/tutorials.html#regular -- http://mail.python.org/mailman/listinfo/python-list

mxODBC argv sql query

2005-12-12 Thread BartlebyScrivener
This can't be the most elegant way to get a command line parameter into an sql query. It works but I can't explain why. Is there another, more correct way? Here sys.argv[1] is a topic like "laugher" or "technology" import mx.ODBC.Windows as odbc import sys driv='DRIVER={Microsoft Access Driver (*

Re: Pattern matching with string and list

2005-12-13 Thread BartlebyScrivener
Taking you literally, I'm not sure you need regex. If you know or can find position n, then can't you just: sentence = "the color is $red" patterns = ["blue","red","yellow"] pos = sentence.find("$") for x in patterns: if x==sentence[pos+1:]: print x, pos+1 But maybe I'm oversimplifyin

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: 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

Re: Difference between ActivePython and Python.org

2005-12-14 Thread BartlebyScrivener
I fretted about which to pick and have advised here that the difference (if any) should be explained on the Python.org download page. I chose ActiveState because I'm on Windows XP, which means that the Win32 Extensions get installed automatically, along with other goodies (the PythonWin IDE, a pret

Re: Python packages on OS X vs Windows

2005-12-14 Thread BartlebyScrivener
> And on a somewhat related note, do people find ipython to be a decent > replacement > on Windows for the fact that the Windows shell is braindead? I'm curious about this part of the post. Any fluent Pythoners actually happy using Windows XP and, if so, do they use ipython as a kind of bash shell

Re: Python packages on OS X vs Windows

2005-12-15 Thread BartlebyScrivener
Mike, I nosed around after reading the posts herein. Have you heard of monad, the new Windows Command Shell in beta? http://www.microsoft.com/downloads/details.aspx?FamilyID=2ac59b30-5a44-4782-b0b7-79fe2efd1280&DisplayLang=en http://en.wikipedia.org/wiki/MSH_(shell) Or a better article: http:/

Re: Any good Python forums?

2005-12-15 Thread BartlebyScrivener
This is a helpful and active place. It works in tandem with Python.org, so the polite thing to do is check the FAQ at: http://www.python.org/doc/faq/ before posting, and also maybe search comp.lang.python first, especially if, for instance, you want to know about good Python books, popular IDEs, a

Re: text manipulation

2005-12-16 Thread BartlebyScrivener
John, Martin is right. Always try to solve without regex first. However, for those situations where you definitely need regex, use this tutorial: http://www.amk.ca/python/howto/regex/ It's well-written, succinct, and Python-specific. rpd -- http://mail.python.org/mailman/listinfo/python-list

Re: Wingide is a beautiful application

2005-12-18 Thread BartlebyScrivener
If you're on Windows XP why not try Xemacs? That's free and does syntax highlighting etc. Doesn't have a problem with large files and so on. rpd -- http://mail.python.org/mailman/listinfo/python-list

Re: Wingide is a beautiful application

2005-12-19 Thread BartlebyScrivener
Go to Options. Near the bottom, it will say "Edit Init.File" Click on it. Make an entry on a separate line near the top as follows (require 'python-mode) Then save the init file. When you open files with a .py extension xemacs should automatically go into "python mode" If you read the init.el

Re: Indentation/whitespace

2005-12-23 Thread BartlebyScrivener
What's needed is STRICTER whitespace enforcement, especially on April Fools Day. Some call it whitespace fascism. http://www.artima.com/weblogs/viewpost.jsp?thread=101968 rpd -- http://mail.python.org/mailman/listinfo/python-list

Re: Indentation/whitespace

2005-12-23 Thread BartlebyScrivener
The PEP is not a joke. It's a sensible set of guidelines. The blog post advocating enforcement is, shall we say, a sportive modest proposal? rpd www.dooling.com "There is no human problem which could not be solved if people would simply do as I advise."--Gore Vidal -- http://mail.python.org/mai

Re: Windows and python execution

2005-12-26 Thread BartlebyScrivener
Well, can't help with the registry, but I suppose you could search google for "edit system variables path registry" and find the hard way. The easy way is: You need to add the path of the directory where you keep myscript.py to your system path. You do this by going to Control Panel | System | Adv

Re: Windows and python execution

2005-12-26 Thread BartlebyScrivener
>> What you need to do is include the following line in autoexec.bat: >> set .py=c:\python24\python.exe Whatever works for you. I don't have that command in my autoexec.bat file and my python scripts execute from any location because the directory they are stored in is in my PATH variable. -- ht

Re: Windows and python execution

2005-12-26 Thread BartlebyScrivener
The installer can put python.exe in his PATH but if he's storing his scripts in some oddball place then he has to tell Windows where to find them. rpd -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows and python execution

2005-12-26 Thread BartlebyScrivener
>>What I was trying to do was execute a python script without having to type the word "python" explicitly. For that, you need the "set" command that I listed in a previous post.<< I'm not confused and I like to keep my scripts in oddball places too. Namely d:\python. All I'm saying is I don't use

Re: Windows and python execution

2005-12-28 Thread BartlebyScrivener
cussed, as long as the directory containing your scripts is in the path, you can type nothing by "myscript.py" at the command line and your script will execute from any location on the machine. rpd Peter Hansen wrote: > Peter Hansen wrote: > > BartlebyScrivener wrote: > >&g

Re: Spiritual Programming (OT, but Python-inspired)

2006-01-02 Thread BartlebyScrivener
"The highest activities of consciousness have their origins in the physical occurrences of the brain just as the loveliest of melodies are not too sublime to be expressed by notes."--Somerset Maugham -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie with some doubts.

2006-01-04 Thread BartlebyScrivener
Try this. http://www.ibiblio.org/g2swap/byteofpython/read/oops.html Best thing is to do a little reading, then wait until you have a problem or a project that would provide the occasion to create your first class. Then try it, and if it doesn't work, post it here with (1) what you were trying to

Python Scripts to logon to websites

2006-01-11 Thread BartlebyScrivener
New to Python and Programming. Trying to make scripts that will open sites and automatically log me on. The following example is from the urllib2 module. What are "realm" and "host" in this example. import urllib2 # Create an OpenerDirector with support for Basic HTTP Authentication... auth_hand

Re: Python Scripts to logon to websites

2006-01-11 Thread BartlebyScrivener
rticles/authentication.shtm Thanks for your help with the search terms. rpd l Peter Hansen wrote: > BartlebyScrivener wrote: > > New to Python and Programming. Trying to make scripts that will open > > sites and automatically log me on. > > > > The following example is from

Re: Python Scripts to logon to websites

2006-01-11 Thread BartlebyScrivener
Thanks, Peter. Peter Hansen wrote: > BartlebyScrivener wrote: > >>but googling for "basic authentication" and > >>maybe "realm" and/or "host" will find you other sites with less > >>technically detailed material. > > &

Re: Pythonic wrappers for SQL?

2006-01-15 Thread BartlebyScrivener
Just to chime in with Steve Holden on taking the why-not-learn-SQL route. Chris Fehily's new book, SQL, A Visual QuickStart Guide (2nd Ed) is a masterpiece and goes well on the bookshelf with his equally lucid Python QuickStart Guide. Cheap, too, for what you get. http://www.amazon.com/exec/obido

Re: Python and Word

2006-01-16 Thread BartlebyScrivener
How to automate Word http://www.faqts.com/knowledge_base/view.phtml/aid/37034/fid/244 rpd -- http://mail.python.org/mailman/listinfo/python-list

Re: Nit: please don't user "it's" unless you can substitute "it is" without changing your inteded meaning.

2006-01-18 Thread BartlebyScrivener
"The pronominal possessives hers, its, theirs, yours, and oneself have no apostrophe." Strunk & White, The Elements of Style. Section II.1 The Elements is a classic masterpiece of concision and lucidity, unlike Eats, Shoots, Sells Books, and Leaves. rpd -- http://mail.python.org/mailman/listin

Re: access to submodules

2006-07-19 Thread BartlebyScrivener
>> > from tom import * You CAN do this, but it's a bad habit. Try: >>import tom Then call by tom.function() rd -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple file writing techiques ...

2006-07-19 Thread BartlebyScrivener
See also this recent discussion on techniques for making sure you get the file closed, even if there is an exception. http://tinyurl.com/fryrv rd -- http://mail.python.org/mailman/listinfo/python-list

Re: access to submodules

2006-07-19 Thread BartlebyScrivener
http://tinyurl.com/6yz2g If you do from tom import * then you no longer need tom, you imported all of his FUNCTIONS (never heard of submodule). rd -- http://mail.python.org/mailman/listinfo/python-list

New Martelli Nutshell Out

2006-07-19 Thread BartlebyScrivener
My preordered copy of Python In A Nutshell just arrived from Amazon. http://tinyurl.com/pkczm Looking forward. rd -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows vs. Linux

2006-07-30 Thread BartlebyScrivener
Windows XP is fine. I am learning Python on Windows first with an eye toward moving to Linux. If you like, get the ActivePython distribution, which comes with the Win32 extensions. If you start liking Python, consider adding the IPython shell. There are commandline tweaks you can do to make the X

Re: Python help for Access database

2006-07-31 Thread BartlebyScrivener
John Machin wrote: >> or mxODBC >> [very good but not free]. I love mxODBC. It's free for noncommercial use. http://www.egenix.com/files/python/mxODBC.html rd -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming newbie coming from Ruby: a few Python questions

2006-08-01 Thread BartlebyScrivener
[EMAIL PROTECTED] wrote: > 'Clever is not considered a compliment in Python.' (don't know where I > read that...) "To describe something as clever is NOT considered a compliment in the Python culture."--Alex Martelli, Python Cookbook 2nd Ed. pg. 230 (a great book for learning by doing, after yo

Re: Programming newbie coming from Ruby: a few Python questions

2006-08-02 Thread BartlebyScrivener
[EMAIL PROTECTED] wrote: >> The Ruby crowd says you guys are no where >> near as friendly as them! Slander! Defamation! -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming newbie coming from Ruby: a few Python questions

2006-08-02 Thread BartlebyScrivener
Stand and fight, Python brothers. Fear not, the Ruby horde! From this day to the ending of the world, But we in it shall be remember'd; We few, we happy few, we band of brothers; For he to-day that sheds his blood with me Shall be my brother; be he ne'er so

Re: What is the best way to print the usage string ?

2006-08-03 Thread BartlebyScrivener
Leonel Gayard wrote: > > Notice that the string messes the indentation in my script. The > indentation is correct, and if the script is invoked without > arguments, the usage string is printed correctly. > > Now, how can I achieve the same result while keeping a clean > indentation ? How is this do

Re: programming is hard

2006-08-03 Thread BartlebyScrivener
Tim Chase wrote: > it may also be that "programmingishard...unless you use python" ;) > > -tkc Or if somebody made a site called programmingisfun.com, then you might find some Python snippets there. rd -- http://mail.python.org/mailman/listinfo/python-list

Re: format a number for output

2006-08-07 Thread BartlebyScrivener
abcd wrote: > if i have a number, say the size of a file, is there an easy way to > output it so that it includes commas? > > for example: > > 1890284 > > would be: > > 1,890,284 see also this thread: http://tinyurl.com/qf6ew rd -- http://mail.python.org/mailman/listinfo/python-list

Re: format a number for output

2006-08-07 Thread BartlebyScrivener
Paul Rubin wrote: > "To iterate is human; to recurse, divine": > > def commafy(n): >if n < 0: return '-' + commafy(-n) >if n >= 1000: return '%s,%03d' % (commafy(n//1000), n % 1000) >return '%s'% n > > I don't like the locale solution because of how messy locales are.

Re: A problem from a Vim user

2006-08-07 Thread BartlebyScrivener
manuhack wrote: > However, when I run > the same command in vim 7 as :py raw_input('Please type something.\n'), > there is an EOFError: EOF when reading a line. Is there a way to use > that command within vim without raising errors? I thought you might get more help here than in comp.editors ;)

Re: using python at the bash shell?

2006-08-08 Thread BartlebyScrivener
John Salerno wrote: > I like using Python for everything, and if I don't need to learn the > bash 'language', then I won't just yet. And like vim, Ipython works on both windows and ubuntu. rd -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question: what's with "self"?

2006-08-08 Thread BartlebyScrivener
donkeyboy wrote: >> but no-one has really spelt it out Go to: http://www.freenetpages.co.uk/hp/alan.gauld/ Look down the left-hand frames page until you see Advanced Topics | Object Oriented Programming Then find "What is self?" Good luck rd -- http://mail.python.org/mailman/listinfo/pyth

Re: Looking for an intellisense with good help IDE for Python

2006-08-08 Thread BartlebyScrivener
You don't say what platform you are using. The PythonWin IDE has really good code completion. Not all that you mention, but certainly methods etc. If you are on nix, then Komodo has it; not free, but only $30 for Komodo personal. rd -- http://mail.python.org/mailman/listinfo/python-list

Re: os.path.normpath

2006-08-09 Thread BartlebyScrivener
[EMAIL PROTECTED] wrote: > But if this string is going into a webpage link http://docs.python.org/lib/module-urlparse.html rd -- http://mail.python.org/mailman/listinfo/python-list

Re: Absolute beginner - is this feasible?

2006-08-10 Thread BartlebyScrivener
Michiel Sikma wrote: > I don't know if writing to a > Word file is possible. It's a proprietary format, afterall. see: Python To Word Capture script output in MS Word http://gflanagan.net/site/dotnet/05/RunPythonScriptFromWord.html rd -- http://mail.python.org/mailman/listinfo/python-list

Re: Recurse Directories and process files in directory

2006-08-12 Thread BartlebyScrivener
KraftDiner wrote: > Hi I need help writing a python script that traverses (recursivly) a > directory and its sub directories and processes all files in the > directory. There's a great os.walk + wrapper in the Python cookbook. I once had an unrelated problem with it, but check it out and see if it

Re: Installed correctly

2006-08-13 Thread BartlebyScrivener
Ray wrote: > are there any > problems with this? Apparently, yes ;) >> Do you know how to set up the %PATH% variable in win2k? In case you don't, this is from another thread: Sequence on XP is Start | Control Panel | System | Advanced | Environmental Variables. Then in the lower half of the di

Re: Installed correctly

2006-08-13 Thread BartlebyScrivener
Rich wrote: >> But command line still says "unrecognized command", You don't say which installer you are using? I know the ActiveState installer puts the python directory in your environment automatically, and I bet the Python.org installer does too. Do you see Python24 in your path? If you get

Re: how do you get the name of a dictionary?

2006-08-18 Thread BartlebyScrivener
Tim Chase wrote: > How would you ask for the object? > > >>> print get_name(banana) > > you might as well write > > >>> print "banana" > Or there used to be a guy in this group who said it was like asking a cat for its name. He headbanged himself unconscious though, or so they say. http://tinyur

Re: text editor suggestion?

2006-08-18 Thread BartlebyScrivener
John Salerno wrote: > Ok, I know it's been asked a million times, but I have a more specific > question so hopefully this won't be just the same old post. You got 65 answers last time :) http://tinyurl.com/rsfjq rd -- http://mail.python.org/mailman/listinfo/python-list

Re: text editor suggestion?

2006-08-19 Thread BartlebyScrivener
>> Oh well, I'll just keep trying different ones. If you demand power and cross-platform compatibility, I think you already know your choices are Xemacs or Vim 7.0. They are both modal and therefore difficult to learn, at first, but later you enjoy the pleasures of interface Zen: http://tinyurl.

Re: how do you get the name of a dictionary?

2006-08-21 Thread BartlebyScrivener
>> im quite surprised at the arrogance laid >> out by some of the above Oh, nobody is being arrogant. They're having fun while answering your question. Most remember having the same question, or at least making the same discovery after careful reading. rd -- http://mail.python.org/mailman/listi

Re: how do you get the name of a dictionary?

2006-08-22 Thread BartlebyScrivener
>> how difficult would it be to assign a string name(s) >> to an object upon creation (and upon referencing)? Exactly the point that's being made. It's so easy just do it yourself: banana={"name":"banana"} Hey what is the name of my dictionary? banana["name"] But why build it into Python and f

python 2.5 & sqlite3

2006-10-11 Thread BartlebyScrivener
Sorry, I have a knack for making things more difficult than they need to be. I'm on Windows XP and waiting for the ActiveState release of Python 2.5. I want to experiment with sqlite and I see that Python 2.5 has the "wrapper" but sqlite itself must be downloaded separately. I see no installation

Re: python 2.5 & sqlite3

2006-10-11 Thread BartlebyScrivener
Fredrik Lundh wrote: > wasting time on broken distributions? It's not broken. I like Pythonwin better than IDLE. Either way I need to know where to put the sqlite files, right? rd -- http://mail.python.org/mailman/listinfo/python-list

Re: python 2.5 & sqlite3

2006-10-11 Thread BartlebyScrivener
>> Looks like it could be from reading some >> build-Python-from-source instructions for Unix platforms ... Yes, Sorry. I read the doc too hastily. >> If you're compiling the Python source yourself, >> note that the source tree doesn't include the SQLite code, >> only the wrapper module. I'm

Re: Best IDE?

2006-10-13 Thread BartlebyScrivener
Ahmer wrote: > What do you guys use? > Why? http://tinyurl.com/ybg6p5 rd -- http://mail.python.org/mailman/listinfo/python-list

Re: Best IDE?

2006-10-14 Thread BartlebyScrivener
Fuzzyman wrote: > Hmm... only 31 results over a period of 8 years. That's a couple of > orders of magnitude less than I would have guessed. Well, if you take the quotes off of "best ide" then you get 342. rd -- http://mail.python.org/mailman/listinfo/python-list

help with my first use of a class

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

Re: help with my first use of a class

2006-10-19 Thread BartlebyScrivener
Whoah. At least I got the connection. I think. Maybe I can figure more on my own. Any help appreciated. Thanks - class Connection: def __init__(self, aDatasource): self.db = aDatasource self.conn = odbc.DriverConnect(self.db) self.conn.cursor() def random_quo

Re: help with my first use of a class

2006-10-19 Thread BartlebyScrivener
Wow, That's great, James. Thanks. I shall put it together. Appreciate it. rd -- http://mail.python.org/mailman/listinfo/python-list

Re: help with my first use of a class

2006-10-20 Thread BartlebyScrivener
Thanks, Bruno. Very educational. rd Bruno Desthuilliers wrote: > Think of a class as both a "blueprint" for objects and a factory > creating these objects. The class lets you define the attributes and > behaviors of it's instances. > > First, notice that you *don't* need a class here to avoid gl

Re: help with my first use of a class

2006-10-20 Thread BartlebyScrivener
Thank you all! My main problem is going away from Python and programming for weeks or months at a time, then picking up where I left off. But Python is much better in this regard than Perl. I appreciate the help. rd - Dennis Lee Bieber wrote: > If using a db-api compliant ada

Re: Use I the classes?

2006-10-20 Thread BartlebyScrivener
Fulvio wrote: > Looking for documents (free download) which clearly explain the way of > programming python classes and lots of examples as a bonus. http://www.freenetpages.co.uk/hp/alan.gauld/ On the frames page, go down to "Advanced Topics" and "Object Oriented Programming" And from the other

curious paramstyle qmark behavior

2006-10-20 Thread BartlebyScrivener
With aColumn = "Topics.Topic1"' The first statement "works" in the sense that it finds a number of matching rows. c.execute ("SELECT Author, Quote, ID, Topics.Topic1, Topic2 FROM QUOTES7 WHERE " + aColumn + " LIKE ?", ("%" + sys.argv[1] + "%",)) I've tried about 20 different variations on this

Re: curious paramstyle qmark behavior

2006-10-20 Thread BartlebyScrivener
Thanks, Jon. I'm moving from Access to MySQL. I can query all I want using Python, but so far haven't found a nifty set of forms (ala Access) for easying entering of data into MySQL. My Python is still amateur level and I'm not ready for Tkinkter or gui programming yet. rd -- Jon Cleme

  1   2   3   4   >