Re: reading/writing files

2007-11-27 Thread BartlebyScrivener
On Nov 27, 7:14 am, sandipm [EMAIL PROTECTED] wrote: f1= open(file1.pdf, rb) x = f1.read() open(file2.pdf, wb).write(x) works... thanks sandip You might also like: http://pybrary.net/pyPdf/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Books on Python

2007-11-27 Thread BartlebyScrivener
On Nov 27, 9:05 pm, barcaroller [EMAIL PROTECTED] wrote: Can someone kindly recommend some good books on the following: Python for beginners Python for advanced users http://wiki.python.org/moin/PythonBooks -- http://mail.python.org/mailman/listinfo/python-list

Re: Python web frameworks

2007-11-23 Thread BartlebyScrivener
I'm just learning Django and feeling my way through all of this server terminology. Where does Django's memcached feature fit into all of this? When you all speak of start up costs and memory intensive loading for each requests, doesn't the caching feature eliminate most of that overhead?

Re: Python web frameworks

2007-11-21 Thread BartlebyScrivener
On Nov 21, 4:42 am, joe jacob [EMAIL PROTECTED] wrote: Django is best among the frameworks so I downloaded it and I found it very difficult to configure. I referred the djangobook. It's not a turnkey type thing like WordPress or Joomla. It's a webframework. Also watch versions. The book

Re: Python web frameworks

2007-11-20 Thread BartlebyScrivener
On Nov 20, 6:19 am, joe jacob [EMAIL PROTECTED] wrote: There are a lot of web frameworks for python like django, mod_python, spyce, turbo gears, Zope, Cherrypy etc. Which one is the best in terms of performance and ease of study. I'm looking at django mainly. I hope the veterans jump in with

Re: Python web frameworks

2007-11-20 Thread BartlebyScrivener
On Nov 20, 3:39 pm, Graham Dumpleton [EMAIL PROTECTED] wrote: This only holds if actually hosted on Apache. As Django these days supports WSGI interface there is nothing to stop it being run with other hosting solutions that support WSGI. So, you could host it under paster or CherryPy WSGI

Re: Python too complex ?!?!?!

2007-11-17 Thread BartlebyScrivener
On Nov 17, 7:46 am, Brian [EMAIL PROTECTED] wrote: This person is a long-term Linux/C/Python programmer, but he claims that the install, config, and library models for C# have proved to be less problematic than Python. If his students have problems installing Python on Windows, show him this.

Re: subprocess chokes on spaces in path

2007-11-07 Thread BartlebyScrivener
On Nov 6, 2:48 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: Use a list of arguments [antiword, word_doc] and let subprocess handle the spaces the right way. Got it working. Thank you both. p = subprocess.Popen([antiword, word_doc], stdout=subprocess.PIPE) doc_text = p.stdout.read() rd

Re: regular expression syntax the same in Python, Perl and grep?

2007-11-07 Thread BartlebyScrivener
On Nov 7, 12:11 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: How similar is Python's re module (regular expressions) compared to Perl's and grep's regular expression syntaxes? http://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines rd --

subprocess chokes on spaces in path

2007-11-06 Thread BartlebyScrivener
Using bash on Debian Etch. If word_doc = sys.argv[1] and it's a file name like My\ Word.doc this function reads My and Word as two separate files unless the second '%s' is quoted. Took me a lot of trial and error to discover. Is this the most elegant way to do it? I was using popen originally,

Re: how to keep order key in a dictionary

2007-11-04 Thread BartlebyScrivener
On Nov 4, 7:19 am, azrael [EMAIL PROTECTED] wrote: For this dictionary it is realy important to keep the right order. Is it possible to arange them in a specific order? Not sure what order you want, but how about sorting the keys? def printdict(dict): print sorted key:value pairs keys =

Re: Python IDE

2007-11-03 Thread BartlebyScrivener
On Nov 3, 9:11 am, Simon Pickles [EMAIL PROTECTED] wrote: I need a Python IDE and debugger . . . I use vim on both Windows XP and Debian, but I used to use Komodo for big projects. Try the free trial of Komodo http://www.activestate.com/Products/komodo_ide/ It has what you want, and it comes

Re: python newbie

2007-11-02 Thread BartlebyScrivener
On Nov 2, 8:51 am, Jim Hendricks [EMAIL PROTECTED] wrote: New to python, programming in 15 or so langs for 24 years. Couple of questions the tuts I've looked at don't explain: Did you look at THE tut? You would seem to be the perfect reader for it, because you are already a programmer.

Re: python newbie

2007-11-02 Thread BartlebyScrivener
On Nov 2, 10:13 am, Jim Hendricks [EMAIL PROTECTED] wrote: Here's an example of what I am asking: Try this example from Beazley (pg 82) a = 42 def foo(): a = 13 foo() print a 42 By contrast: a = 42 b = 13 def foo(): global a, b a = 13 b = 0 foo() print a 13 print b 0 --

python tutorial on a single html page?

2007-11-02 Thread BartlebyScrivener
Is the main Python tutorial posted on single searchable page somewhere? As opposed to browsing the index and clicking NEXT etc. Thank you, rd -- http://mail.python.org/mailman/listinfo/python-list

Re: python in academics?

2007-10-30 Thread BartlebyScrivener
On Oct 29, 10:39 pm, sandipm [EMAIL PROTECTED] wrote: seeing posts from students on group. I am curious to know, Do they teach python in academic courses in universities? This came up a while back. See: http://tinyurl.com/2pjjua If that doesn't work, search the Google group for Python taught

Re: python2.5 and mysqldb

2007-10-30 Thread BartlebyScrivener
On Oct 29, 2:30 pm, brad [EMAIL PROTECTED] wrote: or get a more flexible OS that easily allows for this sort of thing (like Debian) Second that. Etch came with 2.3 and 2.4, and I added 2.5 and they never bother each other. rd -- http://mail.python.org/mailman/listinfo/python-list

Re: Readline and record separator

2007-10-30 Thread BartlebyScrivener
On Oct 30, 7:21 am, Johny [EMAIL PROTECTED] wrote: My problem is that my record consits several '\n' and when I use readline it does NOT read the whole my record. So If I could change '\n' as a record separator for readline, it would solve my problem. Python Cookbook (great book!) 2nd Ed pg.

Re: how to creating html files with python

2007-10-27 Thread BartlebyScrivener
On Oct 27, 12:02 pm, George Sakkis [EMAIL PROTECTED] wrote: The only strange thing here is that you think this is a strange requirement :) This is quite typical, and practically required for web development. I was wondering about this myself the other day. Suppose you wanted to get by on the

pydoc script.py vs. pydoc scriptpy

2007-10-20 Thread BartlebyScrivener
On Debian Etch, if ~/mypyscripts is in my bash PATH and also in PYTHONPATH, I get the following pydoc behaviors. Maybe this is intentional. I'm just checking to be sure I don't have something misconfigured in my environment. If I have two scripts or modules in ~/mypyscripts: one script.py and

Re: vi and python

2007-09-14 Thread BartlebyScrivener
On Sep 14, 7:35 pm, Danyelle Gragsone [EMAIL PROTECTED] wrote: Good Evening, I am running gentoo. I want to use vi to program in python. I wondered are there any other gentooovians out there who know if python support is already installed. http://tinyurl.com/2mzakm rd --

Re: Search path for python script

2007-09-12 Thread BartlebyScrivener
On Sep 12, 4:40 pm, grt [EMAIL PROTECTED] wrote: I'm trying to run a script by typing: python test.py What happens if you just type: test.py or test and hit Enter? rd -- http://mail.python.org/mailman/listinfo/python-list

Re: Is a Borg rebellion possible? (a metaclass question)

2007-09-07 Thread BartlebyScrivener
On Sep 7, 1:53 pm, Steve Holden [EMAIL PROTECTED] wrote: All you really need is to create your SplinterBorgs with appropriate group names, you don't neef subclasses at all: Dang. With that subject heading I thought this was about some post- Singularity, Python-programmed cyborgs rising up to

Re: Is a Borg rebellion possible? (a metaclass question)

2007-09-07 Thread BartlebyScrivener
On Sep 7, 1:53 pm, Steve Holden [EMAIL PROTECTED] wrote: All you really need is to create your SplinterBorgs with appropriate group names, you don't neef subclasses at all: oops, I tried this once and the link broke. I'll try tinyurl. Dang. With that subject heading I thought this was about

Re: why should I learn python

2007-09-06 Thread BartlebyScrivener
On Sep 6, 5:36 pm, André [EMAIL PROTECTED] wrote: Easy to read, easy to write, good libraries and, I have found, an extremely helpful community. Hobbyists (like me) can work on projects written in Python on and off (sometimes for weeks if not months without programming) and be able to

Re: Baby Steps, optionDB

2007-08-22 Thread BartlebyScrivener
On Aug 22, 10:41 pm, W. Watson [EMAIL PROTECTED] wrote: clError: couldn't open optionDB: no such file or directory Because the file doesn't exist? Did you make an optionDB file? http://tinyurl.com/283o98 -- http://mail.python.org/mailman/listinfo/python-list

Re: A problem with Time

2007-08-16 Thread BartlebyScrivener
On Aug 16, 10:54 am, Diez B. Roggisch [EMAIL PROTECTED] wrote: RTFM is the answer... I don't know. I remember scratching my head for a day or two over the module explanations and instructions until I found a little howto with a lot of explicite examples.

Re: Simple python iteration question

2007-08-15 Thread BartlebyScrivener
On Aug 14, 11:59 am, Shawn Milochik [EMAIL PROTECTED] wrote: Just for my own sanity: Isn't this the third response advocating the use of enumerate()? Did the other responses not get through, or was this a time-delay thing? Thanks, Shawn Look at the timestamps. All within ten minutes. And

Re: 'Advanced' list comprehension? query

2007-08-08 Thread BartlebyScrivener
On Aug 8, 11:00 am, [EMAIL PROTECTED] wrote: Hi, I'm playing around with list comprehension, and I'm trying to find the most aesthetic way to do the following: I have two lists: noShowList = ['one', 'two', 'three'] myList = ['item one', 'item four', 'three item'] I want to show all the

Re: the one python book

2007-08-04 Thread BartlebyScrivener
On Aug 4, 8:23 am, dhr [EMAIL PROTECTED] wrote: newbie question: Is there a 'KR type of Python book? The book that you'd better have on your shelf if you are going into Python? I second the comment about the Official Python Tutorial, however you did say, on the shelf in which case I would

Re: i am new to python-Please somebody help

2007-08-02 Thread BartlebyScrivener
On Aug 2, 4:31 am, [EMAIL PROTECTED] wrote: i want the packages file with a .gz extension by implementing a python program http://docs.python.org/lib/module-gzip.html -- http://mail.python.org/mailman/listinfo/python-list

Re: how to get next month string?

2007-07-24 Thread BartlebyScrivener
On Jul 24, 5:31 am, Yinghe Chen [EMAIL PROTECTED] wrote: Hi, Could someone help on how to use python to output the next month string like this? AUG07, suppose now is July 2007. I usually find time and date answers somewhere in here:

Re: Where do they tech Python officialy ?

2007-07-23 Thread BartlebyScrivener
On Jul 23, 11:52 am, NicolasG [EMAIL PROTECTED] wrote: Does some one have any suggestions on which University to attend ? Alternatives solutions are welcome.. You might like this thread. Or go to comp.lang.python and search for python taught in schools http://tinyurl.com/2zlsxl rd --

Re: Python and Tkinter Primer/Tutorial?

2007-07-15 Thread BartlebyScrivener
On Jul 15, 9:46 am, W. Watson [EMAIL PROTECTED] wrote: Is there a primer out there on these two items? I have the Python tutorial, but would like either a Tkinter tutorial/primer to supplement it, or a primer/tutorial that addresses both. http://www.freenetpages.co.uk/hp/alan.gauld/tutgui.htm

Re: Learning Basics

2007-07-09 Thread BartlebyScrivener
On Jul 8, 12:10 pm, Brad [EMAIL PROTECTED] wrote: So I'd appreciate some good feedback or ideas. I addition to Dan's suggestions, you could add a Tk text entry box to make it easier to enter text. I can send you some code if you'd like, as Steve Holden just generously helped me make a text

Re: Evolution of a pythonistas!

2007-06-28 Thread BartlebyScrivener
On Jun 28, 6:46 am, swordofrue [EMAIL PROTECTED] wrote: Hello everyone, How does a pythonistas evolve? Get the Python Cookbook 2d, pick a useful looking project, and adapt it for your own needs. Learn by doing. Some people enjoy just doing the tutorials with the interpreter open, testing code

Re: Evolution of a pythonistas!

2007-06-28 Thread BartlebyScrivener
On Jun 28, 8:02 am, Sells, Fred [EMAIL PROTECTED] wrote: concur 100%. snip Get a python aware editor. I use Eclipse+PyDev for big jobs, but still use Emacs with python-mode for quickies. Just when I was thinking we agreed! :) Get Vim! http://www.vim.org And the Cookbook

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread BartlebyScrivener
On Jun 22, 3:47 pm, Twisted [EMAIL PROTECTED] wrote: If it requires years of mastery, it is clunky Well, now you keep harping on this, but it's just not true. I use vim myself, but for purposes of this argument it doesn't matter. If you take the Vim tutorial and use the help (which appears in

Re: The Modernization of Emacs

2007-06-20 Thread BartlebyScrivener
On Jun 17, 10:13 am, Xah Lee [EMAIL PROTECTED] wrote: [this post is a excerpt from The Modernization of Emacs SIMPLE CHANGES At the command line, change emacs to gvim http://pinard.progiciels-bpi.ca/opinions/editors.html rd --

Re: The Modernization of Emacs

2007-06-20 Thread BartlebyScrivener
On Jun 20, 3:53 pm, Twisted [EMAIL PROTECTED] wrote: On Jun 20, 4:21 pm, BartlebyScrivener [EMAIL PROTECTED] wrote: On Jun 17, 10:13 am, Xah Lee [EMAIL PROTECTED] wrote: [this post is a excerpt from The Modernization of Emacs SIMPLE CHANGES

Re: Python IDE

2007-06-19 Thread BartlebyScrivener
On Jun 19, 5:39 am, Tom Gur [EMAIL PROTECTED] wrote: Hi, which IDE would you recommend for a python ? VIM But if you crave distraction. http://wiki.python.org/moin/PythonEditors rd -- http://mail.python.org/mailman/listinfo/python-list

Re: Want to learn Python

2007-06-15 Thread BartlebyScrivener
On Jun 15, 6:41 am, Amol [EMAIL PROTECTED] wrote: Hi, I want to learn Python in less than a month which resources should I use. I prefer to read books . Please give me a list of *recognized* resources. Thank You all Python Essential Reference, David Beazley, 3rd edition Feb 2006 great, esp. if

Re: How to save python codes in files?

2007-06-14 Thread BartlebyScrivener
On Jun 13, 12:04 am, why? [EMAIL PROTECTED] wrote: Im working with Python 2.2 on my red hat linux system. Is there any way to write python codes in separate files and save them so that i can view/edit them in the future? Actually I've just started with python and would be grateful for a

Re: Accessing attributes?

2007-06-12 Thread BartlebyScrivener
On Jun 12, 5:04 am, Jeff Rollin [EMAIL PROTECTED] wrote: Where am I going wrong? Many TIA for any help. Look at your code, then look at swaroop's http://tinyurl.com/2v5zze Line up all your defs at the same indent and they should work. -- http://mail.python.org/mailman/listinfo/python-list

Re: VIM editor question

2007-06-09 Thread BartlebyScrivener
On Jun 9, 1:14 am, Jerry VanBrimmer [EMAIL PROTECTED] wrote: In your vim configuration file enter: colorscheme name Example: colorscheme elflord Restart vim. No! That's completely wrong. It should be: colorscheme moria set bg=dark http://www.vim.org/scripts/script.php?script_id=1464

Re: VIM editor question

2007-06-09 Thread BartlebyScrivener
On Jun 9, 9:56 am, Joe Riopel [EMAIL PROTECTED] wrote: I use vim on both Windows and UNIX/Linux, and found this vimrc file.http://darksmile.net/software/.vimrc.html It's pretty good and has good comments. You might want to take a look at that and customize it. Plus this is

Re: VIM editor question

2007-06-09 Thread BartlebyScrivener
On Jun 9, 1:23 pm, Jerry Van Brimmer [EMAIL PROTECTED] wrote: On 6/9/07, BartlebyScrivener [EMAIL PROTECTED] wrote: No! That's completely wrong. No, it's not *completely* wrong. Yes, I should have mentioned the bg=dark entry, but that doesn't make it *completely* wrong. you're just showing

Re: Baffled on Windows.

2007-06-07 Thread BartlebyScrivener
On Jun 7, 8:17 am, Neil Cerutti [EMAIL PROTECTED] wrote: I have the following Python program: Running this program with 2.5.1 causes another Python script in the same directory to be loaded . . . 'new.py' A good habit for naming your scripts: If you have a script and you want to name it

Re: MySQL InterfaceError

2007-06-07 Thread BartlebyScrivener
On Jun 7, 10:09 am, Joe [EMAIL PROTECTED] wrote: And, yes, printing the error message returns absolutely nothing. The tuple following InterfaceError is both the error code and message. Unfortunately, it will only give me (0, '') which isn't much help. I'm on Google groups and can't see the

Re: *args and **kwargs

2007-06-05 Thread BartlebyScrivener
On Jun 5, 7:31 am, Diez B. Roggisch [EMAIL PROTECTED] wrote: JonathanB wrote: Ok, this is probably definitely a newbie question, but I have looked all over the Python library reference material and tutorials which I can find online and I cannot find a clear definition of what these are

webbrowser.open launches firefox in background

2007-06-04 Thread BartlebyScrivener
Hello, On Debian Etch, when I use the webbrowser.open module to launch firefox with a url, it opens UNDER gnome terminal in the background. If I just launch firefox from the commandline, it opens in the foreground. Any ideas about why? Is there a command option I'm missing. Thanks, Rick --

Re: paste text with newlines into raw_input?

2007-05-31 Thread BartlebyScrivener
Thanks, I think I need a Tkinter text entry widget, but it will take me a week to learn how to set it up. I'll report back. rick -- http://mail.python.org/mailman/listinfo/python-list

Re: paste text with newlines into raw_input?

2007-05-31 Thread BartlebyScrivener
Hi, I'm going to post this here in case somebody else searches for an example Tkinter Text Widget for entering multiline text. I don't like GUI and don't even quite understand how it works, but it seems to work. In my case it's part of a program for pasting a quote from the clipboard into a MySQL

paste text with newlines into raw_input?

2007-05-30 Thread BartlebyScrivener
Using Python on Debian Etch. What is the best way to paste a block of text in at the command prompt. I'm trying something like: Quote = raw_input(Paste quote here: ) Which works great for one line of text with a single newline. It gets stripped. Okay. Is there a way to paste in a block of

Re: wxpython demo error on debian etch

2007-05-30 Thread BartlebyScrivener
On May 29, 1:09 pm, [EMAIL PROTECTED] wrote: The newer versions of wxPython won't make your Debian crash or anything. We run Debian at work and I've upgraded the Python to 2.4 and the wxPython to its newest version. This has not affected the server's stability in any way. Install like this?

wxpython demo error on debian etch

2007-05-29 Thread BartlebyScrivener
If there is a wxPython on Debian user in the house? I am using the version of the demo that came with the apt-get download of wxPython. I thought I'd followed the instructions for installing and unpacking the wxPython demo program. It appears to run after a fashion, but I also get this at the

Re: wxpython demo error on debian etch

2007-05-29 Thread BartlebyScrivener
On May 29, 8:51 am, [EMAIL PROTECTED] wrote: The wxPython website details how to get the latest version of wxPython (2.8.4) I'm fairly new to Linux, so I probably shouldn't mess with my stable Etch. I'll make do with this version of wxPython or go back to puzzling over Tkinter. Thanks, rick

Re: wxpython demo error on debian etch

2007-05-29 Thread BartlebyScrivener
On May 29, 1:09 pm, [EMAIL PROTECTED] wrote: The newer versions of wxPython won't make your Debian crash or anything. Thanks, mike, i'll try it. rick -- http://mail.python.org/mailman/listinfo/python-list

Tkinter error

2007-05-28 Thread BartlebyScrivener
Finally started trying to build a simple gui form for inserting text data into a mysql db of quotations. I found this nice Tkinter tutorial, http://www.ibiblio.org/obp/py4fun/gui/tkPhone.html but midway I'm getting an error. from Tkinter import * win = Tk() f = Frame(win) b1 = Button(f,

Re: Tkinter error

2007-05-28 Thread BartlebyScrivener
On May 28, 4:57 pm, Peter Otten [EMAIL PROTECTED] wrote: b1 = Button(win,text=One) b2 = Button(win,text=Two) That worked. Thank you. Rick -- http://mail.python.org/mailman/listinfo/python-list

Re: ten small Python programs

2007-05-27 Thread BartlebyScrivener
On May 26, 1:43 pm, Steve Howell [EMAIL PROTECTED] wrote: -- parentRabbits, babyRabbits = (1, 1) while babyRabbits 100: print 'This generation has %d rabbits' % babyRabbits parentRabbits, babyRabbits = (babyRabbits, parentRabbits + babyRabbits) --

Re: Iron Python

2007-05-15 Thread BartlebyScrivener
On May 15, 5:22 am, John Machin [EMAIL PROTECTED] wrote: Anybody tried it? Me. Me too. Anybody like it? rd -- http://mail.python.org/mailman/listinfo/python-list

Re: need help with python

2007-05-13 Thread BartlebyScrivener
On May 13, 10:10 am, [EMAIL PROTECTED] wrote: That is one of my problems, I don't know exactly how the whole command line thing works. That's why I pointed you to the link. The ActiveState distribution will automatically add the correct paths to your environment and tell Windows that .py files

Re: GUI tutorial

2007-05-13 Thread BartlebyScrivener
On May 13, 12:51 pm, John K Masters [EMAIL PROTECTED] wrote: Can someone point me in the direction of a good tutorial on programming python with a GUI? Alan Gauld added a gui programming tutorial to his main course. http://www.freenetpages.co.uk/hp/alan.gauld/ It's a frame page so I can't

Re: path stuff

2007-05-12 Thread BartlebyScrivener
On May 9, 1:11 pm, fscked [EMAIL PROTECTED] wrote: I am walking some directories looking for a certain filename pattern. This part works fine, but what if I want to exclude results from a certain directory being printed? You might find this thread helpful http://tinyurl.com/2guk3l Note how

Re: need help with python

2007-05-12 Thread BartlebyScrivener
I'm not sure how you installed Python, or how you are using it, but I made something last year to help Windows XP users who are brand new to Python and can't get things to run, etc. You might try either jumping into somewhere midway, or if you keep having trouble, uninstall whatever you installed

Re: preferred windows text editor?

2007-05-09 Thread BartlebyScrivener
On May 9, 1:26 pm, Looney, James B [EMAIL PROTECTED] wrote: I'm using Vim (http://www.vim.org/). I too vote for VIM. I use it on both Windows XP and Debian Etch. I can't find anything it doesn't do. rd -- http://mail.python.org/mailman/listinfo/python-list

Re: Wanted: Email Client with GUI

2007-04-18 Thread BartlebyScrivener
On Apr 18, 9:25 am, Franz Steinhaeusler [EMAIL PROTECTED] wrote: What I want is a program (it doesn't have to be so sophisticated as thunderbird) written totally in python and using a gui toolkit like pyqt, pygtk, wxpyhton or tkinter. Why reinvent the wheel? Why not use Mutt and then call

Re: Mastering Python

2007-03-16 Thread BartlebyScrivener
On Mar 16, 8:39 am, Paul McGuire [EMAIL PROTECTED] wrote: Wow, are you still reading? Quit wasting time and go download a Python dist and get started already! I think you should extract that and spend twenty minutes tidying it up and then publish it to the Python for Programmers page or make

Re: Python books?

2007-03-14 Thread BartlebyScrivener
On Mar 14, 3:50 pm, [EMAIL PROTECTED] (Aahz) wrote: Some people prefer shorter books -- Python for Dummies (for new programmers) and Python in a Nutshell (for experienced programmers) both try to give a thorough survey of Python while keeping the book easy to carry. And other people like

python equivalent of bash find

2007-03-01 Thread BartlebyScrivener
I recently moved from XP to Linux, but would like to use Python whenever possible. line from bash script: find ~/Mail -xdev -type f \( -mtime 0 -or -mtime 1 \) -exec cp -aPvu {} /backup-dest \; What modules would I use to accomplish this in Python? Or any other Python tricks to copy or backup

Re: python equivalent of bash find

2007-03-01 Thread BartlebyScrivener
You can probably replicate that using the modules os and shutil. Thank you both for the quick response. rd -- http://mail.python.org/mailman/listinfo/python-list

Re: python equivalent of bash find

2007-03-01 Thread BartlebyScrivener
On Mar 1, 3:58 pm, Bruno Desthuilliers [EMAIL PROTECTED] wrote: MHO is that you'd better learn linux (well... Unix) tools. Reinventing the SquareWheel(tm) is usually not a good idea. I agree. It's just a matter of experience and learning when to use Unix tools and when to use Python. The

Re: How can I access data from MS Access?

2007-02-06 Thread BartlebyScrivener
On Feb 5, 4:52 am, Andy Dingley [EMAIL PROTECTED] wrote: On 3 Feb, 15:43, [EMAIL PROTECTED] wrote: How to access data from MS Access? First of all check that the DSN is working and connects to the back end MDB. This might not be Python's problem. Secondly check whatever errors you're

GetBoundingMetrics

2007-01-22 Thread BartlebyScrivener
Hi, I have been moving from Windows XP to Debian Etch. Most of my Python scripts work fine with minor modifications. However, I have a script that launches a browser and goes to various sites using the Python module webbrowser.open (url-goes-here) On Debian Etch, Firefox (or IceWeasel, I guess)

Re: GetBoundingMetrics

2007-01-22 Thread BartlebyScrivener
BartlebyScrivener wrote: I don't get it if I just launch firefox from the commandline. Only when I use the Python module. I spoke too soon. I do get it from the command line if firefox is not already running. Same is true with the Python script. Must be a Gnome or Debian thing. Sorry

Re: indentation in python

2007-01-13 Thread BartlebyScrivener
lee wrote: Can anyone tell me the basics about indentation in python..how we use it in loops and constructs..etc http://docs.python.org/tut/node5.html#SECTION00520 -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a perl hash in python

2007-01-12 Thread BartlebyScrivener
Karyn Williams wrote: For future reference, why is direct use of the string module frowned upon, and what does one use instead ? Karyn, http://docs.python.org/lib/node42.html rd -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie: what is a usefull IDE for Python on Windows ?

2006-12-23 Thread BartlebyScrivener
in addition to the effbot link, search the group http://tinyurl.com/yyuxco -- http://mail.python.org/mailman/listinfo/python-list

Re: python poetry?

2006-12-20 Thread BartlebyScrivener
Michael Spencer wrote: I wrote the following in response to Steve Holden's limerick challenge a couple of years ago: Thanks! I found some of these searching the clp google group. rd -- http://mail.python.org/mailman/listinfo/python-list

python poetry?

2006-12-19 Thread BartlebyScrivener
I'm working on a book of technology and computer programming humor. First, can anybody recommend any other such books? And second is there a repository of Python poetry, poems translated into Python, or humorous Python pseudo code limericks anywhere? I'm making my way through The Larch, but if

Re: python poetry?

2006-12-19 Thread BartlebyScrivener
Bruno Desthuilliers wrote: You of course already know . . . and BOFH (aka the Bastard Operator From Hell') ? Didn't know this one. It's funny! Thanks rd -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-14 Thread BartlebyScrivener
Fredrik Lundh wrote: is this an ActiveState build? Yes, I think I mentioned it further up the thread. what's sys.prefix and sys.exec_prefix set to on your machine, btw? 'C:\\Python24' No big deal. I always just assumed that it found my scripts via the path variable. As long as it finds

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-14 Thread BartlebyScrivener
Fredrik Lundh wrote: have you searched the *entire* registry for the PythonCore key? (python looks under HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER) I found it in the Scripts key! I was searching on PythonPath before. Sorry. Thank you for the enlightenment. rd --

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-13 Thread BartlebyScrivener
Fredrik Lundh wrote: Python does *not* use the Path when searching for modules; sys.path is initialized based on the contents of PYTHONPATH, the location of the Python executable (or PYTHONHOME), some heuristics, and certain registry entries. Now I'm stumped. Unless it's heuristics. The

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-13 Thread BartlebyScrivener
Gabriel Genellina wrote: import sys print sys.path and see what's there. Yup. Did that before. That's what I mean. The d:\\python is there and it doesn't come from the PythonPath in my windows registry. Maybe it scans for any directory with python in the name? ['',

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-13 Thread BartlebyScrivener
Fredrik Lundh wrote: what do you get if you do: python -S ... import sys sys.path ['', 'C:\\WINDOWS\\system32\\python24.zip', 'd:\\python', 'C:\\Python24\\DLLs', 'C:\\Python24\\lib', 'C:\\Python24\\lib\\plat-win', 'C:\\Python24\\lib\\lib-tk', 'C:\ \Python24'] and then import site

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-13 Thread BartlebyScrivener
jay graves wrote: Do you have any *.pth files in the C:\Python24 directory? No. -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-12 Thread BartlebyScrivener
Gabriel Genellina wrote: There was an error in a previous post, you should create a variable called PYTHONPATH, not change the system PATH. Or, group your modules into packages and put them below lib\site-packages. Perhaps your way works also, but I have no PythonPath defined in system

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-11 Thread BartlebyScrivener
mohan wrote: I had created my own modules (.py files) in drives and folders other than the python root. Probably easiest if you keep them all in one place. Then add that place to your path by going into Control Panel|System|Advanced|Environment Variables and adding the path to the path

Re: Active State and Komodo...

2006-11-24 Thread BartlebyScrivener
Steve Thompson wrote: I was wondering the differnced there were betwee Active State's python and the open source version of python. The biggest difference at the moment is that ActiveState is still using Python 2.4.3 in their distribution. They should be coming out with 2.5 soon. Sounds like

Re: Active State and Komodo...

2006-11-24 Thread BartlebyScrivener
Steve Thompson wrote: On Fri, 24 Nov 2006 06:35:21 -0500, Steve Thompson wrote: Addionally, is the eric IDE (version 3) an acceptible IDE or are there more easy and more productive IDE's for perl? Perl? You're on a Python list? Anyway, the subject of IDEs comes up every other day. If you

Re: synching with os.walk()

2006-11-24 Thread BartlebyScrivener
Antoine De Groote wrote: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/191017 might be what you are looking for, or at least a starting point... There's an updated version of this script at pages 403-04 of the Python Cookbook 2nd Edition. rd --

Re: Caution newbie question: python window to stay open ?

2006-11-21 Thread BartlebyScrivener
mkengel wrote: Caution: newbie question If you're pretty sure it's a common newbie question, then begin by going to the Google repository at: http://groups.google.com/group/comp.lang.python Search in the box at upper right, on, say, keep cmd window open, or keep dos window open. Like so:

Re: How do I stop Python IDLE (GUI) from immediately exiting when I enter it?

2006-11-19 Thread BartlebyScrivener
John (Z R) L wrote: But after clicking run module Being new is never problem, but do learn to provide concise, complete descriptions of exactly what happened and what you were doing at the time. Are you in IDLE? Or are you in PythonWin? OR did you make a script file and try to run it by

Re: another newbie question

2006-11-14 Thread BartlebyScrivener
Lots of smart, patient people here, but they can't help you until you provide a lot more information and the actual error messages you are getting and whether they are spawned by Python or MySQL, if that is indeed the db you are using. Where did you get the idea that Python might be involved?

Re: Pyro stability

2006-11-08 Thread BartlebyScrivener
Some guy hit my fender, and I said to him, 'Be fruitful and multiply,' but not in those words. --Woody Allen Language is a virus from outer space. --William Burroughs -- http://mail.python.org/mailman/listinfo/python-list

Re: profanity on comp.lang.python (was Re: Pyro stability)

2006-11-08 Thread BartlebyScrivener
[EMAIL PROTECTED] wrote: I'm with Beliavsky on this one. I can't see any particular reason to curse in a forum such as c.l.py. It just coarsens the discussion with no obvious positive benefit as far as I can see. All true. But it's like picking your nose. Yes, it's bad manners in public,

Re: Python to tell what is the IP of my PC .

2006-11-08 Thread BartlebyScrivener
NicolasG wrote: How can I use python to get the real IP address of my DSL router http://whatismyip.com rd -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlite query not working

2006-11-07 Thread BartlebyScrivener
John Salerno wrote: Ah well, I'm sure there was *something* different Are you sure that it's not you were doing SELECT before, as opposed to INSERT? rd -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   >