Re: assign class variable in __init__

2010-06-08 Thread Jason Scheirer
On Jun 8, 9:37 am, Peter Otten <__pete...@web.de> wrote: > Ross Williamson wrote: > > Hi Everyone, > > > Just a quick question - Is it possible to assign class variables in > > the __init__() - i.e. somthing like: > > > def __init__(self,self.source = "test", self.length = 1) > > > rather than > >

Re: where are the program that are written in python?

2010-05-21 Thread Jason Scheirer
On May 21, 3:21 am, Deep_Feelings wrote: > python is not a new programming language ,it has been there for the > last 15+ years or so ? right ? > > however by having a look at this pagehttp://wiki.python.org/moin/Applications > i could not see many programs written in python (i will be intere

Re: Parser

2010-05-02 Thread Jason Scheirer
On May 2, 12:54 pm, Andreas Löscher wrote: > Hi, > I am looking for an easy to use parser. I am want to get an overview > over parsing and want to try to get some information out of a C-Header > file. Which parser would you recommend? > > Best, > Andreas Pyparsing: http://pyparsing.wikispaces.com

Re: Python date time API

2010-04-26 Thread Jason Scheirer
On Apr 26, 8:21 am, rk wrote: > Hi, > >  I am python novice, trying to convert a boost::gregorian::date out to > python using PyDateTime C-api interface. I was coring because the C- > API failed to initialize. The error was: > > AttributeError: "module" object has not attribute datetime_CAPI > > A

Re: pythoncom.CoInitialize() not recognised in Eclipse

2010-03-28 Thread Jason Scheirer
On Mar 28, 7:14 pm, KB wrote: > Hi there, > > I have in the past used PythonWin to write python for COM, and > switched to Eclipse. > > I am getting an error from the IDE saying it does not recognise > CoInitialize(): > > > import pythoncom > > pythoncom.CoInitialize() > pythoncom.CoUninitial

Re: Clarifications on compiling for Windows

2010-01-09 Thread Jason Scheirer
On Jan 7, 10:51 pm, Mensanator wrote: > On Jan 8, 12:19 am, peteshinners wrote: > > > > > > > > > My presentation for Pycon is coming together, but I need to make sure > > my information about compiling Python and Python extensions for > > Windows is correct. I'm really only experienced with this

Re: Append to an Excel file

2010-01-09 Thread Jason Scheirer
On Jan 9, 12:30 am, pp wrote: > Hi All, > > How do I add a line to an existing file. This should append to the > existing data in the excel file, which was saved previously. > > Thanks, > PP http://pypi.python.org/pypi/xlwt -- http://mail.python.org/mailman/listinfo/python-list

Re: Manipulating pointers in C using ctypes

2010-01-08 Thread Jason Scheirer
On Jan 8, 7:37 am, Daniel Platz wrote: > Hello! > > I have to ask a newbie question about manipulating pointers in C using > ctypes. I have a C dll with two functions. The first one creates a > pointer and returns it to python. The second one takes a pointer as an > argument shows its address and

Re: Introspection

2010-01-06 Thread Jason Scheirer
On Jan 6, 8:38 am, Steven D'Aprano wrote: > On Wed, 06 Jan 2010 06:53:40 -0800, m...@infoserv.dk wrote: > > I'm looking for a way to make a list of string literals in a class. > > > Example: > > > class A: > >    def method(self): > >        print 'A','BC' > > ExtractLiterals(A) > > ['A','BC'

Re: No trees in the stdlib?

2009-06-26 Thread Jason Scheirer
On Jun 25, 10:32 pm, a...@pythoncraft.com (Aahz) wrote: > In article , > Tom Reed   wrote: > > > > >Why no trees in the standard library, if not as a built in? I searched > >the archive but couldn't find a relevant discussion. Seems like a > >glaring omission considering the batteries included phil

Re: Using Python after a few years of Ruby

2009-04-14 Thread Jason Scheirer
On Apr 14, 12:01 am, blahemailb...@gmail.com wrote: > Although I'm not 100% new to Python, most of my experience using high- > level languages is with Ruby. I had a job doing Rails web development > a little ways back and I really enjoyed it. At my current workplace > though, we're looking at using

Re: Can I import from a directory that starts with a dot (.) ?

2009-04-13 Thread Jason Scheirer
On Apr 13, 5:51 pm, Matthew Wilson wrote: > I want to have .foo directory that contains some python code.  I can't > figure out how to import code from that .foo directory.  Is this even > possible? > > TIA > > Matt Yes, but it's not a particularly recommended thing to do as it is CRAZY. You can

Re: calculate field in ARCGIS

2009-04-09 Thread Jason Scheirer
On Apr 9, 12:55 pm, Chris Rebert wrote: > On Thu, Apr 9, 2009 at 12:42 PM, Lydia wrote: > > Hi Python users, > > > I ran into a problem with python coding in ARCGIS. Does anybody have the > > experience in dealing with this? > > > I need to calculate NEWFIELD based on OLDFIELD under condition: if

Re: Jython on Google AppEngine.

2009-04-09 Thread Jason Scheirer
On Apr 9, 9:12 am, Alan Kennedy wrote: > Hi all, > > You may be interested to know that you can now run jython 2.2 out of > the box on Google AppEngine, thanks to their new java support. > > A patch is required for jython 2.5, but we will be folding this in > before the jython 2.5 RC release over

Re: ipython / vs \ in readline on MS Windows (and ipython help grepper)

2009-03-12 Thread Jason Scheirer
On Mar 10, 3:34 pm, bdb112 wrote: > Q1/ I run a standard python ditribution with ipython and readline > under cygwin.  The tab filename completion works fine in the OS (bash > shell) as expected, and tab filename completion at the ipython command > line works, but with MS style path separators (ba

Re: Can Python do shopping cart?

2009-03-06 Thread Jason Scheirer
On Mar 6, 1:19 am, Lie Ryan wrote: > Muddy Coder wrote: > > Hi Folks, > > > I know PHP can do shopping cart, such as Zen Cart. I wonder can Python > > do such a thing? Thanks! > > > Muddy Coder > > Python is Turing Complete "Python is Turing complete" is c.l.p's equivalent to Godwin's law. >From

Re: Can Python do shopping cart?

2009-03-05 Thread Jason Scheirer
On Mar 5, 2:30 pm, Muddy Coder wrote: > Hi Folks, > > I know PHP can do shopping cart, such as Zen Cart. I wonder can Python > do such a thing? Thanks! > > Muddy Coder http://www.satchmoproject.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Are there any python libraries/packages like Juicer/Sprockets/bundle_fu?

2009-03-04 Thread Jason Scheirer
On Mar 4, 1:22 am, Phillip B Oldham wrote: > Hi all. > > Just wondering whether there are any libraries for python like ruby's > Juicer[1], Sprocets[2], or bundle_fu[3]? > > Thanks! > > [1]http://www.cjohansen.no/en/ruby/juicer_a_css_and_javascript_packaging... > [2]http://getsprockets.com/ > [3]h

Re: Looking for tips on running Python version 2.6 and 3.0 together on same *WINDOWS* machine

2009-02-24 Thread Jason Scheirer
On Feb 24, 9:20 pm, "Martin v. Löwis" wrote: > > It's easy - the registry isn't used except to associate files. The > > associations are made with the most-recently-installed version. > > > I currently have 2.4, 2.5, 2.6 and 3.0 on my Windows machine. > > In addition, at install time, there is the

Re: Does Paramiko 1.7.2 and 1.6.4 work with CentOS 4

2009-02-24 Thread Jason Scheirer
On Feb 25, 12:55 am, Shah Sultan Alam wrote: > Hi Groups, >  Can you please help me on the following... > > 1. Does Paramiko 1.7.2 and 1.6.4 work with CentOS 4 > > 2. If yes, what is the exact 'yum' command to install paramiko on CentOS 4? > I have tried all possible ones without success. > >    

Re: pdftk

2009-02-24 Thread Jason Scheirer
On Feb 24, 12:43 pm, JB wrote: > Reimar Bauer a écrit : > > > Hi > > > Does one know about a python interface to pdftk? > > Or something similar which can be used to fill a form by fdf data. > > everyday i use : > > import os > os.system("pdftk.exe source.pdf fill_form data.fdf output output.pdf >

Re: wxPython and Croatian characters

2009-02-16 Thread Jason Scheirer
On Feb 16, 10:58 am, vedrandeko...@gmail.com wrote: > Hello, > > I have problem with configuring my wxPython script to work with > Croatian characters like:  ð,¹,¾,è,æ. > Here is my simple script without wxPython (this script works): > >       # -*- coding: utf-8 -*- >       s = "hello normal strin

Re: flexible find and replace ?

2009-02-16 Thread Jason Scheirer
On Feb 16, 12:10 pm, OdarR wrote: > Hi guys, > > how would you do a clever find and replace, where the value replacing > the tag > is changing on each occurence ? > > "...TAGTAGTAG..TAG." > > is replaced by this : > > "...REPL01REPL02

Re: error while importing os

2009-02-15 Thread Jason Scheirer
On Feb 15, 12:38 pm, karan wrote: > Hi, > > Iam new to python i see the following when iam in the python shell and > i try to import os,though i can import the sys and sys.path does > contain the path to the python binary or the folder where the python > binaries reside: > > Traceback (most recent

Re: Upgrading standard library module

2009-02-13 Thread Jason Scheirer
On Feb 13, 12:42 pm, Bryan wrote: > I have a Python v2.5.2 server running and I found some undesirable > behavior in the xmlrpclib module that is included with that version of > Python.  The xmlrpclib version that is included with Python 2.6 > changes the behavior for the better.  I nervous about

Re: A little bit else I would like to discuss

2009-02-12 Thread Jason Scheirer
On Feb 12, 12:04 pm, azrael wrote: > Sometimes I really get confused when looking out for a modul for some > kind of need. Sometimes I get frightened when I get the resaults. 8 > wraper for this, 7 wrapers for that, 10 modules for anything. Between > them are maybe some kind of small differences,

Re: What is wrong in my list comprehension?

2009-02-02 Thread Jason Scheirer
On Feb 1, 3:37 am, Peter Otten <__pete...@web.de> wrote: > Hussein B wrote: > > Hey, > > I have a log file that doesn't contain the word "Haskell" at all, I'm > > just trying to do a little performance comparison: > > ++ > > from datetime import time, timedelta, datetime > > start = dat

Re: is None vs. == None

2009-01-23 Thread Jason Scheirer
On Jan 23, 12:48 pm, Roger wrote: > > And, just for completeness, the "is" test is canonical precisely because > > the interpreter guarantees there is only ever one object of type None, > > so an identity test is always appropriate. Even the copy module doesn't > > create copies ... > > Does the i

Re: the name of a method

2009-01-15 Thread Jason Scheirer
On Jan 15, 8:37 am, "Diez B. Roggisch" wrote: > thomas.steffe...@googlemail.com wrote: > > Hello, > > > I have a Class: > > > class myClass: > >     def __init__(self): > >         # do something > >         print "name of class = " +  self.__class__.__name__ > > >     def myMethod(self): > >    

Re: spawning pyhon apps...

2009-01-09 Thread Jason Scheirer
of time... it could kill the child... > > thoughts/comments... > > thanks > > -Original Message- > From: python-list-bounces+bedouglas=earthlink@python.org > > [mailto:python-list-bounces+bedouglas=earthlink@python.org]on Behalf > Of Jason Scheirer > Sent: Friday

Re: spawning pyhon apps...

2009-01-09 Thread Jason Scheirer
"return(2)" > > i've seen mention of os.waitpid(..) does this play into waiting for child > processes to complete, or determine if they've terminated?? > > thanks > > -Original Message- > From: python-list-bounces+bedouglas=earthlink@py

Re: spawning pyhon apps...

2009-01-09 Thread Jason Scheirer
On Jan 9, 2:47 pm, "bruce" wrote: > hi... > > toying with an idea.. trying to figure out a good/best way to spawn multiple > python scripts from a parent python app. i'm trying to figure out how to > determine when all child apps have completed, or to possibly determine if > any of the child proce

Re: Is this pythonic?

2008-12-18 Thread Jason Scheirer
On Dec 18, 8:45 am, prueba...@latinmail.com wrote: > On Dec 18, 11:08 am, ipyt...@gmail.com wrote: > > > x.validate_output(x.find_text(x.match_filename > > (x.determine_filename_pattern(datetime.datetime.now() > > > Is it even good programming form? > > Lisp and Scheme programmers love that sty

Re: WinMerge--B/W Shading of Printed Copy to Show Differences?

2008-12-16 Thread Jason Scheirer
On Dec 16, 3:56 pm, "W. eWatson" wrote: > Is there a way to highlight differences between the two files when printing > in b/w? Help suggests there may be some texturing, but all I see is color > choices. > -- >                                 W. eWatson > >               (121.015 Deg. W, 39.262 D

Re: AIM client code for Python?

2008-12-16 Thread Jason Scheirer
On Dec 16, 9:54 am, Joe Strout wrote: > I'd like to write an AIM bot in Python.  I found and tried > , but it doesn't work for me: > > Connecting... > Traceback (most recent call last): >    File "aimbot-1.py", line 17, in >      bot.go() >    File "/Users/jstrout/Do

Re: newbie question: if var1 == var2:

2008-12-11 Thread Jason Scheirer
On Dec 11, 3:49 pm, John Machin wrote: > On Dec 12, 10:31 am, "Rhodri James" > wrote: > > > > > On Thu, 11 Dec 2008 19:49:23 -, Steve Holden   > > wrote: > > > > Kirk Strauser wrote: > > >> At 2008-11-29T04:02:11Z, Mel writes: > > > >>> You could try > > > >>> for item in fname: > > >>>    

Re: Python is slow

2008-12-10 Thread Jason Scheirer
On Dec 10, 10:42 am, cm_gui <[EMAIL PROTECTED]> wrote: > http://blog.kowalczyk.info/blog/2008/07/05/why-google-should-sponsor-... > > I fully agree with Krzysztof Kowalczyk . > Can't they build a faster VM for Python since they love the language > so much? > > Python is SLOW.    And I am not compar

Re: Overriding a method at the instance level on a subclass of a builtin type

2008-12-03 Thread Jason Scheirer
On Dec 2, 6:13 pm, Aaron Brady <[EMAIL PROTECTED]> wrote: > On Dec 2, 6:58 pm, "Zac Burns" <[EMAIL PROTECTED]> wrote: > > > > > Sorry for the long subject. > > > I'm trying to create a subclass dictionary that runs extra init code > > on the first __getitem__ call. However, the performance of __get

Re: Multiple Versions of Python on Windows XP

2008-12-02 Thread Jason Scheirer
On Dec 1, 4:49 pm, "Colin J. Williams" <[EMAIL PROTECTED]> wrote: > Could anyone please point me to > documentation on the way the msi > installer handles multiple versions eg. > Python 2.5, 2.6 and 3.0? > > What changes are made to the registry? > > Is there some way to specify a default > version

Re: Is it possible (and wise) to extend the None-type ?

2008-11-26 Thread Jason Scheirer
On Nov 26, 11:40 am, Terry Reedy <[EMAIL PROTECTED]> wrote: > Stef Mientki wrote: > > hello, > > > I've the idea that I always have a lot of useless code in my programs, > > like the next example. > > >  def _On_Menu_File_Open ( self, event = None ): > >    if event : > >     event.Skip () > > > in

Re: initialized list: strange behavior

2008-11-24 Thread Jason Scheirer
On Nov 24, 10:34 pm, [EMAIL PROTECTED] wrote: > Hi Python experts! Please explain this behavior: > > >>> nn=3*[[]] > >>> nn > [[], [], []] > >>> mm=[[],[],[]] > >>> mm > > [[], [], []] > > Up till now, 'mm' and 'nn' look the same, right? Nope! > > >>> mm[1].append(17) > >>> mm > [[], [17], []] > >>

Re: python vs smalltalk 80

2008-11-19 Thread Jason Scheirer
On Nov 18, 10:53 pm, gavino <[EMAIL PROTECTED]> wrote: > python vs smalltalk 80 > > which is nicer? I thought this was comp.lang.colorforth. WHAT IS GOING ON? -- http://mail.python.org/mailman/listinfo/python-list

Re: Does python is suitable for enterprise cluster management?

2008-11-17 Thread Jason Scheirer
On Nov 16, 8:56 am, Asaf Hayman <[EMAIL PROTECTED]> wrote: > Is anyone familiar or aware of a successful enterprise class project > in Python to control and monitor a cluster of computers? > > As a part of a bigger project my company needs to build a cluster > management system. The aim of the syst

Re: replace mothod for only one object but not for a class

2008-10-14 Thread Jason Scheirer
On Oct 14, 11:20 am, George Sakkis <[EMAIL PROTECTED]> wrote: > On Oct 14, 1:50 pm, hofer <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > I have multiple objects all belonging to the same class > >  (which I didn't implement and whose code I don't want to modify) > > > Now I'd like to change one met

Re: Safe eval of insecure strings containing Python data structures?

2008-10-09 Thread Jason Scheirer
On Oct 9, 9:01 am, Paul Rubin wrote: > Lie Ryan <[EMAIL PROTECTED]> writes: > > in python 2.6, ast.literal_eval may be used to replace eval() for > > literals. > > What happens on literal_eval('[1]*9') ? The documentation clearly states that it will fail to evalu

Re: how can we send keys to keyboard

2008-10-07 Thread Jason Scheirer
On Oct 7, 9:28 am, mhangman <[EMAIL PROTECTED]> wrote: > On 7 Ekim, 18:57, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > > > On Oct 7, 10:42 am, mhangman <[EMAIL PROTECTED]> wrote: > > > > On 7 Ekim, 18:34, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > > > On Oct 7, 10:13 am, mhangman <[EMAIL PRO

Re: index all instances by id - a memory leak?

2008-10-01 Thread Jason Scheirer
On Oct 1, 10:01 pm, Dan Barbus <[EMAIL PROTECTED]> wrote: > On Oct 2, 7:54 am, Dan Barbus <[EMAIL PROTECTED]> wrote: > > > > >     def getItemById(id): > >         return _itemsById[id] > > I just saw that this won't compile. Still, ignoring this, I thing the > purpose of the code is pretty clear.

Re: decent interactive python shell on MS Windows?

2008-10-01 Thread Jason Scheirer
On Oct 1, 9:53 am, [EMAIL PROTECTED] wrote: > Hi everyone, > > After having used Python on Linux for some time, I now have to do > Python coding on Windows. I am big fan of the interactive Python shell > to test, eg, regexps. > > Is there an interactive Python shell on Windows that supports: > > -

Re: Linq to Python

2008-09-23 Thread Jason Scheirer
On Sep 23, 7:48 am, hrishy <[EMAIL PROTECTED]> wrote: > Hi > > Will LINQ be ported to Python ? > > regards > Hrishy I think this question is more appropriate to ask on an IronPython development list -- LINQ is pretty solidly intertwined with .Net, and so you'll likely want to look at the .Net impl

Re: path slashes cleaning

2008-09-04 Thread Jason Scheirer
On Sep 4, 6:32 am, "Francesco Guerrieri" <[EMAIL PROTECTED]> wrote: > On Thu, Sep 4, 2008 at 3:25 PM, Mathieu Prevot <[EMAIL PROTECTED]> wrote: > > Hi, > > > for scripts that take arguments, I would like to remove the trailing > > slash if it's present. > > > Is there something else than: > > > a='

Re: How to check is something is a list or a dictionary or a string?

2008-08-29 Thread Jason Scheirer
On Aug 29, 9:16 am, [EMAIL PROTECTED] wrote: > Hi, > > How to check if something is a list or a dictionary or just a string? > Eg: > > for item in self.__libVerDict.itervalues(): >             self.cbAnalysisLibVersion(END, item) > > where __libVerDict is a dictionary that holds values as strings o

Re: List of modules available for import inside Python?

2008-08-28 Thread Jason Scheirer
On Aug 27, 11:04 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > ssecorp wrote: > > Is there a way to view all the modules I have available for import > > from within Python? > > Like writing in the interpreter: > > import.modules > > there's a helper script in the 2.5 source code kit that locates a

Re: setattr and getattr, when to use?

2008-08-22 Thread Jason Scheirer
On Aug 22, 10:17 pm, Jason Scheirer <[EMAIL PROTECTED]> wrote: > On Aug 22, 8:50 pm, maestro <[EMAIL PROTECTED]> wrote: > > > Why are these functions there? Is it somehow more idiomatic to use > > than to do obj.field ? > > Is there something you can w

Re: setattr and getattr, when to use?

2008-08-22 Thread Jason Scheirer
On Aug 22, 8:50 pm, maestro <[EMAIL PROTECTED]> wrote: > Why are these functions there? Is it somehow more idiomatic to use > than to do obj.field ? > Is there something you can with them that you can't by obj.field > reference? You can generate them dynamically from strings. In some cases you don

Re: How to simulate packages?

2008-08-21 Thread Jason Scheirer
On Aug 21, 11:26 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Thu, 21 Aug 2008 13:04:51 -0300, Daniel <[EMAIL PROTECTED]>   > escribi : > > > I have a project that I've decided to split into packages in order to > > organize my code better.  So what I have looks something like this > > >

Re: RPM of a Python program

2008-08-14 Thread Jason Scheirer
On Aug 13, 5:52 pm, Clay Hobbs <[EMAIL PROTECTED]> wrote: > I want to make an RPM (Redhat Package Manager) file to install a Python > program (not a module).  How is this done?  Does it use Distutils, or > something completely different?  Thanks in advance. > > -- Ratfink You first want to make su

Re: tkinter for my python program !!

2008-07-23 Thread Jason Scheirer
On Jul 23, 11:38 am, David <[EMAIL PROTECTED]> wrote: > > Further, finally when i invoke the python program by > > giving the necessary input file, i get the following > > errors . > > Does it have any relation with the python version installed ? > > yes > > > I am using Redhat 9.0 > > You may want

Re: GUI Programming by hand not code with Python Code

2008-07-06 Thread Jason Scheirer
On Jul 6, 7:33 pm, [EMAIL PROTECTED] wrote: > Is their a program that lets you design a GUI by hand (like gambas) > not by code (like wxpython) but the commands are in python? > > A program similar to gambas or vb > > Gambas with python code instead of gambas code would be perfect. > > Thanks in ad

Re: "method involving two objects" is that possible in Python?

2008-06-27 Thread Jason Scheirer
On Jun 27, 2:41 pm, Kurda Yon <[EMAIL PROTECTED]> wrote: > Hi, > > I just started to learn Python. I understood how one can create a > class and define a method related with that class. According to my > understanding every call of a methods is related with a specific > object. For example, we have

Re: Django or TurboGears for a new project

2008-06-27 Thread Jason Scheirer
On Jun 27, 9:52 am, Kirk Strauser <[EMAIL PROTECTED]> wrote: > We're looking to migrate a Zope site to Django, but before getting beyond > the dreaming stage, I thought I'd see what others are doing these days. > > If you were going to start a fairly complex site today with lots of DB > integration

Re: Use of the "is" statement

2008-06-27 Thread Jason Scheirer
On Jun 27, 8:38 am, Gary Herron <[EMAIL PROTECTED]> wrote: > Joel Corbin wrote: > > Hello, > > > I'm trying to clarify what exactly the behaviour of the is statement > > is (or should be). Naturally, this has been nearly impossible to > > google for, even using quotations... It is my impression tha

Re: Help me optimize my feed script.

2008-06-26 Thread Jason Scheirer
On Jun 26, 12:30 pm, [EMAIL PROTECTED] wrote: > I wrote my own feed reader using feedparser.py but it takes about 14 > seconds to process 7 feeds (on a windows box), which seems slow on my > DSL line. Does anyone see how I can optimize the script below? Thanks > in advance, Bill > > # UTF-8 > impor

Re: Porn Addiction

2008-06-25 Thread Jason Scheirer
On Jun 24, 5:24 pm, [EMAIL PROTECTED] wrote: > Help, I'm addicted to porn. I've been downloading porn online and > masturbating to it for a few years... Lately it's gotten even worse, I > spend hours and hours surfing and masturbating to it. It's taking over > my life and ruining everything.. I eve

Re: Please explain Python "__whatever__" construct.

2008-06-16 Thread Jason Scheirer
On Jun 16, 2:56 pm, [EMAIL PROTECTED] wrote: > After a couple of weeks studying Python, I already have a few useful > scripts, including one that downloads 1500 Yahoo stock quotes in 6 > seconds. However, many things are puzzling to me. I keep on seeing > things like "__main__" in scripts.  A more

Re: Combining music or video files?

2008-06-15 Thread Jason Scheirer
On Jun 15, 7:53 pm, John Salerno <[EMAIL PROTECTED]> wrote: > Before I try this and destroy my computer :) I just wanted to see if > this would even work at all. Is it possible to read a binary file such > as an mp3 or an avi, put its contents into a new file, then read another > such file and appe

Re: Was the move to Python 2.0 as big a deal?

2008-06-14 Thread Jason Scheirer
On Jun 14, 9:35 am, John Salerno <[EMAIL PROTECTED]> wrote: > Just curious if people put up any resistance to 2.0 like some people do > for 3.0. Was it as big of a change in the language, or was the > transition smoother? It seems silly for anyone to say they would prefer > to stick with 1.x versio

Re: Iterate creating variables?

2008-06-13 Thread Jason Scheirer
On Jun 13, 8:11 am, [EMAIL PROTECTED] wrote: > I have twenty-five checkboxes I need to create (don't ask): > > self.checkbox1 = ... > self.checkbox2 = ... > . > . > . > self.checkbox25 = ... > > Right now, my code has 25 lines in it, one for each checkbox, since > these are all variables. > > Is th

Re: Do this as a list comprehension?

2008-06-09 Thread Jason Scheirer
On Jun 9, 7:06 am, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > Mensanator wrote: > > On Jun 6, 1:40 pm, The Pythonista <[EMAIL PROTECTED]> wrote: > >> On Thu, 05 Jun 2008 23:42:07 -0400, John Salerno wrote: > >>> Is it possible to write a list comprehension for this so as to produce a > >>> list of

Re: Python is slow

2008-05-22 Thread Jason Scheirer
On May 22, 9:14 am, cm_gui <[EMAIL PROTECTED]> wrote: > Python is slow.    Almost all of the web applications written in > Python are slow.   Zope/Plone is slow, sloow, so very slooow.  Even > Google Apps is not faster.   Neither is Youtube. > Facebook and Wikipedia (Mediawiki), written in PH

Re: Serious Problem with Timezone

2008-05-19 Thread Jason Scheirer
On May 19, 3:02 pm, T-u-N-i-X <[EMAIL PROTECTED]> wrote: > Hey There, > > I'm a django developer and working on a project right now.. Last week > I just discovered a new problem in Python.. Here's what I do.. > > [01:00] ([EMAIL PROTECTED] ~)$ date > Sal May 20 01:00:10 EEST 2008 > [01:00] ([EMAIL

Re: python-ldap - Operations Error

2008-04-23 Thread Jason Scheirer
On Apr 23, 5:16 pm, [EMAIL PROTECTED] wrote: > Hello all, I am trying to integrate TurboGears with our Active > Directory here at the office.  TurboGears aside, i cannot get this to > work.  The simplest thing i can do to test this is: > > >>> import ldap > >>> l = ldap.initialize("ldap://server.ne

Re: about python

2008-04-22 Thread Jason Scheirer
On Apr 22, 7:50 pm, [EMAIL PROTECTED] wrote: > How can python execute in browser? > > Mukul Very carefully. Alternately, applets/Jython. -- http://mail.python.org/mailman/listinfo/python-list

Re: Nested lists, simple though

2008-04-20 Thread Jason Scheirer
On Apr 20, 3:25 pm, Zethex <[EMAIL PROTECTED]> wrote: > Im a bit new to python.  Anyway working on a little project of mine and i > have nested lists > > ie > > Answer = [['computer', 'radeon', 'nvidia'], ['motherboard', 'asus']] > > and so forth.., > Anyway the amount of [[]] do increase over time

Re: What happened with python? messed strings?

2008-04-20 Thread Jason Scheirer
On Apr 20, 11:54 am, <[EMAIL PROTECTED]> wrote: > Hi, > I used extensively python and now I find this mess with strings, > I can't even reproduce tutorial examples:>>> "apfel".encode('utf-8')  (it was > with umlaut) > >   File "", line 0 > >     ^ > SyntaxError: 'ascii' codec can't decode byte 0xc

Re: py3k concerns. An example

2008-04-18 Thread Jason Scheirer
On Apr 18, 4:19 pm, Kay Schluehr <[EMAIL PROTECTED]> wrote: > On 18 Apr., 23:09, Matimus <[EMAIL PROTECTED]> wrote: > > > The reason it doesn't work is that you are unpacking the dictionary > > with **, and you have done nothing to define any keys or define a > > length. > > This is a non-issue. Th

Re: Easiest way to get started with WebApps?

2008-04-18 Thread Jason Scheirer
On Apr 18, 12:06 pm, [EMAIL PROTECTED] wrote: > which is the easiest module to use to just get started with webapps > quicklya nd starting getting things up and running, not advanced stuff > just basic. web.py is probably the most reasonable small webapp framework to get going (it's a very small d

Re: String Literal to Blob

2008-04-12 Thread Jason Scheirer
On Apr 12, 2:44 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Victor Subervi wrote: > > in line... > > > On Fri, Apr 11, 2008 at 2:05 PM, Steve Holden <[EMAIL PROTECTED] > > > wrote: > > > Victor Subervi wrote: > > > I have worked on this many hours a day for two

Re: get array element

2008-04-10 Thread Jason Scheirer
On Apr 10, 10:22 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have an array, and I would like to get the indice value. > > a = array([13,14,15,16]) > > I would like something like a.getindice(15) > > If I want 15 it would return 2 a.index(15) -- http://mail.python.org/mailman/listinfo/p

Re: Google App Engine

2008-04-08 Thread Jason Scheirer
On Apr 8, 7:50 pm, John Nagle <[EMAIL PROTECTED]> wrote: > Duncan Booth wrote: > > Google have announced a new service called 'Google App Engine' which may > > be of interest to some of the people here > > OK, now we need a compatibility layer so you can move apps from > Google App Engine to yo

Re: Newbie: How to pass a dictionary to a function?

2008-04-07 Thread Jason Scheirer
On Apr 7, 8:54 pm, BonusOnus <[EMAIL PROTECTED]> wrote: > How do I pass a dictionary to a function as an argument? > > # Say I have a function foo... > def foo (arg=[]): > x = arg['name'] > y = arg['len'] > > s = len (x) > > t = s + y > > return (s, t) > > # The dictionary: > > dict = {} > dict['na

Re: Unicode conversion problem (codec can't decode)

2008-04-03 Thread Jason Scheirer
On Apr 3, 9:35 pm, "Eric S. Johansson" <[EMAIL PROTECTED]> wrote: > I'm having a problem (Python 2.4) converting strings with random 8-bit > characters into an escape form which is 7-bit clean for storage in a database. > Here's an example: > > body = meta['mini_body'].encode('unicode-escape') > >

Re: object-relational mappers

2008-04-01 Thread Jason Scheirer
On Apr 1, 1:40 pm, Aaron Watters <[EMAIL PROTECTED]> wrote: > I've been poking around the world of object-relational > mappers and it inspired me to coin a corellary to the > the famous quote on regular expressions: > > "You have objects and a database: that's 2 problems. > So: get an object-relati

Re: XML Parsing

2008-04-01 Thread Jason Scheirer
On Apr 1, 12:42 pm, Alok Kothari <[EMAIL PROTECTED]> wrote: > Hello, > I am new to XML parsing.Could you kindly tell me whats the > problem with the following code: > > import xml.dom.minidom > import xml.parsers.expat > document = """Lettermanis token>betterthan token>JayLeno""" > > # 3

Re: Automatically fill in forms on line

2008-03-31 Thread Jason Scheirer
On Mar 31, 10:35 am, Jason Scheirer <[EMAIL PROTECTED]> wrote: > On Mar 31, 9:50 am, "Jackie Wang" <[EMAIL PROTECTED]> wrote: > > > > > Dear all, > > > I want to automatically complete the following task: > > > 1. Go tohttp://www.ffiec.

Re: Automatically fill in forms on line

2008-03-31 Thread Jason Scheirer
On Mar 31, 9:50 am, "Jackie Wang" <[EMAIL PROTECTED]> wrote: > Dear all, > > I want to automatically complete the following task: > > 1. Go tohttp://www.ffiec.gov/Geocode/default.aspx; > 2. Fill in an address in the form "Street Address:" . e.g. "1316 State > Highway 102"; > 3. Fill in a ZIPcode in

Re: Time problem (again)

2008-03-27 Thread Jason Scheirer
On Mar 27, 12:17 pm, "Fabio Durieux Lopes" <[EMAIL PROTECTED]> wrote: >Hi, > >I'm recreating a date-time based on a string and I have a problem > when daylight savings time is set (I'm off by 1). So today I forced > my computer into daylight savings time and debugged it again, but > this ti

Re: Pystemmer 1.0.1 installation problem in Linux

2008-03-27 Thread Jason Scheirer
On Mar 27, 8:40 am, mungkol <[EMAIL PROTECTED]> wrote: > Dear all, > > I am a newbie to Python community. For my project, I tried to install > Pystemmer 1.0.1 (http://snowball.tartarus.org/wrappers/ > PyStemmer-1.0.1.tar.gz) on my linux ubuntu 7.10 machine but > unsuccessful. It produced the follow