Re: rmtree message

2017-09-13 Thread Sean DiZazzo
On Wednesday, September 13, 2017 at 12:06:20 PM UTC-7, larry@gmail.com wrote: > I have a script that creates a tmp dir, create a lot of files in it, > and when done, does a rmtree on the dir. When it does that I get this > message: > > shell-init: error retrieving current directory: getcwd: c

Re: Python dress

2017-09-13 Thread Sean DiZazzo
On Tuesday, September 12, 2017 at 9:18:12 AM UTC-7, larry@gmail.com wrote: > Not too many females here, but anyway: > > https://svahausa.com/collections/shop-by-interest-1/products/python-code-fit-flare-dress > > (And if any guys want to wear this, there's nothing wrong with that.) I'm going

Re: Python dress

2017-09-13 Thread Sean DiZazzo
On Wednesday, September 13, 2017 at 3:02:18 PM UTC-7, bream...@gmail.com wrote: > On Wednesday, September 13, 2017 at 10:43:47 PM UTC+1, Sean DiZazzo wrote: > > On Tuesday, September 12, 2017 at 9:18:12 AM UTC-7, larry@gmail.com > > wrote: > > > Not too many

Re: A good way to unpack a matrix

2017-09-13 Thread Sean DiZazzo
On Wednesday, September 13, 2017 at 7:53:25 PM UTC-7, Andrew Zyman wrote: > hello, > is there a better approach to populating a function in this situation? > > res = self.DB.getPrice(): # returns array of 3x2 always. symbol_id, > symbol, price. > > var1 = self.AFunction(symbols=res[0][2] + '.'

Re: the core values of the Python "platform"

2017-09-13 Thread Sean DiZazzo
On Wednesday, September 13, 2017 at 6:16:58 AM UTC-7, leam hall wrote: > On Wed, Sep 13, 2017 at 9:08 AM, Darin Gordon wrote: > > > Bryan Cantrill gave an interesting talk recently at a Node conference about > > "platform values" [1]. The talk lead me to think about what the core values > > of th

Re: "tkinter"

2017-09-13 Thread Sean DiZazzo
On Wednesday, September 13, 2017 at 7:21:25 PM UTC-7, Grant Edwards wrote: > On 2017-09-13, Ben Finney wrote: > > > The toolkit in question is named “tk”, which I have only ever known to > > be pronounced “tee kay”. > > > > The rest of the word is an abbreviation of “interface”. > > > > So, to me

Create an alias to an attribute on superclass

2018-02-01 Thread Sean DiZazzo
Hi! I basically just want to create an alias to an attribute on an item's superclass. So that after I create the subclass object, I can access the alias attribute to get the value back. class Superclass(object): def __init__(self, value): """ I want to pass x by refere

Re: Create an alias to an attribute on superclass

2018-02-01 Thread Sean DiZazzo
On Thursday, February 1, 2018 at 10:37:32 AM UTC-8, Chris Angelico wrote: > On Fri, Feb 2, 2018 at 5:22 AM, Sean DiZazzo wrote: > > Hi! > > > > I basically just want to create an alias to an attribute on an item's > > superclass. So that after I create the s

Re: Create an alias to an attribute on superclass

2018-02-01 Thread Sean DiZazzo
On Thursday, February 1, 2018 at 10:23:06 AM UTC-8, Sean DiZazzo wrote: > Hi! > > I basically just want to create an alias to an attribute on an item's > superclass. So that after I create the subclass object, I can access the > alias attribute to get the value back. >

Re: a simple question

2021-07-29 Thread Sean DiZazzo
On Tuesday, July 27, 2021 at 5:05:27 AM UTC-7, Terry Reedy wrote: > On 7/26/2021 6:19 PM, Glenn Wilson via Python-list wrote: > > I recently downloaded the latest version of python, 3.9.6. Everything works > > except, the turtle module. I get an error message every time , I use basic > > command

Re: [Errno 2] No such file or directory:

2021-07-30 Thread Sean DiZazzo
On Thursday, July 29, 2021 at 7:42:58 AM UTC-7, joseph pareti wrote: > indeed. There are better options than the one I attempted. Thanks for the > advice > > Am Mi., 28. Juli 2021 um 18:19 Uhr schrieb Chris Angelico >: > > On Thu, Jul 29, 2021 at 2:10 AM joseph pareti > > wrote: > > > > > >

Re: Defining a Python enum in a C extension - am I doing this right?

2021-08-03 Thread Sean DiZazzo
On Tuesday, August 3, 2021 at 3:04:19 AM UTC-7, Bartosz Golaszewski wrote: > On Sat, Jul 31, 2021 at 3:01 PM Bartosz Golaszewski wrote: > > > > On Fri, Jul 30, 2021 at 2:41 PM Serhiy Storchaka wrote: > > > > > > 23.07.21 11:20, Bartosz Golaszewski пише: > > > > I'm working on a Python C exte

SQLObject - Connect to established DB with non-int 'id' field

2007-10-19 Thread Sean DiZazzo
Hi all, I am just beginning with TurboGears and have run into a problem with SQLObject. I'm trying to connect to an established mysql DB, and use TurboGears to display results from the DB only. The problem is that the DB already has an 'id' field that is a string as opposed to an int. SQLObject

Re: SQLObject - Connect to established DB with non-int 'id' field

2007-10-20 Thread Sean DiZazzo
On Oct 19, 11:51 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Sean DiZazzo schrieb: > > > Hi all, > > > I am just beginning with TurboGears and have run into a problem with > > SQLObject. > > > I'm trying to connect to an established

RegExp Help

2007-12-13 Thread Sean DiZazzo
Hi group, I'm wrapping up a command line util that returns xml in Python. The util is flaky, and gives me back poorly formed xml with different problems in different cases. Anyway I'm making progress. I'm not very good at regular expressions though and was wondering if someone could help with i

Re: RegExp Help

2007-12-13 Thread Sean DiZazzo
On Dec 13, 5:49 pm, Sean DiZazzo <[EMAIL PROTECTED]> wrote: > Hi group, > > I'm wrapping up a command line util that returns xml in Python. The > util is flaky, and gives me back poorly formed xml with different > problems in different cases. Anyway I'm making pr

Elementtree tag

2007-12-13 Thread Sean DiZazzo
I have a another question... using elementtree, is there a proper way to get at the data '123456789' in this tag? '' I tried making it an element, but the only attribute that returns anything is the "tag" attribute. Does that section of a tag have any proper name that I'm missing? Or is it jus

Re: Elementtree tag

2007-12-13 Thread Sean DiZazzo
On Dec 13, 8:46 pm, Waldemar Osuch <[EMAIL PROTECTED]> wrote: > On Dec 13, 7:52 pm, Sean DiZazzo <[EMAIL PROTECTED]> wrote:> I have a another > question... > > > using elementtree, is there a proper way to get at the data > > '123456789' in this ta

Re: RegExp Help

2007-12-14 Thread Sean DiZazzo
On Dec 14, 12:04 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Thu, 13 Dec 2007 17:49:20 -0800, Sean DiZazzo wrote: > > I'm wrapping up a command line util that returns xml in Python. The > > util is flaky, and gives me back poorly forme

Re: RegExp Help

2007-12-14 Thread Sean DiZazzo
On Dec 14, 3:06 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 14 Dec 2007 06:06:21 -0300, Sean DiZazzo <[EMAIL PROTECTED]> > escribió: > > > > > On Dec 14, 12:04 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:

Keyword args to SimpleXMLRPCServer

2007-12-17 Thread Sean DiZazzo
Why is the following not working? Is there any way to get keyword arguments working with exposed XMLRPC functions? server.py import SocketServer from SimpleXMLRPCServer import SimpleXMLRPCServer,SimpleXMLRPCRequestHandler # Threaded mix-in class AsyncXMLRPCServer(SocketServer.Th

Re: Keyword args to SimpleXMLRPCServer

2007-12-17 Thread Sean DiZazzo
On Dec 17, 4:13 pm, Sean DiZazzo <[EMAIL PROTECTED]> wrote: > Why is the following not working? Is there any way to get keyword > arguments working with exposed XMLRPC functions? > > server.py > import SocketServer > from SimpleXMLRPCServer imp

askopenfilename() as root window

2007-12-18 Thread Sean DiZazzo
Is there any way to open a Tkinter.askopenfilename() without opening a root window alongside the file chooser? I simply want a script to open a dialog and return the chosen file's path to stdout. """ from tkFileDialog import askopenfilename print askopenfilename() """ ...does the job, but it op

Re: askopenfilename() as root window

2007-12-18 Thread Sean DiZazzo
On Dec 18, 6:06 pm, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > On 18 dic, 22:43, Sean DiZazzo <[EMAIL PROTECTED]> wrote: > > > Is there any way to open a Tkinter.askopenfilename() without opening a > > root window alongside the file chooser? > > > I si

Re: read_nonblocking error in pxssh

2008-01-16 Thread Sean DiZazzo
Just glanced at the docs, but it might be worth a shot... try: > >>> import pxssh > >>> s=pxssh.pxssh() > >>> s.login("myhost","root","mypass", auto_prompt_reset=False) Maybe??? Otherwise, I have used and modified this script with great success: (ssh_session.py) http://www.koders.com/python/f

Run wxPython app remotely under XWindows

2008-02-28 Thread Sean DiZazzo
Is there something special you have to do to get a wxPython app to run remotely under xwindows? My Tkinter apps always automatically work that way, so I was surprised to even be confronted with this problem. ~Sean -- http://mail.python.org/mailman/listinfo/python-list

Re: Run wxPython app remotely under XWindows

2008-02-28 Thread Sean DiZazzo
On Feb 28, 3:50 pm, Bjoern Schliessmann wrote: > Sean DiZazzo wrote: > > Is there something special you have to do to get a wxPython app to > > run remotely under xwindows?  My Tkinter apps always automatically > > work that way, so I was surprised to even be confronted

Re: Run wxPython app remotely under XWindows

2008-02-28 Thread Sean DiZazzo
On Feb 28, 3:50 pm, Bjoern Schliessmann wrote: > Sean DiZazzo wrote: > > Is there something special you have to do to get a wxPython app to > > run remotely under xwindows?  My Tkinter apps always automatically > > work that way, so I was surprised to even be confronted

Re: Run wxPython app remotely under XWindows

2008-02-28 Thread Sean DiZazzo
On Feb 28, 5:26 pm, Sean DiZazzo <[EMAIL PROTECTED]> wrote: > On Feb 28, 3:50 pm, Bjoern Schliessmann > [EMAIL PROTECTED]> wrote: > > Sean DiZazzo wrote: > > > Is there something special you have to do to get a wxPython app to > > > run remotely

Re: Run wxPython app remotely under XWindows

2008-02-29 Thread Sean DiZazzo
On Feb 29, 8:19 am, Mike Driscoll <[EMAIL PROTECTED]> wrote: > On Feb 28, 7:49 pm, Sean DiZazzo <[EMAIL PROTECTED]> wrote: > > > > > On Feb 28, 5:26 pm, Sean DiZazzo <[EMAIL PROTECTED]> wrote: > > > > On Feb 28, 3:50 pm, Bjoern Schliessmann >

os.path.getsize() on Windows

2008-03-18 Thread Sean DiZazzo
Hi all, I'm seeing some behavior that is confusing me. I often use a simple function to tell if a file is growing...ie being copied into a certain location. (Can't process it until it's complete) My function is not working on windows, and I'm wondering if I am missing something simple, or if I

Re: os.path.getsize() on Windows

2008-03-18 Thread Sean DiZazzo
On Mar 18, 2:27 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > Sean DiZazzo <[EMAIL PROTECTED]> wrote: > > On windows, this returns the size of the file as it _will be_, not the > > size that it currently is.  Is this a feature?  What is the proper way > > to get

Re: os.path.getsize() on Windows

2008-03-20 Thread Sean DiZazzo
On Mar 20, 6:42 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > Steven D'Aprano <[EMAIL PROTECTED]> wrote: > > On Wed, 19 Mar 2008 12:34:34 +, Duncan Booth wrote: > >> By default Python on Windows allows you to open a file for reading > >> unless you specify a sharing mode which prevents it: > >

Re: Using subprocess module to launch a shell shell script that itself forks a process

2008-10-08 Thread Sean DiZazzo
On Oct 8, 11:24 am, "Samuel A. Falvo II" <[EMAIL PROTECTED]> wrote: > On Oct 7, 6:23 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > Is your shell script doing something else, apart from invoking the java   > > process? > > Obviously, yes.  The script is some 150 lines long.  But the hang-

Re: Developing for Python (2.x or 3)?

2008-10-21 Thread Sean DiZazzo
I would use 2.5.2 or 2.6. I don't think 3 is anywhere near stable yet. Paulo J. Matos wrote: > Hi all, > > I am in the process of choosing which Python version for a brand new > application. Van Rossum in an interview recently advised all new > applications to use Python3 but I am afraid, most li

Re: How to open a shell prompt from an existing shell prompt

2008-10-21 Thread Sean DiZazzo
On Oct 21, 4:52 am, gaurav kashyap <[EMAIL PROTECTED]> wrote: > Dear all, > I have a file in which i have written some shell commands to execute. > Herein i require to open another shell prompt from this file. > > or simply i want to open a new shell prompt from an existing shell > prompt. > How co

setattr() on "object" instance

2009-03-15 Thread Sean DiZazzo
Why is it that you can setattr() on an instance of a class that inherits from "object", but you can't on an instance of "object" itself? >>> o = object() >>> setattr(o, "x", 1000) Traceback (most recent call last): File "", line 1, in AttributeError: 'object' object has no attribute 'x' >>> cl

Re: newbie: popen question

2009-05-28 Thread Sean DiZazzo
On May 27, 6:10 pm, thebiggestbangthe...@gmail.com wrote: > hello everyone :-), >                          I am a newbie to python. I am trying to run a > bash script from within a python program. I would greatly appreciate > any pointers/comments about how to get around the problem I am facing. >

Python for Kids

2008-07-08 Thread Sean DiZazzo
Pretty cool!! Our base will be *much* bigger in about twenty years. I remember doing Basic on my dads Apple IIe. http://wiki.laptop.org/go/Pippy#Summary -- http://mail.python.org/mailman/listinfo/python-list

Re: Determining when a file has finished copying

2008-07-11 Thread Sean DiZazzo
On Jul 9, 5:34 pm, keith <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > > Ethan Furman wrote: > > writeson wrote: > >> Guys, > > >> Thanks for your replies, they are helpful. I should have included in > >> my initial question that I don't have as much control ove

Re: Doubt

2008-07-23 Thread Sean DiZazzo
On Jul 23, 7:51 am, ജഗന്നാഥ് <[EMAIL PROTECTED]> wrote: > Friends > > I am a Perl programmer new to Python. I have a small doubt. > How to convert the perl notation > $a = ""; expression in Python ? > > How to represent the loop > for ($a = $b; $a<=$c;$a++){ > > } in Python > > Jagan > Linguist On

Re: applescript/python question

2008-08-01 Thread Sean DiZazzo
On Aug 1, 5:41 pm, <[EMAIL PROTECTED]> wrote: > I can't seem to figure this out.  I just installed Python 2.5.2 a few days > ago on my OS X 10.4.11 > system.  It runs fine and if I type "Python -V" in the Terminal it outputs > "Python 2.5.2" which is > correct.  However, if I try to run a 'do she

Re: Teething troubles with Python on a Mac

2008-08-03 Thread Sean DiZazzo
> Question 1: How can I locate the Python installation? There a few > files under Applications > MacPython 2.5, but this is clearly not the > entire installation. find / -name "site-packages" Will lead you to where SciPy and Numpy should be installed for each Python installation. You can work ba

Re: Why doesn't import work?

2008-08-04 Thread Sean DiZazzo
On Aug 4, 3:34 pm, ssecorp <[EMAIL PROTECTED]> wrote: > I have in Lib/site-packages a module named pdfminer. when I do import > pdfminer it complains: > > >>> import pdfminer > > Traceback (most recent call last): >   File "", line 1, in >     import pdfminer > ImportError: No module named pdfmine

Re: Testing for the first few letters of a string

2008-08-07 Thread Sean DiZazzo
try string1 = "My name is alex" string2 = "My name is alex, and I like pie" if string2.startswith(string1): process() or if you want to match a set number of characters you can use a slice: if string2[:15] == string1[:15]: process() or if you dont care where the characters appear in

Re: Create a short way to save typing script over and over....

2008-08-07 Thread Sean DiZazzo
On Aug 7, 11:56 am, frankrentef <[EMAIL PROTECTED]> wrote: > I have a statement "url = 'http://xyzserver/'"  so in my code every > time I need to use xyzserver I state "url +" > > What I' m now trying to do is create a call to a login process.  The > script for the login process is below.  I'd

Re: SSH utility

2008-08-11 Thread Sean DiZazzo
On Aug 11, 5:17 am, [EMAIL PROTECTED] wrote: > for similar tasks, I use pexpecthttp://pypi.python.org/pypi/pexpect. > > spawning bash process and simulate an interactive session. Here sending ls > command, retrieving results and exiting. In the spawned process ssh or any > other command, is just

Re: text adventure game problem

2008-04-14 Thread Sean DiZazzo
On Apr 8, 6:01 pm, [EMAIL PROTECTED] wrote: > okay, I'm having this one problem with a text adventure game. It's > kind of hard to explain, but I'll do my best. > [code] > > def prompt_kitchen(): >     global gold >     gold_taken = False >     while True: >         prompt_kit = raw_input('>') >  

Re: TypeError: unsupported operand type(s) for /: 'NoneType' and 'NoneType'

2008-05-01 Thread Sean DiZazzo
On May 1, 5:21 pm, "Jordan Harry" <[EMAIL PROTECTED]> wrote: > I'm trying to write a simple program to calculate permutations.  I created a > file called "mod.py" and put the following in it: > > def factorial(n): >     a = n >     b = n >     while a>0 and b>1: >         n = (n)*(b-1) >         b

Re: searching through a string and pulling characters

2008-08-19 Thread Sean DiZazzo
On Aug 19, 6:11 am, Wojtek Walczak <[EMAIL PROTECTED]> wrote: > On Mon, 18 Aug 2008 15:34:12 -0700 (PDT), Alexnb wrote: > > Also, on a side-note, does anyone know a very simple dictionary site, that > > isn't dictionary.com or yourdictionary.com. > > This one is my favourite:http://www.lingro.com/

Re: Seeking ideas for a cron implementation

2008-08-22 Thread Sean DiZazzo
On Aug 22, 1:30 pm, Karthik Gurusamy <[EMAIL PROTECTED]> wrote: > Hi, > > I'm working on a cron like functionality for my application. > The outer loops runs continuously waking every x seconds (say x=180, > 300, ..). > It needs to know what events in cron has expired and for each event do > the wo

Re: Wild Card String Comparison

2008-08-27 Thread Sean DiZazzo
On Aug 27, 8:49 pm, "W. eWatson" <[EMAIL PROTECTED]> wrote: > Is it possible to do a search for a wild card string in another string. For > example, I'd like to find "v*.dat" in a string called bingo. v must be > matched against only the first character in bingo, and not simply found > somewhere in

Access to Windows "Add/Remove Programs"?

2008-09-03 Thread Sean DiZazzo
Hi all, I'm trying to find a way to get a list of all the installed programs on a Windows box via Python. I thought of a few hacks that might partially work, and then thought about "Add/Remove Programs" Seems like the right way to go. I looked over the pywin32 docs a bit, but nothing slapped me

Re: Access to Windows "Add/Remove Programs"?

2008-09-03 Thread Sean DiZazzo
On Sep 3, 7:13 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 03 Sep 2008 21:51:59 -0300, Sean DiZazzo <[EMAIL PROTECTED]>   > escribi : > > > I'm trying to find a way to get a list of all the installed programs > > on a Windows box

Re: How to run PyOS_InputHook from python code (i.e. yield to event loops)

2008-09-08 Thread Sean DiZazzo
On Sep 6, 1:00 pm, [EMAIL PROTECTED] (Ville M. Vainio) wrote: > Background: PyOS_InputHook is something that gets run when python is > doing raw_input. TkInter and friends use it to run their event loops, > so that their events are handled while python is doing raw_input. > > What I'd like to do is

Re: Catching subprocess stdout stream

2008-09-10 Thread Sean DiZazzo
On Sep 8, 8:37 am, Thomas Jansson <[EMAIL PROTECTED]> wrote: > Dear all > > I have tkinkter based frontend to a Fortran based program. I use > subprocess to launch the fortran program as a child process and I wish > to see the output of the fortran program as it is created in the > console. > > The

Re: formating a filesystem with python

2008-09-10 Thread Sean DiZazzo
On Sep 10, 1:57 pm, "Ricardo Tiago" <[EMAIL PROTECTED]> wrote: > Hi all, > > is there a package in python that allows to mount/umount and format > (to ext3) a filesystem? I know that this is possible by just calling > the os commands 'mount/umount and mkfs' but this would imply to have > to change

Re: PLEASE HELP ME WITH THIS ASSIGNMENT...PLEASE....

2008-09-10 Thread Sean DiZazzo
On Sep 10, 3:33 pm, "Daniel Fetchinson" <[EMAIL PROTECTED]> wrote: > > I know I'm to late to ask you for helpbut please help me out..I > > am really new to unix and dont know how to finish this assignment on > > time.proff. said he will be using MOSS to detect whether I > > downloaded t

Re: SSH using PEXPECT

2008-09-10 Thread Sean DiZazzo
On Sep 10, 6:04 pm, [EMAIL PROTECTED] wrote: > Hey , I need to SSH into a server .. (10.8.42.38) using pexpect the > username is 'admin' and password is 'abc123' so far i have the > following code > > import pexpect > import sys > import time > import os > > foo = pexpect.spawn('ssh [EMAIL PROTECTE

Re: Python platform.

2008-09-11 Thread Sean DiZazzo
On Sep 11, 9:59 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > I want to build a desktop application. I am searching for some kind of > > environment that would provide all the elements ready (Windows...). > > Then I would have to code the business logic only. > > start

Re: Python platform.

2008-09-11 Thread Sean DiZazzo
On Sep 11, 11:39 am, Sean DiZazzo <[EMAIL PROTECTED]> wrote: > On Sep 11, 9:59 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > > > > [EMAIL PROTECTED] wrote: > > > I want to build a desktop application. I am searching for some kind of > > > envir

Re: Good python web programming books

2008-09-12 Thread Sean DiZazzo
On Sep 12, 6:08 pm, "Chris Rebert" <[EMAIL PROTECTED]> wrote: > I've heard good things about The Django Book:http://www.djangobook.com/ > - Chris > > > > On Fri, Sep 12, 2008 at 5:57 PM, bhaarat Sharma <[EMAIL PROTECTED]> wrote: > > Hi Guys, > > > I am very new to python.  I am looking for a good b

Re: Good programming style

2008-09-14 Thread Sean DiZazzo
On Sep 14, 7:10 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2008-09-15, Ben Finney <[EMAIL PROTECTED]> wrote: > > > > > Grant Edwards <[EMAIL PROTECTED]> writes: > >> On 2008-09-14, Ben Finney <[EMAIL PROTECTED]> wrote: > > >>> Second: please do yourself a favour and drop the > >>> camelCaseN

Re: explain slice assignment to newb

2008-09-20 Thread Sean DiZazzo
On Sep 20, 2:20 pm, Andrew <[EMAIL PROTECTED]> wrote: > please explain this behavior to a newb: > > >>> a = [1,2,3,4] > >>> b = ["a","b","c","d"] > >>> a > [1, 2, 3, 4] > >>> b > > ['a', 'b', 'c', 'd'] > > >>> a[0:2] > [1, 2] > >>> a > [1, 2, 3, 4] > >>> b[2:4] > ['c', 'd'] > >>> a[0:2] = b[0:2] >

Re: appending * to glob returns files with '*' !!

2008-09-21 Thread Sean DiZazzo
On Sep 19, 1:37 pm, "John [H2O]" <[EMAIL PROTECTED]> wrote: > I have a glob.glob search: > > searchstring = os.path.join('path'+'EN*') shouldn't that be os.path.join(path, 'EN*') ? > ___ > This returns some files: > EN082333 > EN092334 > EN* Mine doesn't return that last string. > > My routin

Re: Folder Actions on Mac OSX Leopard?

2008-09-24 Thread Sean DiZazzo
On Sep 24, 12:31 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Greetings, > > I've been trying to figure out if it's possible to attach a Python > script to an action via Mac OSX Leopard's File Actions system. I'm > wanting to call a Python script every time a file is added to the > monitore

Re: empty csv file attachments

2008-09-24 Thread Sean DiZazzo
On Sep 24, 1:17 pm, Bobby Roberts <[EMAIL PROTECTED]> wrote: > hi group. > > I'm new to python but a veteran at programming.  This one has me > stumped.  I have a simple contact form which the user fills out.  The > email is sent to the site user as well and it is delivered with the > content in th

Re: Off topic: Sent from my Foo messages

2008-09-24 Thread Sean DiZazzo
> -- > Steven I don't appreciate the two lines you put above your name in your posts. Please remove them in the future. ~Sean -- http://mail.python.org/mailman/listinfo/python-list

Re: SimpleXMLRPCServer -- turning off request log?

2008-09-25 Thread Sean DiZazzo
On Sep 25, 6:01 pm, [EMAIL PROTECTED] wrote: > My SimpleXMLRPCServer program prints to stderr a line like > this for each request: > > ohm..pixar.com - - [25/Sep/2008 17:57:50] "POST /RPC2 HTTP/1.0" 200 - > > Is there a way to turn this logging off?  I have RTFM and can't > seem to find a way to do

Re: SimpleXMLRPCServer -- turning off request log?

2008-09-25 Thread Sean DiZazzo
On Sep 25, 9:04 pm, Sean DiZazzo <[EMAIL PROTECTED]> wrote: > On Sep 25, 6:01 pm, [EMAIL PROTECTED] wrote: > > > My SimpleXMLRPCServer program prints to stderr a line like > > this for each request: > > > ohm..pixar.com - - [25/Sep/2008 17:57:50] "POST /RPC2 H

Re: Writing a well-behaved daemon

2008-09-25 Thread Sean DiZazzo
On Sep 25, 10:08 pm, Ben Finney <[EMAIL PROTECTED]> wrote: > Howdy all, > > Writing a Python program to become a Unix daemon is relatively > well-documented: there's a recipe for detaching the process and > running in its own process group. However, there's much more to a Unix > daemon than simply

Re: Writing a well-behaved daemon

2008-09-26 Thread Sean DiZazzo
On Sep 26, 12:13 am, Ben Finney <[EMAIL PROTECTED]> wrote: > Sean DiZazzo <[EMAIL PROTECTED]> writes: > > Looks like somebody did the same thing I did and posted it. > > >http://svn.plone.org/svn/collective/bda.daemon/trunk/bda/daemon/daemo... > > Thanks, I&#

Re: how to search multiple textfiles ?

2008-09-26 Thread Sean DiZazzo
On Sep 26, 6:35 am, Stef Mientki <[EMAIL PROTECTED]> wrote: > hello, > > I want to search multiple textfiles (python source files) for a specific > word. > I can find all files, open them and do a search, > but I guess that will be rather slow. > > I couldn't find any relevant information through

Re: check if file is MS Word or PDF file

2008-09-27 Thread Sean DiZazzo
On Sep 27, 4:01 pm, "Chris Rebert" <[EMAIL PROTECTED]> wrote: > On Sat, Sep 27, 2008 at 3:42 PM, Michael Crute <[EMAIL PROTECTED]> wrote: > > On Sat, Sep 27, 2008 at 5:43 PM, A. Joseph <[EMAIL PROTECTED]> wrote: > >> What should I look for in a file to determine whether or not it is a > >> MS Word

Re: Web programming in Python.

2008-09-28 Thread Sean DiZazzo
On Sep 28, 4:51 pm, Kurda Yon <[EMAIL PROTECTED]> wrote: > 1. On my server (in my directory) I found "cgi-bin" subdirectory. > > 2. In the "cgi-bin" I have created a file "test.py". > > 3. In that file I put: > #!/usr/bin/python2.4 python > print "Hello, World!" > (I have checked, I have "/usr/bin/

Re: PYTHON WORKING WITH PERL ??

2008-09-29 Thread Sean DiZazzo
On Sep 29, 12:44 pm, "Blubaugh, David A." <[EMAIL PROTECTED]> wrote: > Sir, > > You are absolutely correct.  I was praying to G_d I did not have to > slaughter my project's source code in this manner.  However, like life > itself, I was given legacy source code (i.e. someone else errors to fix) > i

Re: python & sms

2008-09-29 Thread Sean DiZazzo
On Sep 29, 8:47 pm, sui <[EMAIL PROTECTED]> wrote: > Hii > i want a script to send sms to any mobile. > can u help me ?? > > Thanks in advance.. Must...be...smarter...than...cell...phone... -- http://mail.python.org/mailman/listinfo/python-list

Re: using SSh problem!

2008-10-02 Thread Sean DiZazzo
On Oct 2, 3:27 am, sa6113 <[EMAIL PROTECTED]> wrote: > No, my problem isn't entering password or not ? > I want to know what should I do to connect between different platform and > copy a file . > > Lawrence D'Oliveiro wrote: > > > In message <[EMAIL PROTECTED]>, sa6113 > > wrote: > > >> I want to

Re: Reading a file that is changing and getting the new lines

2009-12-01 Thread Sean DiZazzo
On Dec 1, 3:09 pm, Ouray Viney wrote: > Problem: > = > I want to read a ASCII text file that can have data appended to it. > > Example scenario:  As the python script is running a user/application > adds new entries to the end of the test case file, example, adds the > following to the fi

daemon.DaemonContext and logging

2009-12-10 Thread Sean DiZazzo
I'm finally getting around to trying out the python-daemon module and have hit a wall. I'm trying to set up logging inside of the "with daemon.DaemonContext" block. But when I try to use a logger inside the block it throws an error: ~~ from __future__ import with_

Re: daemon.DaemonContext and logging

2009-12-10 Thread Sean DiZazzo
On Dec 10, 5:37 pm, Sean DiZazzo wrote: > I'm finally getting around to trying out the python-daemon module and > have hit a wall.  I'm trying to set up logging inside of the "with > daemon.DaemonContext" block.  But when I try to use a logger inside > the block i

Re: insert unique data in a list

2009-12-13 Thread Sean DiZazzo
On Dec 13, 8:37 am, mattia wrote: > How can I insert non-duplicate data in a list? I mean, is there a > particular option in the creation of a list that permit me not to use > something like: > def append_unique(l, val): >     if val not in l: >         l.append(val) > > Thanks, > Mattia Check ou

Re: python 2.x and running shell command

2009-12-23 Thread Sean DiZazzo
On Dec 23, 1:57 pm, tekion wrote: > All, > some of the servers I have run python 2.2, which is a drag because I > can't use subprocess module.  My options that I know of is popen2 > module.  However, it seems it does not have io blocking > capabilities.   So every time run a command I have open an

Re: python 2.x and running shell command

2009-12-24 Thread Sean DiZazzo
On Dec 24, 5:34 am, tekion wrote: > On Dec 23, 5:22 pm, Sean DiZazzo wrote: > > > > > On Dec 23, 1:57 pm, tekion wrote: > > > > All, > > > some of the servers I have run python 2.2, which is a drag because I > > > can't use subprocess modu

Re: Printing plain text with exact positioning on Windows

2010-01-06 Thread Sean DiZazzo
On Jan 5, 11:40 am, KvS wrote: > On Jan 5, 7:16 pm, Nobody wrote: > > > > > On Tue, 05 Jan 2010 04:40:14 -0800, KvS wrote: > > >> Did you mean borderless printing? > > >> Every printer needs his margins, some more some less. Some printers have > > >> the > > >> ability to do borderless printing

Re: PIL how to display multiple images side by side

2010-01-08 Thread Sean DiZazzo
On Jan 8, 1:43 pm, "suresh.amritapuri" wrote: > Hi, > > In PIL, how to display multiple images in say m rows and n colums when > I have m*n images. > > suresh Sounds like a good project to learn PIL with. ~Sean -- http://mail.python.org/mailman/listinfo/python-list

setattr() oddness

2010-01-15 Thread Sean DiZazzo
Should the following be legal? >>> class TEST(object): pass ... >>> t = TEST() >>> setattr(t, "", "123") >>> getattr(t, "") '123' ~Sean -- http://mail.python.org/mailman/listinfo/python-list

Re: setattr() oddness

2010-01-15 Thread Sean DiZazzo
On Jan 15, 2:22 pm, Terry Reedy wrote: > On 1/15/2010 3:37 PM, Sean DiZazzo wrote: > > > Should the following be legal? > > >>>> class TEST(object): pass > > ... > >>>> t = TEST() > >>>> setattr(t, "", "123&quo

Re: deriving MySQLdb class

2010-01-21 Thread Sean DiZazzo
On Jan 21, 5:48 pm, tekion wrote: > All, > I am trying to write a class which inherits from MySQLdb class.  Below > is code snippet: > import MySQLdb > import sys > > class  msql_connect(MySQLdb): >     def __init__(self): >         self.host     =  "hostname" >         self.user     = "user" >  

Re: deriving MySQLdb class

2010-01-21 Thread Sean DiZazzo
On Jan 21, 8:00 pm, tekion wrote: > Sean, > Thanks.  This is useful.  For future reference, how do I know what > class is in MySQLdb module? You have to explore. ;) I found the MySQLdb module, and looked inside the __init__.py. Then looked for "connect" and followed the trail. -- http://mail.

Re: deriving MySQLdb class

2010-01-21 Thread Sean DiZazzo
On Jan 21, 8:17 pm, tekion wrote: > Sean, > I did a little investigation, there are other classes besides > Connection. So, could I only set up a derived class from Connection > and still be able to use the connection to query database and retrieve > data? Im not sure I understand you completely.

Re: Terminal application with non-standard print

2010-01-25 Thread Sean DiZazzo
On Jan 24, 11:27 am, Rémi wrote: > Hello everyone, > > I would like to do a Python application that prints data to stdout, but > not the common way. I do not want the lines to be printed after each > other, but the old lines to be replaced with the new ones, like wget > does it for example (when d

Re: Wrap a function

2010-01-28 Thread Sean DiZazzo
On Jan 28, 12:13 pm, Joan Miller wrote: > On 28 ene, 19:58, John Posner wrote: > > > > > On 1/28/2010 2:24 PM, Joan Miller wrote: > > > > On 28 ene, 19:16, Josh Holland  wrote: > > >> On 2010-01-28, Joan Miller  wrote: > > > >>> I've to call to many functions with the format: > > > >> run("cm

Re: get error install MySQLdb on Mac OS X

2010-01-28 Thread Sean DiZazzo
On Jan 28, 12:53 pm, "PS.OHM" wrote: > Hello Guys > > I have get some error when i install MySQLdb on Mac OS X > > after i key command $python setup.py build > > rusult is > : > : > error: command 'gcc-4.0' failed with exit status 1 > > How to config this poblem? Please show a little bit more of

Re: SimpleXMLRPCServer daemon

2010-01-29 Thread Sean DiZazzo
On Jan 29, 7:54 am, Thomas Allen wrote: > I have a script that runs an instance of SimpleXMLRPCServer and in > general it works as expected. In its __del__, it is supposed to clean > up its PID file (written on boot). I have two problems with this > server instance: The first is that tt doesn't al

Re: Catch script hangs

2009-09-27 Thread Sean DiZazzo
On Sep 27, 3:40 pm, Bakes wrote: > Due to an ftp server issue, my python script sometimes hangs whilst > downloading, unable to receive any more data. Is there any way that I > could have python check, maybe through a thread or something, whether > it has hanged (or just, if it's still active afte

"Pipeline" Generator presentation - where?

2009-09-28 Thread Sean DiZazzo
I remember reading (a few times) a presentation about using generators to create "pipelines" The idea was to create very specific and small generator functions, and then combine them together to get larger results. The example used was to parse log files contained in gzipped log files among other

Re: How to jump out of nested 'for'-loops?

2009-09-28 Thread Sean DiZazzo
On Sep 28, 8:09 pm, Peng Yu wrote: > Hi, > > I want some command to jump out of nested loop. I'm wondering what is > the most convenient way to do so in python. > > for i in range(10): >   print "i = ", i >   for j in range(10): >     if i*10 + j == 50: >       print i*10 + j >       break # I wan

Re: "Pipeline" Generator presentation - where?

2009-09-28 Thread Sean DiZazzo
On Sep 28, 9:12 pm, alex23 wrote: > Sean DiZazzo wrote: > > I remember reading (a few times) a presentation about using generators > > to create "pipelines"  The idea was to create very specific and small > > generator functions, and then combine them together

Re: the usage of 'yield' keyword

2009-10-15 Thread Sean DiZazzo
On Oct 13, 6:41 pm, Peng Yu wrote: > http://docs.python.org/reference/simple_stmts.html#grammar-token-yiel... > > The explanation of yield is not clear to me, as I don't know what a > generator is. I see the following example using 'yield'. Could > somebody explain how 'yield' works in this exampl

  1   2   >