Re: list of range of floats

2007-02-14 Thread Simon Brunning
On 2/14/07, Steve <[EMAIL PROTECTED]> wrote: > I'm trying to create a list range of floats and running into problems. > I've been trying something like: > > a = 0.0 > b = 10.0 > > flts = range(a, b) > > fltlst.append(flts) > > When I run it I get the following DeprecationWarning: integer argument >

Re: list of range of floats

2007-02-14 Thread Simon Brunning
On 2/14/07, Steve <[EMAIL PROTECTED]> wrote: > After re-reading my original post I was pretty vague. I'm trying to creat > a list of ranges of floats, 0.0 10.0, 11 20, etc then checking to see if > an float, example 12.5 falls in the list and if so get the list index of > where it is in the index.

Re: c_string missing from ctypes?

2007-02-23 Thread Simon Brunning
On 23 Feb 2007 09:03:21 -0800, Jacob Rael <[EMAIL PROTECTED]> wrote: > I was following along with this site: > > http://www.brunningonline.net/simon/blog/archives/000659.html You don't want to be messing around with that old rubbish. I should know - I wrote it. Instead, take a look at

Re: Python, SOAP & SSL

2007-02-28 Thread Simon Brunning
On 2/28/07, Barker, CJ <[EMAIL PROTECTED]> wrote: > Was this ever solved? You might get more feedback about this on the Python web services list at . -- Cheers, Simon B [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk:

Re: msvcr71.dll

2007-02-28 Thread Simon Brunning
On 2/28/07, Konte <[EMAIL PROTECTED]> wrote: > Are there news about the impossibility of redistributing msvcr71.ddl > with own stand-alone application written in python for who doesn't have > MSVC7 license? Last I heard the consensus was that it's OK to distribute msvcr71.ddl. But IANAL, and neith

Re: python equivalent to heckle

2007-11-06 Thread Simon Brunning
On 11/6/07, rustom <[EMAIL PROTECTED]> wrote: > heckle in ruby is inspired by jester for java. I quote: > > Heckle is a mutation tester. It modifies your code and runs your tests > to make sure they fail. The idea is that if code can be changed and > your tests don't notice, either that code isn't

Re: Arrays

2007-11-13 Thread Simon Brunning
On Nov 13, 2007 6:58 AM, John Machin <[EMAIL PROTECTED]> wrote: > Hey Bernard, read Gordon's message carefully; he's asking about > arrays, not lists. Chances are a list is exactly what the OP wants. -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk: simon.bru

Re: which Python ? asks beginner

2007-11-17 Thread Simon Brunning
On Nov 17, 2007 6:20 PM, <[EMAIL PROTECTED]> wrote: > Have given up Java. Want to switch to Python. Welcome! > But _which_ ? > There is ver : > 2.5 out now > 2.6 in beta , final expected Apr 2008 You should go for 2.5.1 unless you have a reason to stick to an older version. (Such re

Re: Excellent sci-fi novel featuring Python

2007-11-17 Thread Simon Brunning
On Nov 17, 2007 4:25 PM, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Nov 17, 9:37 am, Wade Leftwich <[EMAIL PROTECTED]> wrote: > > I'm about halfway through Charles Stross' excellent new novel, > > "Halting State". It's set in Edinburgh in the year 2018, and one of > > the main characters is a gam

Re: How to Teach Python "Variables"

2007-11-26 Thread Simon Brunning
On Nov 25, 2007 6:19 PM, <"@bag.python.org <"none> wrote: > IIRC, I once saw an explanation how Python doesn't have "variables" in > the sense that, say, C does, and instead has bindings from names to > objects. Does anyone have a link? Perhaps you mean: http://effbot.org/zone/python-obje

Re: proposed Python logo

2006-04-21 Thread Simon Brunning
On 4/21/06, Michael Yanowitz <[EMAIL PROTECTED]> wrote: >I think something from Monty Python (I haven't watched it recently > to know what would be ideal) would be more appropriate than an ugly > reptile which is usually associated with evil and our reason for leaving > the Garden of Eden. +1.

Re: Reading Soap struct type

2006-05-10 Thread Simon Brunning
On 5/10/06, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > That is because it is no hash - AFAIK SOAP doesn't support hashes (or > dicts, in python-lingo) out of the box. What you see above essentially a > named tuple. Conceptionally like this: > > class MyStruct: > > def __init__(self, foo, ba

Re: syntax for -c cmd

2006-05-10 Thread Simon Brunning
On 5/10/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > James wrote: > > > Wrong syntax is shown below. What should be the delimiter before else? > > > > python -c 'if 1==1: print "yes"; else print "no"' > > there is no such delimiter. Python's syntax doesn't allow you to put multiple > clauses on

Re: what is the difference between tuple and list?

2006-05-16 Thread Simon Brunning
On 16 May 2006 07:47:24 -0700, daniel <[EMAIL PROTECTED]> wrote: -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: who can give me the detailed introduction of re modle?

2006-05-19 Thread Simon Brunning
On 18 May 2006 22:50:24 -0700, softwindow <[EMAIL PROTECTED]> wrote: > the re module is too large and difficult to study > > i need a detaild introduction. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/b

Re: about py2exe, I installed it, but can't find py2exe.exe in my computer.

2006-05-22 Thread Simon Brunning
On 22 May 2006 04:53:34 -0700, python <[EMAIL PROTECTED]> wrote: > it prompt: invalid command 'py2exe'. > I have import py2exe in setup.py file. Can you show us your setup.py file, the exact command that you typed, and the exact error message that you are getting? -- Cheers, Simon B, [EMAIL PR

Re: manual http request

2006-05-23 Thread Simon Brunning
On 5/22/06, Steve Young <[EMAIL PROTECTED]> wrote: > Hi, I was wondering if there's a way to mimic a web pages' form and just > manually send the http request and get the html response without having to > go through a browser. For example, lets say i wanted to make a search on > google of the key w

Re: Fate of itertools.dropwhile() and itertools.takewhile()

2008-02-18 Thread Simon Brunning
On Dec 29, 2007 11:10 PM, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > I'm considering deprecating these two functions and would like some > feedback from the community or from people who have a background in > functional programming. Personally, I'd rather you kept them around. I have no FP bac

Re: Sending key-presses to other programs on Windows, and settings of controls?

2008-02-22 Thread Simon Brunning
On Thu, Feb 21, 2008 at 1:20 PM, Tim van der Leeuw <[EMAIL PROTECTED]> wrote: > I'm looking for ways to send keypresses to another application on Windows > XP, and to set values of Windows Controls (all of them text-boxes). Try . -- Cheers, Simon B. [EMAIL PROTECTED

Re: List all files using FTP

2008-03-06 Thread Simon Brunning
On Thu, Mar 6, 2008 at 6:11 PM, jay graves <[EMAIL PROTECTED]> wrote: > On Mar 6, 10:46 am, Anders Eriksson <[EMAIL PROTECTED]> wrote: > > I need to list all the files on my FTP account (multiple subdirectories). I > > don't have shell access to the account. > > anyone that has a program that wi

Re: Regarding coding style

2008-03-07 Thread Simon Brunning
On Fri, Mar 7, 2008 at 4:31 PM, K Viltersten <[EMAIL PROTECTED]> wrote: > > 1. When writing English, Strunk and > White apply. I apply Fowler, PEP 8 be damned. ;-) -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python

Re: lowercase u before string in "python for windows"

2008-03-10 Thread Simon Brunning
On Mon, Mar 10, 2008 at 5:20 PM, davidj411 <[EMAIL PROTECTED]> wrote: > why does this occur when using the python windows extensions? There's nothing Windows specific about this - it just means that you have unicode strings. See , -- Cheers, Simon B. [

Re: Check For SELF Variable Existance

2008-03-11 Thread Simon Brunning
On Tue, Mar 11, 2008 at 11:00 AM, Robert Rawlins <[EMAIL PROTECTED]> wrote: > I want to be able to check if a class has a certain property in its 'self' > scope, what's the best way to do this? >>> class Spam(object): ... def egg(self): ... if hasattr(self, 'chips'): print 'got chips!

Re: PODCasts

2008-03-19 Thread Simon Brunning
On Wed, Mar 19, 2008 at 9:06 AM, Mike D <[EMAIL PROTECTED]> wrote: > I really should say net cast as I think it's a better term ;) Since I'm working at The Guardian, I'm bound to stand up for the term 'podcast'. ;-) Besides, it's very established now - too late to fight it. > Does anyone have any

Re: Using threads in python is safe ?

2008-03-19 Thread Simon Brunning
On Wed, Mar 19, 2008 at 7:43 AM, Deepak Rokade <[EMAIL PROTECTED]> wrote: > If jobs to be processed by threds is I/O bound would multithreading help > python to improve speed of application ? Probably, yes. -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ -- http:

Re: changing names of items in a list

2008-03-19 Thread Simon Brunning
On Wed, Mar 19, 2008 at 2:21 PM, royG <[EMAIL PROTECTED]> wrote: > hi > i am trying to rename extension of files in a directory..as an initial > step i made a method in > > class ConvertFiles: > def __init__(self,infldr,outfldr): > self.infldr=infldr > self.outfldr

Re: if __name__ == '__main__':

2008-03-20 Thread Simon Brunning
On Thu, Mar 20, 2008 at 4:12 PM, Bhagwat Kolde <[EMAIL PROTECTED]> wrote: > Hi, > I am new to the python and not getting meaning of following line, > > if __name__ == '__main__': > main() -- Cheers, Simon B.

Re: Do any of you recommend Python as a first programming language?

2008-03-26 Thread Simon Brunning
On Sun, Mar 23, 2008 at 4:29 AM, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > Python is a programming language. It can be used for scripting, but > that's not all it can do. Describing it as a "scripting language" is like > describing a fully-equipped professional kitchen as "a left-over warmin

Re: Dynamic code problem

2008-03-28 Thread Simon Brunning
On Thu, Mar 27, 2008 at 4:13 PM, <[EMAIL PROTECTED]> wrote: > My dynamic code failed at this site http://playwide1.extra.hu/, need > some help thank you. -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk: simo

Re: *Advanced* Python book?

2009-01-18 Thread Simon Brunning
2009/1/17 Michele Simionato : > "Expert Python Programming" by Tarek Ziadé is quite good and I wrote > a review for it: > > http://www.artima.com/weblogs/viewpost.jsp?thread=240415 +1 for this. I'm 3/4 of the way through it, it's pretty good. Covers many on the important areas that the more introd

Re: Why I'm getting the date of yesterday

2009-01-20 Thread Simon Brunning
2009/1/20 Hussein B : > Hey, > I'm trying to get the get the date before today, I tried this: > d = datetime.now() - timedelta(days = -1) > But I got the date of tomorrow. That's because you are taking away a negative value. This is like doing: >>> 0 - (-1) 1 -- Cheers, Simon B. -- http://mail.

Re: Odd syntactic NON-error?

2009-01-30 Thread Simon Brunning
2009/1/30 Alaric Haag : > So, is the "secret" that the period is syntactically an "operator" like > + or * ? Exactly that: . Sh! -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading text file with wierd file extension?

2009-02-02 Thread Simon Brunning
2009/2/2 Lionel : > Hi Folks, Python newbie here. > > I'm trying to open (for reading) a text file with the following > filenaming convension: > > "MyTextFile.slc.rsc" Some kind of a resource fork, perhaps? Where did the file come from? Python doesn't do anything magic with filenames, so this mus

Re: Date Comparison

2009-02-03 Thread Simon Brunning
2009/2/3 Diez B. Roggisch : > Use the java API of java.util. Or better still, use Joda. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: JDBC in CPYTHON

2009-02-03 Thread Simon Brunning
2009/2/3 KMCB : > I was wondering if anyone was aware of a JDBC DBAPI module for > cpython. I have looked at PYJDBC and was interested in avoiding using > that extra level of ICE. I was thinking maybe someone would have back > ported zxJDBC from Jython. Or used that as a starting point, to > cre

Re: v 3.0 mpkg

2009-02-04 Thread Simon Brunning
2009/2/4 John Forse : > Does anyone know if Python v3.0 is available as an .mpkg installer for Mac > 10.5.6. I have used 2.5 & updated to 2.6.1 this way, but can't find any > reference to one on the Python.org download site. I've downloaded the Python > 3.0 folder but can't follow how to install i

Re: [Help] The pywinauto Can't select the MDI's menu using the MenuItems() which return [].

2008-12-18 Thread Simon Brunning
2008/12/18 为爱而生 : > This problem also use the following discription: > How to use pywinauto to open WORD and select its Menu. > I can't do that and have no idea why! > Looking forward your help,Thanks! Word can be automated with COM. My golden rule is that automation via GUI driving is always a la

Re: [Help] The pywinauto Can't select the MDI's menu using the MenuItems() which return [].

2008-12-22 Thread Simon Brunning
2008/12/21 : > The code below opens the Choose Font dialog on my Spanish Windows version: > > py> from pywinauto.application import Application > py> app = Application.start("Notepad.exe") Notepad's menus are build with MFC. Word's menus are not. Trust me, give it up. For automating Word, COM (wi

Re: Returning a string

2009-01-06 Thread Simon Brunning
2009/1/3 Kless : > How is possible that I can print a variable, but when I use *return > var* it returns an empty string What makes you think it's returning an empty string? You aren't doing anything with the return value in line 26 of your example. -- Cheers, Simon B. -- http://mail.python.org/

Re: Best way to spawn process on back end computer

2008-10-16 Thread Simon Brunning
2008/10/16 sophie_newbie <[EMAIL PROTECTED]>: > I'm running a python cgi script on a frontend web server and I want it > to spawn another script (that takes a long time to run) on a backend > number crunching server thats connected to the same network. What do > you think is the best way to do thi

Re: Extracting name strings from assigned objects

2008-10-28 Thread Simon Brunning
2008/10/28 Shannon Mayne <[EMAIL PROTECTED]>: > I would like to ask how one might obtain the assigned name of an > assigned object as a string. That's in the FAQ: . -- Cheers, Simon B. [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Return value usage

2009-04-29 Thread Simon Brunning
2009/4/29 Zac Burns : > I would like to know when my function is called whether or not the > return value is used. Is this doable in python? If it is, can it ever > be pythonic? AFAIK, no, it's not. > The use case is that I have functions who's side effects and return > values are cached. I would

Re: Wrapping comments

2009-05-11 Thread Simon Brunning
2009/5/10 Tobias Weber : > (still not gonna use software that doesn't let me type # because it's > alt+3 on a UK layout; having to re-learn or configure that is just sick) To use Aquamacs with a UK keyboard, you want to select Options, Option Key, Meta & British. Things just work then. -- Cheers

Re: Books for learning how to write "big" programs

2008-05-23 Thread Simon Brunning
On Thu, May 22, 2008 at 4:55 PM, duli <[EMAIL PROTECTED]> wrote: > Hi: > I would like recommendations for books (in any language, not > necessarily C++, C, python) which have walkthroughs for developing > a big software project ? So starting from inception, problem > definition, design, coding and

Re: e-value

2008-06-12 Thread Simon Brunning
On Fri, Jun 13, 2008 at 7:45 AM, Beema shafreen <[EMAIL PROTECTED]> wrote: > ... gi, seq, e_value = line.strip().split('\t') At this point, e_value contains a string value. You'll need to convert it to a float before you can meaningfully compare it. -- Cheers, Simon B. [EMAIL PROTECTED] htt

Re: python script for tortoise cvs

2008-06-19 Thread Simon Brunning
On Thu, Jun 19, 2008 at 2:14 PM, sandeep <[EMAIL PROTECTED]> wrote: > hi > > we are using tortoise cvs and putty. i want to write a python script > to whom i can provide a tag and module.now what this script will do is > look for this specific tag and checks for whether its a individual tag > or it

Re: urllib tutorial or manual

2008-06-26 Thread Simon Brunning
2008/6/24 Alex Bryan <[EMAIL PROTECTED]>: > I have never used the urllib class and I need to use it for an app I am > working on. I am wondering if anyone has any good sites that will fill me in > on it(especially the urllib.urlopen module). Or better yet, an example of > how you would submit a sea

Re: Recursive wildcard file search

2008-07-06 Thread Simon Brunning
2008/7/4 Gerhard Häring <[EMAIL PROTECTED]>: > Robert Dailey wrote: >> Is there a way to perform a recursive file search using wildcards in >> python 3.0b1? [...] > > glob.glob() or glob.iglob(). glob's not recursive AFAIK. This recipe probably still works under Pythion 3K, though:

Re: Strange problem ....

2008-07-23 Thread Simon Brunning
2008/7/23 karthikbalaguru <[EMAIL PROTECTED]>: > I use Redhat 9.0, python-2.2.2-26, python-devel-2.2.2-26 and > db4-4.0.14-20. > > File "/usr/local/SDK/bin/../core/bin/processorlib.py", line 88 >yield ProcessorObjectInfo(child, self.pt) >^ > SyntaxError: invalid syntax

Re: Project Question

2008-08-03 Thread Simon Brunning
2008/8/3 ToshiBoy <[EMAIL PROTECTED]>: > Currently, I'm using iMacro, an add-on to Firefox, which runs a macro > and enters all the info. It's great, but I would like to try and write > a program for this in Python. It needs to collect some user input at > the beginning, and then open the default w

Re: gasp

2008-08-13 Thread Simon Brunning
2008/8/13 kumwaka <[EMAIL PROTECTED]>: > I am a beginner in Python. Please tell me how to go about in > downloading and installing the module gasp.I am using Python 2.5.2. Does this work? easy_install gasp -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk: si

Re: gasp

2008-08-13 Thread Simon Brunning
2008/8/13 Cyprian Kumwaka <[EMAIL PROTECTED]>: > No, it doesn't! I have even tried uninstalling and installing it but still > it doesn't not work. Any more ideas! What error message do you get when you try it? "Doesn't work" isn't anything like enough to go on. And please keep the conversation on

Re: Learning curve for new database program with Python?

2008-04-07 Thread Simon Brunning
On Sun, Apr 6, 2008 at 2:31 AM, John Nagle <[EMAIL PROTECTED]> wrote: > > Basic SQL isn't that hard. Learn CREATE, SELECT, INSERT, > UPDATE, and DELETE syntax. That's enough for most simple > applications. Agreed. What's more, I've found SQL to be the single most transferable skill in IT..

Re: Looking for Conferences/Events on Django, Python, MySQL, etc in Europe 2008?

2008-04-08 Thread Simon Brunning
On Tue, Apr 8, 2008 at 10:10 AM, Simone Brunozzi <[EMAIL PROTECTED]> wrote: > Greetings! > > I'm looking for conferences or events about Python, Django, Dabatases, > Mysql, > PHP, Ruby in Europe (or nearby locations like north africa and middle > east) in 2008. > Do you have any suggestions?

Re: Learning curve for new database program with Python?

2008-04-08 Thread Simon Brunning
On Mon, Apr 7, 2008 at 7:19 PM, Gary Duzan <[EMAIL PROTECTED]> wrote: >It seems to me that ORM can work if your database isn't too > complex and it is the only way your database is going to be accessed. I'm working on a big, complex system using an ORM at the moment - http://gu.com. It's a Ja

Re: Bizarre method keyword-arg bug.

2008-08-18 Thread Simon Brunning
2008/8/18 Jasper <[EMAIL PROTECTED]>: > I'm stumped. I'm calling a method that has keyword args, but not > setting them, and yet one of them starts off with data?! -- Cheers, Simon B. [EMAIL PROTECTED] http:/

Re: How to use win32com to convert a MS WORD doc to HTML ?

2008-08-19 Thread Simon Brunning
2008/8/19 Lave <[EMAIL PROTECTED]>: > Hi, all ! > > I'm a totally newbie huh:) > > I want to convert MS WORD docs to HTML, I found python windows > extension win32com can make this. But I can't find the method, and I > can't find any document helpful. This should be a useful starting point:

Re: Python String Immutability Broken!

2008-08-25 Thread Simon Brunning
2008/8/25 Hendrik van Rooyen <[EMAIL PROTECTED]>: > It is reputed to belong to a programmer who was flayed alive > by the C.L.P. group, because he had violated the immutability > of a python string. You can indeed use ctypes to modify the value of a string - see . You ca

Re: For loop inside an xml template

2008-08-25 Thread Simon Brunning
2008/8/25 Amie <[EMAIL PROTECTED]>: > Hi, > > Is it possible to have a for loop within an xml template? Python has a whole bunch of template libraries. Which are you using? -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk: simon.brunning | MSN: small_values |

Re: How to manipulate list of dictionary

2008-08-26 Thread Simon Brunning
2008/8/26 ajak_yahoo <[EMAIL PROTECTED]>: > Need some help, I have a list of dictionary as below, > > table = [{"Part #":"Washer","Po #":"AE00128","qty":100}, > {"Part #":"Brake Pad","Po #":"AE00154","qty":150}, > {"Part #":"Mesh","Po #":"AE00025","qty":320}, > {"Part #":

Re: Python and database unittests

2008-08-27 Thread Simon Brunning
2008/8/27 alex23 <[EMAIL PROTECTED]>: > Daniel <[EMAIL PROTECTED]> wrote: > It's not database-specific, but the Mock module should help you here: > > http://python-mock.sourceforge.net/ > > There's even an example on that page for mocking a database. There's a number of mocking modules for Python

Re: Python and database unittests

2008-08-27 Thread Simon Brunning
2008/8/27 Marco Bizzarri <[EMAIL PROTECTED]>: > I strongly disagree on using mocks for a database; checking sequences > of SQL statement is fragile, painful, and leads you to frustration > when the actual SQL and the generated SQL do not match. Clearly you need integration tests as well as unit te

Re: finding out the number of rows in a CSV file

2008-08-27 Thread Simon Brunning
2008/8/27 SimonPalmer <[EMAIL PROTECTED]>: > anyone know how I would find out how many rows are in a csv file? > > I can't find a method which does this on csv.reader. len(list(csv.reader(open('my.csv' -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ -- http://

Re: finding out the number of rows in a CSV file

2008-08-27 Thread Simon Brunning
2008/8/27 Jon Clements <[EMAIL PROTECTED]>: >> len(list(csv.reader(open('my.csv' > Not the best of ideas if the row size or number of rows is large! > Manufacture a list, then discard to get its length -- ouch! I do try to avoid premature optimization. ;-) -- Cheers, Simon B. -- http://mai

Re: Getting references to obect instances into a list

2008-08-27 Thread Simon Brunning
2008/8/27 [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > I would like to get the references to objets to put in a huge data > structure (like a list or a heap for example). My objective is to use > as less memory as possible as I have to manage huge amount of entries > in my data structure and need to us

Re: Getting references to obect instances into a list

2008-08-27 Thread Simon Brunning
2008/8/27 [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > I will read the article you told me to but first, please, have a look > at this snippet: > m = [2,3,4] p = ['a','b','c'] q = [m,p] q > [[2, 3, 4, 'a', 'b', 'c'], ['a', 'b', 'c']] del p q > [[2, 3, 4, 'a', 'b', 'c'], ['

Re: Coming from .NET and VB and C

2008-09-03 Thread Simon Brunning
2008/9/3 ToPostMustJoinGroup22 <[EMAIL PROTECTED]>: > Any suggestions for someone new to the scene like me? Welcome! There's a number of resources that you might find useful here: http://wiki.python.org/moin/BeginnersGuide -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-li

Re: Coming from .NET and VB and C

2008-09-04 Thread Simon Brunning
2008/9/3 Dennis Lee Bieber <[EMAIL PROTECTED]>: > non-relational DBMS (if any such are still in use), There certainly are... >> SO, I'm interested in using my Google App space (free 500MB) to >> develop a quick database application. Using Python. I found "Dive >> Into Python" which I will be

Re: handling uncaught exceptions with pdb?

2008-09-12 Thread Simon Brunning
2008/9/10 Paul Rubin <"http://phr.cx"@nospam.invalid>: > I think I've asked about this before, but is there a way to set up > Python to handle uncaught exceptions with pdb? http://code.activestate.com/recipes/65287/ -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/

Re: recursive using the os.walk(path) from the os module

2008-09-17 Thread Simon Brunning
2008/9/17 A. Joseph <[EMAIL PROTECTED]>: > I want to search through a directory and re-arrange all the files into e.g > > All .doc files go into MS WORD folder, all .pdf files goes into PDF Folder. > > I`m thinking of doing something with the os.walk(path) method from os > module, I need some ideal

Re: How to make a reverse for loop in python?

2008-09-20 Thread Simon Brunning
2008/9/20 Alex Snast <[EMAIL PROTECTED]>: > I'm new to python and i can't figure out how to write a reverse for > loop in python > > e.g. the python equivalent to the c++ loop > > for (i = 10; i >= 0; --i) for i in range(10, 0, -1): print i -- Cheers, Simon B. -- http://mail.python.org/mailm

Re: Inheritance but only partly?

2008-10-03 Thread Simon Brunning
2008/10/3 Tim Rowe <[EMAIL PROTECTED]>: > As others have said, no. What nobody seems to have said yet is why. If > Y descends from X, you are saying that Y is an X; that a Y can be used > anywhere an X can. If Y doesn't support some methods of X then it is > *not* an X, and *can't* be used anywher

Re: COM object pointer cast

2006-03-27 Thread Simon Brunning
On 27 Mar 2006 00:19:09 -0800, Axel Bock <[EMAIL PROTECTED]> wrote: > I am fooling around with the Python-COM bridge, and I have a little > question with that. > > In the component I am using is a method which will return an "Entry" > object - basically. In truth it returns some object which inheri

Re: Web Service SOAP - Unknown element v1

2006-04-11 Thread Simon Brunning
On 4/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Im trying to develope a web service that comunicates python (client) with > Java (server). Everything works fine until the client calls a method that > takes parameters ( for example: setName("Joe") ). Any other method that > takes no par

Re: Web Service SOAP - Unknown element v1

2006-04-11 Thread Simon Brunning
On 4/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I've already tried that, but the problem persists... Instead of saying > "Unknown element v1", it says "Unknown element title" (In my case, the > parameter name in the server is title). > > Any other suggestion? Have a look at the SOAP m

Re: Web Service SOAP - Unknown element v1

2006-04-11 Thread Simon Brunning
On 4/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > This is the result of doing: setDVD(title="BenHur") > > *** Outgoing SOAP ** > >SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; > xmlns:SOAP-ENC="http://schema

Re: Best Python web-hosting?

2006-04-11 Thread Simon Brunning
On 9 Apr 2006 11:31:38 -0700, Steve <[EMAIL PROTECTED]> wrote: > http://www.python-hosting.com/ > > I haven't used them myself, but recent research that I did made them > look like good candidates. Python-Hosting.com is run by Remi Delon, author of CherryPy, so you'll be getting your support (shou

Re: reading from a text file

2009-11-30 Thread Simon Brunning
2009/11/27 baboucarr sanneh : > hi all > > i would like to create a python program that would read from a text file and > returns one result at random. This might be of use: http://code.activestate.com/recipes/426332/#c2 -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-lis

Re: can python do this?

2009-12-02 Thread Simon Brunning
2009/12/2 Rounak : > I am a complete newbie. I want to know if the following can be done > using python or should I learn some other language: > (Basically, these are applescripts that I wrote while I used Mac OS) Python can do anything Applescript can do with the appscript module - see

Re: pbs scripts

2009-12-02 Thread Simon Brunning
2009/12/2 aoife : > Hi,very new.hoping to incorporate python into my postgrad. > > Basically I have 2,000 files.I want to write a script that says: > > open each file in turn If they are in one directory, look at the glob module. If they are in a bunch of sub-directories, see os.walk(), or

Re: postgresql_autodoc in Python?

2009-12-07 Thread Simon Brunning
2009/12/6 Wolfgang Keller : > Hello, > > has anyone ever implemented something similar to postgresql_autodoc in Python? Dunno - what is it? -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: Where is my namespace?

2009-12-07 Thread Simon Brunning
2009/12/7 vsoler : > I take the example from Mark Lutz's excellent book "Learning Python". > > *** In nested1.py  I have: > X=99 > def printer(): print X > > *** In nested2.py  I have: > from nested1 import X, printer > X=88 > printer() > > What is amazing is that running nested2.py prints 99 and n

Re: Where is my namespace?

2009-12-07 Thread Simon Brunning
2009/12/7 Steven D'Aprano : > On Mon, 07 Dec 2009 16:25:39 +0000, Simon Brunning wrote: >> If you do "from blah import" the imported module itself isn't bound to >> any name in the importing module - you can't get at it at all. > > Not quite -- you c

Re: OS independent way to check if a python app is running?

2009-12-14 Thread Simon Brunning
2009/12/14 : > Is there an os independent way to check if a python app is running? if True: print "I'm running." ;-) -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: Perl to Python conversion

2009-12-28 Thread Simon Brunning
2009/12/25 Aahz : > > I'd write an imperial to metric converter in Python  ;-) Should be possible to use unum () to do the conversions. The SI units are already defined - adding in any necessary imperial units should be easy enough. -- Cheers, Simon B. -- http://mail.pytho

Re:

2009-12-28 Thread Simon Brunning
2009/12/24 Yulin : > Hi when I start my Pc I get error “ The specified module could not be found. > LoadLibrary(pythondll)failed > > Please Help once I have enterd I get the following….C:\Documents and > settings\all users\.clamwin\quarentine\python25.DLL > > PLEASE help I cant load most of my prog

Re: Absolute beginner

2009-12-30 Thread Simon Brunning
2009/12/30 : > At a dos-prompt : > > Python 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit > (Intel)] on > win32 > Type "help", "copyright", "credits" or "license" for more information. print "Hello" >  File "", line 1 >    print "Hello" >                ^ > SyntaxError: invali

Re: pywinauto to show the dialog , menu, etc

2010-01-01 Thread Simon Brunning
2009/12/31 Hari : > Hi > I am using pywinauto to automate an custom program to startup and load > process , execute etc. But cannot determine menuselect. Is there a way or > tool which can run against the exe to show the menu, dialog box, list box > which are contained within it. Winspector might

Re: Getting access to the process table from python?

2010-01-14 Thread Simon Brunning
2010/1/13 Roy Smith : > I need to get information about what processes are running on a box. > Right now, I'm interested in Solaris and Linux, but eventually > probably other systems too.  I need to know things like the pid, > command line, CPU time, when the process started running, and owner. > >

Re: Author of a Python Success Story Needs a Job!

2010-01-15 Thread Simon Brunning
2010/1/14 Novocastrian_Nomad : > Why is it so many, so called high tech companies, insist on the 19th > century practice of demanding an employee's physical presence in a > specific geographic location. Pair programming and co-location with your end users both hugely increase real productivity, in

Re: What is a list compression in Python?

2010-01-18 Thread Simon Brunning
2010/1/18 Kit : > Hello Everyone, I am not sure if I have posted this question in a > correct board. Can anyone please teach me: > > What is a list compression in Python? Perhaps you mean a list comprehension? If so, see . -- Cheers

Re: use of super

2010-01-19 Thread Simon Brunning
2010/1/19 harryos : > I was going thru the weblog appln in practical django book by > bennet .I came across this > > class Entry(Model): >        def save(self): >                dosomething() >                super(Entry,self).save() > > I couldn't make out why Entry and self are passed as argumen

Re: Create list/dict from string

2010-01-19 Thread Simon Brunning
2010/1/19 Peter Otten <__pete...@web.de>: > Both eval() and json.loads() will do. eval() is dangerous as it allows the > user to run arbitrary python code. Something like might be worth a look too. -- Cheers, Simon B. -- http://mail.python.org/mailm

Re: Is python not good enough?

2010-01-25 Thread Simon Brunning
2010/1/25 Albert van der Horst : > If Go was to compete with anything, they would have give it a name > that was Googleable. ;-) If they want it Googleable, it will be. ;-) -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: My experiences building a small app on Python

2010-01-26 Thread Simon Brunning
2010/1/26 Cascade3891 : > It's a bit of a read. But insightful. We'll be the judge of that, surely? ;-) -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: Help parsing a page with python

2010-01-27 Thread Simon Brunning
2010/1/27 mierdatutis mi : > Hi, > > I would like to parse a webpage to can get the url of the video download. I > use pyhton and firebug but I cant get the url link. > > Example: > > The url where I have to get the video link is: > http://www.rtve.es/mediateca/videos/20100125/saber-comer---salsa-v

Re: Help parsing a page with python

2010-01-27 Thread Simon Brunning
2010/1/27 mierdatutis mi : > Those videos are generated by javascript. > There is some parser with python for javascript??? There is , but simulating the whole context of a browser is going to be a horror. You are probably far better off automating a

Re: Help parsing a page with python

2010-01-27 Thread Simon Brunning
2010/1/27 mierdatutis mi : > Hello again, > > What test case for Windmill? Can you say me the link, please? http://lmgtfy.com/?q=windmill+test -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Ruby

2010-01-27 Thread Simon Brunning
2010/1/27 Jean Guillaume Pyraksos : > What are the arguments for choosing Python against Ruby > for introductory programming ? Frankly, either would be a good choice. I think Python is a little cleaner, but I'm sure you'd find Ruby fans who'd argue the complete opposite. Both have good ecosystems

Re: New Python Novice

2009-10-02 Thread Simon Brunning
2009/10/2 baboucarr sanneh : > Hello Everyone, > > My name is Baboucarr ..am from the gambia (west africa).. I visited some years back. Friendly people. > I just read about > python and i want to know how to program with it.. > I would like you guys to help me in my road to becoming a python guru

<    1   2   3   4   5   6   >