Re: My newbie annoyances so far

2007-04-27 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Bjoern Schliessmann wrote: > Dennis Lee Bieber wrote: > >> HP RPL made more sense: b if c [else d] end > > Please explain. > > HP RPL: b if c [else d] end > Python: b if c else d > > What's the "more sense" here? The HP RPL leaves even more questions. If the square br

Re: Beginner Ping program

2007-04-27 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Linus Cohen wrote: > I'm a newbie to python and programming in general, so I wanted a > simple project to start off. What I'm trying to do here is write a > python command-line ping program, much like the Unix and Windows ping > programs. I've got this much worked out alrea

Crystal Concepts offering PHP-MYSQL & JAVA/J2EE

2007-04-27 Thread Rajesh
Crystal Concepts offering PHP-MYSQL & JAVA/J2EE courses on short term basis. For details contact, 19/2 New No 182 Kaliamman Koil Street, Virugambakkam Chennai 600 092 mail: [EMAIL PROTECTED] Mobile: 98407-28150 -- http://mail.python.org/mailman/listinfo/python-list

Re: SPE

2007-04-27 Thread SPE - Stani's Python Editor
On Apr 26, 9:06 pm, Glich <[EMAIL PROTECTED]> wrote: > After posting this message I realized the stupid mistake I had made! > But it was too late to change! I think patching it with py2exe would > be a good idea. > > Greetings also, > Glich Yes, it would. Please subscribe to the spe-dev list and I

Re: Cgi File Upload without Form

2007-04-27 Thread Gabriel Genellina
En Fri, 27 Apr 2007 18:10:42 -0300, <[EMAIL PROTECTED]> escribió: > what is the simplest way to upload a file (or a long string) to a > server using cgi/python? > > Since I want to upload the data programmatically, a form based > solution is not good. I am not experienced with SOAP/WSDL and I >

Beginner Ping program

2007-04-27 Thread Linus Cohen
Hi all, I'm a newbie to python and programming in general, so I wanted a simple project to start off. What I'm trying to do here is write a python command-line ping program, much like the Unix and Windows ping programs. I've got this much worked out already: class ping def PING(IP, pings, size

Re: Dedicated CPU core for Python?

2007-04-27 Thread Tim Roberts
Louise Hoffman <[EMAIL PROTECTED]> wrote: > >Have I understood CPU affinity correct, that it is similar to SMP/ >NUMA, only that I can force a process/thread to a cpu core? > >In regards to forcing the Python virtual machine (thanks Michael for >the explanation=) ), is the problem that the "OS core

Re: Numeric + wxPython, can't understand a bug...

2007-04-27 Thread Robert Kern
John Ladasky wrote: > Hi, folks, > > This probably has to do with Numeric and not with wxPython, but I > mention both for completeness. > > My OS: Win2000 > Python: 2.3.4 > wx: 2.6.1.0, Unicode version > Numeric: 23.8 > > > Here's the minimal code: >

Re: Interop between C# and Python

2007-04-27 Thread urielka
thx i will try this. i am also trying XML-RPC,i wrote a basic generator(in python) that genrate a Interface from the XML-RPC service module,but maybe with soaplib i don`t need this if i use wsdl as Visual Studio can generate the code from the wsdl -- http://mail.python.org/mailman/listinfo/pytho

relative import problem

2007-04-27 Thread Alan Isaac
I'm new to relative imports and having a problem. (ValueError: Attempted relative import in non-package) I noticed this: http://www.thescripts.com/forum/thread549516.html Is this behavior intentional? I'm seeing it in Python 2.5.1. Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/

Re: Interop between C# and Python

2007-04-27 Thread Ravi Teja
On Apr 27, 6:09 pm, urielka <[EMAIL PROTECTED]> wrote: > i need a easy way to write a Python Service(be it SOAP or JSONRPC or > whatever) but i need to easily access it from C#,i created a web > service in ZSI(which is really easy) like this: > > from ZSI import dispatch > > def hello(): > retu

Weekly Python Patch/Bug Summary

2007-04-27 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 356 open ( -1) / 3756 closed (+11) / 4112 total (+10) Bugs: 968 open (+10) / 6673 closed (+16) / 7641 total (+26) RFE : 254 open ( +3) / 282 closed ( +2) / 536 total ( +5) New / Reopened Patches __ fixes bug

Re: Memory addressing

2007-04-27 Thread James Stroud
Simon Berube wrote: > On Apr 27, 3:52 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > >>On Fri, 2007-04-27 at 12:41 -0700, Simon Berube wrote: >> >>>Hi, >> >>> I have a rather simple question for which I couldn't find an >>>answer. I noticed how a significant number of objects in Python return >>

Interop between C# and Python

2007-04-27 Thread urielka
i need a easy way to write a Python Service(be it SOAP or JSONRPC or whatever) but i need to easily access it from C#,i created a web service in ZSI(which is really easy) like this: from ZSI import dispatch def hello(): return "hello" dispatch.AsServer(port=8080) simple and easy but how i a

Numeric + wxPython, can't understand a bug...

2007-04-27 Thread John Ladasky
Hi, folks, This probably has to do with Numeric and not with wxPython, but I mention both for completeness. My OS: Win2000 Python: 2.3.4 wx: 2.6.1.0, Unicode version Numeric: 23.8 Here's the minimal code: height = 50 width = 60 L = [] for y in r

Re: Memory addressing

2007-04-27 Thread Simon Berube
Well what I was looking for is more along the lines of if it was possible to assign an object at a fixed memory address like C. But most importantly I was expecting it to be a bad habbit in python and was simply wondering what was the accepted manner of doing so. I did know everything was passed b

Re: Portable SciPy v0.1 released

2007-04-27 Thread Terry Reedy
| > On Apr 27, 6:17 pm, Stef Mientki <[EMAIL PROTECTED]> | > wrote: | >>Portable SciPy, is an easy installer of SciPy for M$ windows users. Thanks Stef for posting this. The write-up on your site looks pretty clear. | Beliavsky wrote: | > If you have an announcement for Windows users, I sugges

Re: Memory addressing

2007-04-27 Thread Gabriel Genellina
On 27 abr, 20:07, [EMAIL PROTECTED] wrote: > That's what we need: a CopyMemory() routine. See the copy and pickle modules. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list

Re: editing scripts on a mac

2007-04-27 Thread James Stroud
Thomas Nelson wrote: > On Apr 27, 11:37 am, Tommy Grav <[EMAIL PROTECTED]> wrote: > >>>him> I do not have a text editor, but here are the answers to >>>him> questions 1-5. >> >>>Now, frankly, I don't think this answer is correct, since I know OS >>>X is >>>a UNIX derivative, but I am loathe to i

Re: Portable SciPy v0.1 released

2007-04-27 Thread James Stroud
Beliavsky wrote: > On Apr 27, 6:17 pm, Stef Mientki <[EMAIL PROTECTED]> > wrote: > >>Portable SciPy, is an easy installer of SciPy for M$ windows users. > > > If you have an announcement for Windows users, I suggest that you not > needlessly turn them off by abbreviating Microsoft as M$ . You do

gmail.py (WAS: Re: [ANN] libgmail 0.0.1 -- Gmail access via Python)

2007-04-27 Thread Stephen Levitus
I saw some material about exporting archived emails from gmail to outlook on the web that had your name in them. I'm looking for a way to export about 200 messages with about 250 or so attachments into an Outlook. Or preferably, I'd like to simply save all of the attachments that are in the gmail a

Re: Memory addressing

2007-04-27 Thread castironpi
On Apr 27, 4:00 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Fri, 2007-04-27 at 12:56 -0700, Simon Berube wrote: > > When you call certain objects __repr__() strings in python you often > > get the : happen. I am simply trying to > > understand how that information can be used to recreate a c

Re: Dedicated CPU core for Python?

2007-04-27 Thread [EMAIL PROTECTED]
On Apr 27, 3:14 pm, "Joshua J. Kugler" <[EMAIL PROTECTED]> wrote: > On Thursday 26 April 2007 14:07, Gabriel Genellina wrote: > > > En Thu, 26 Apr 2007 15:54:38 -0300, Joshua J. Kugler > > <[EMAIL PROTECTED]> escribió: > > >> Are you talking about CPU affinity > >> (http://en.wikipedia.org/wiki/Pro

Re: building _tkinter module with .NET 2005?

2007-04-27 Thread Martin v. Löwis
> The instructions contained in both these readme.txt files say that the > Tcl, Tk, and Tix projects must be built from the command line first, > using nmake.exe in conjunction with the corresponding makefile.vc for > each package. I can get this to work using .NET 2003, but not > with .NET 2005. I

Re: Portable SciPy v0.1 released

2007-04-27 Thread Beliavsky
On Apr 27, 6:17 pm, Stef Mientki <[EMAIL PROTECTED]> wrote: > Portable SciPy, is an easy installer of SciPy for M$ windows users. If you have an announcement for Windows users, I suggest that you not needlessly turn them off by abbreviating Microsoft as M$ . You don't like Windows, but many of us

Re: getting rid of EOL character ?

2007-04-27 Thread John Machin
On 27/04/2007 11:19 PM, Michael Hoffman wrote: > stef wrote: >> hello, >> >> In the previous language I used, >> when reading a line by readline, the EOL character was removed. Very interesting; how did you distinguish between EOF and an empty line? Did you need to call an isEOF() method before e

Re: Command-line option equiv of PYTHONPATH

2007-04-27 Thread Martin v. Löwis
>> Why not just modify sys.path within the actual script? > > Maybe because he has multiple versions of modules he wants to test his > script against. See the original post: 'I can use it as "#!/usr/bin/perl -I"' so clearly his intention is modify the script. Martin -- http://mail.python.org/m

Re: how to create/ref globals in an alternate namespace?

2007-04-27 Thread James Stroud
Steven W. Orr wrote: > On Friday, Apr 27th 2007 at 14:07 -0700, quoth James Stroud: > > =>Steven W. Orr wrote: > =>> I have two seperate modules doing factory stuff which each have the > =>> similar function2: > =>> > =>> In the ds101 module, def DS101CLASS(mname,data): > =>> cname = mname+'

Re: Which are your favorite UML tools?

2007-04-27 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Anastasios Hatzis a écrit : > > Hello, > > > > I'm working on the light-weight MDA tool pyswarm, > > http://pyswarm.sourceforge.net/ (it is about a code-generator for > > Python/PostgreSQL-based software. I plan

Re: if __name__ == 'main': & passing an arg to a class object

2007-04-27 Thread gtb
Sorry for the wrong implication. I should have said I 'mimicked the style'. No, not used to Java at all, and obviously not versed in python either (do I get points for tcl?). Maxq generates jython scripts and when I saw the .class files I assumed it was the work of the python compiler as what is v

Re: how to create/ref globals in an alternate namespace?

2007-04-27 Thread alisonken1
On Apr 27, 2:33 pm, "Steven W. Orr" <[EMAIL PROTECTED]> wrote: > On Friday, Apr 27th 2007 at 14:07 -0700, quoth James Stroud: > > I'm trying to see if by being clever, I can factor out the common code of > the four different functions and still end up with what they create ending > up in the name

[ANN] Portable SciPy v0.1 released

2007-04-27 Thread Stef Mientki
Portable SciPy, is an easy installer of SciPy for M$ windows users. For this moment, you can find the description page, with all links here http://oase.uci.kun.nl/~mientki/data_www/pic/jalcc/python/portable_scipy.html For future use, it's advised to always use my redirector page http://pic.

RE: what python technology for my app?

2007-04-27 Thread Dietmar Schwertberger
In article <[EMAIL PROTECTED]>, Robert Rawlins - Think Blue mailto:[EMAIL PROTECTED]> wrote: > Haha, no Troll, just a shameless plug for my life's one true love ;-) Strange enough to live that love on the wrong newsgroup... Until now all indications are: Troll Anyway, given the original poster'

Re: if __name__ == 'main': & passing an arg to a class object

2007-04-27 Thread alisonken1
On Apr 27, 2:08 pm, gtb <[EMAIL PROTECTED]> wrote: > The lines > > if __name__ == 'main': >someClass().fn() > > appear at the end of many examples I see. Is this to cause a .class > file to be generated? > These are samples to give the programmer an idea of how the code is supposed to work. If

Re: use urllib library to have an upload status bar

2007-04-27 Thread Neil Hodgson
shirish: > We have a bug-reporting system in ubuntu called apport. Apparently > apport uses a python library called urllib. As of now, apport does a > bouncing bar while uploading which doesn't give the user idea as to > how much is being uploaded. Here is a Python project that has implemen

Re: if __name__ == 'main': & passing an arg to a class objec

2007-04-27 Thread Daniel Nogradi
> The lines > > if __name__ == 'main': >someClass().fn() > > appear at the end of many examples I see. Is this to cause a .class > file to be generated? Python doesn't generate .class files, and the example you mean is probably more like if __name__ == '__main__': .whatever...

Re: what python technology for my app?

2007-04-27 Thread Gabriel Genellina
En Fri, 27 Apr 2007 08:38:57 -0300, Robert Rawlins - Think Blue <[EMAIL PROTECTED]> escribió: >> The application is for in-house use only and not likely to have more >> than a few users at any one time. I've managed to hack out enough > If you're looking for a web based server side solution, th

Re: Command-line option equiv of PYTHONPATH

2007-04-27 Thread Harry George
Antoon Pardon <[EMAIL PROTECTED]> writes: > On 2007-04-27, James Stroud <[EMAIL PROTECTED]> wrote: > > Rajesh wrote: > >> Hi, > >> > >> The '-I' option adds the path to the list of directories that > >> contains modules that can be included in a script. I can use it as "#!/ > >> usr/bin/perl -I"

Re: how to create/ref globals in an alternate namespace?

2007-04-27 Thread Steven W. Orr
On Friday, Apr 27th 2007 at 14:07 -0700, quoth James Stroud: =>Steven W. Orr wrote: =>> I have two seperate modules doing factory stuff which each have the =>> similar function2: =>> =>> In the ds101 module, def DS101CLASS(mname,data): =>> cname = mname+'DS101' =>> msg_class = globals()[

Re: creating an object from base class

2007-04-27 Thread Ian Clark
Quote iogilvy: > i wish to have some extended functionality added to sockets > > i can create my own socket class class mysocket(socket.socket): > > and all should be fine. Except, the sockets are created for me by the > accept method, listening on port. So how can i take the standard > socket cr

Re: creating an object from base class

2007-04-27 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > i wish to have some extended functionality added to sockets > > i can create my own socket class class mysocket(socket.socket): > > and all should be fine. Except, the sockets are created for me by the > accept method, listening on port. So how can i take the stand

Cgi File Upload without Form

2007-04-27 Thread Karsten . G . Weinert
Hello, what is the simplest way to upload a file (or a long string) to a server using cgi/python? Since I want to upload the data programmatically, a form based solution is not good. I am not experienced with SOAP/WSDL and I believe that would be more difficult than necessary. The client program

if __name__ == 'main': & passing an arg to a class object

2007-04-27 Thread gtb
The lines if __name__ == 'main': someClass().fn() appear at the end of many examples I see. Is this to cause a .class file to be generated? The last line of the sample below has a string parameter. When I mimicked this I got an error stating that the class constructor did not take an arg, wh

Re: how to create/ref globals in an alternate namespace?

2007-04-27 Thread James Stroud
Steven W. Orr wrote: > I have two seperate modules doing factory stuff which each have the > similar function2: > > In the ds101 module, def DS101CLASS(mname,data): > cname = mname+'DS101' > msg_class = globals()[cname] > msg = msg_class(data) > return msg > > and in the fdu modu

Re: Which are your favorite UML tools?

2007-04-27 Thread Bruno Desthuilliers
Anastasios Hatzis a écrit : > Hello, > > I'm working on the light-weight MDA tool pyswarm, > http://pyswarm.sourceforge.net/ (it is about a code-generator for > Python/PostgreSQL-based software. I plan to add support of UML CASE tools > other than the one supported currently. > > I would like

Re: My python annoyances so far

2007-04-27 Thread Bruno Desthuilliers
Antoon Pardon a écrit : > On 2007-04-27, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > >>7stud a écrit : >> >>>[EMAIL PROTECTED] wrote: >>> Annoyances: >>> >>>Every language has annoyances. Python is no exception. >> >>Sure. But we may disagree on what are actually Python's annoyanc

Re: Memory addressing

2007-04-27 Thread Carsten Haese
On Fri, 2007-04-27 at 12:56 -0700, Simon Berube wrote: > When you call certain objects __repr__() strings in python you often > get the : happen. I am simply trying to > understand how that information can be used to recreate a certain > object that failed as per the given purpose of the __repr__(

how to create/ref globals in an alternate namespace?

2007-04-27 Thread Steven W. Orr
I have two seperate modules doing factory stuff which each have the similar function2: In the ds101 module, def DS101CLASS(mname,data): cname = mname+'DS101' msg_class = globals()[cname] msg = msg_class(data) return msg and in the fdu module, def FDUCLASS(mname,data):

Re: editing scripts on a mac

2007-04-27 Thread Aahz
In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: > >Now, frankly, I don't think this answer is correct, since I know OS X is >a UNIX derivative, but I am loathe to involve a programming noob with vi >or something similar. So I wondered if one of the c.l.py mac users could

Re: My newbie annoyances so far

2007-04-27 Thread Bjoern Schliessmann
Dennis Lee Bieber wrote: > And I'll probably ignore those expressions whenever I do get > around to 2.5+... That syntax, in my mind, just... stinks... > > HP RPL made more sense: b if c [else d] end Please explain. HP RPL: b if c [else d] end Python: b if c else d What's the "more sense" here?

Re: Memory addressing

2007-04-27 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Simon Berube wrote: > In short, how do I used strings to recreate > a an object. You already got the answer: you can't. Either you still have a reference to that object, or the memory address is not guaranteed to point to the object anymore even if you could get an objec

Re: Memory addressing

2007-04-27 Thread Bjoern Schliessmann
Simon Berube wrote: > When you call certain objects __repr__() strings in python you > often get the : happen. I am simply > trying to understand how that information can be used to recreate > a certain object that failed as per the given purpose of the > __repr__() functions. It cannot. The str

Re: wxPython (Flex)GridSizer Failing

2007-04-27 Thread kyosohma
On Apr 27, 1:45 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Python v2.5 > wxPython v2.8.3.0 > > I've got an app that has a wx.Panel managed by a FlexGridSizer. There > are 5 columns and 6 rows, all with StaticText widgets and all of > similar size. Everything works fine until I Clear and

Re: python and COM

2007-04-27 Thread Larry Bates
Brian Blais wrote: > Hello, > > I am trying to communicate to a Reuters feed using Python, using a > particular set of libraries called the Adfin Real Time library. I have > VB code, and am trying to port it to python, and admit I really do not > understand COM objects and being a Linux guy mainl

Re: python and COM

2007-04-27 Thread kyosohma
On Apr 27, 2:50 pm, Brian Blais <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to communicate to a Reuters feed using Python, using a particular > set of > libraries called the Adfin Real Time library. I have VB code, and am trying > to port > it to python, and admit I really do not underst

Re: webbrowser.open works in IDLE and cmd shell but not from cygwin prompt

2007-04-27 Thread Gregory Bloom
On Apr 27, 3:12 am, Michael Hoffman <[EMAIL PROTECTED]> wrote: > > And, more to the point, how can I use webbrowser from scripts launched under > > > cygwin? > > If you're using native Windows Python as you seem to be, try > webbrowser.get("windows-default").open_new(url) > > If you want to use Cy

Re: Import Problems

2007-04-27 Thread Robert Kern
Bill Jackson wrote: > Once again, I am having issues with imports... > > Until now, I thought the general guidelines were to rarely use 'from x > import y' syntax, except when you really want to copy names over. No, the guideline is to not use "from x import *" except at the interactive prompt

python and COM

2007-04-27 Thread Brian Blais
Hello, I am trying to communicate to a Reuters feed using Python, using a particular set of libraries called the Adfin Real Time library. I have VB code, and am trying to port it to python, and admit I really do not understand COM objects and being a Linux guy mainly, I don't use VB at all.

Re: Memory addressing

2007-04-27 Thread Simon Berube
On Apr 27, 3:52 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Fri, 2007-04-27 at 12:41 -0700, Simon Berube wrote: > > Hi, > > >I have a rather simple question for which I couldn't find an > > answer. I noticed how a significant number of objects in Python return > > a __repr__() string alon

Re: Import Problems

2007-04-27 Thread Bill Jackson
Bill Jackson wrote the following on 04/27/2007 12:49 PM: > # importtest/test2/__init__.py > from someclass import * > from test2 import * Sorry typo here: # importtest/test2/__init__.py from someclass import * from mytest import * -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory addressing

2007-04-27 Thread Carsten Haese
On Fri, 2007-04-27 at 12:41 -0700, Simon Berube wrote: > Hi, > >I have a rather simple question for which I couldn't find an > answer. I noticed how a significant number of objects in Python return > a __repr__() string along the lines of : > > < Object at 0xXX> > >I find this notati

Import Problems

2007-04-27 Thread Bill Jackson
Once again, I am having issues with imports... Until now, I thought the general guidelines were to rarely use 'from x import y' syntax, except when you really want to copy names over. However, I have run into issues by following this guideline. So... 1) What is going wrong in the example below

Re: My newbie annoyances so far

2007-04-27 Thread Paul McGuire
On Apr 27, 12:42 pm, John Nagle <[EMAIL PROTECTED]> wrote: > Dennis Lee Bieber wrote: > > On 27 Apr 2007 08:34:42 -0700, Paul McGuire <[EMAIL PROTECTED]> > > declaimed the following in comp.lang.python: > > >>deficient - ternary expressions are now part of the language after > >>years of refugees f

Memory addressing

2007-04-27 Thread Simon Berube
Hi, I have a rather simple question for which I couldn't find an answer. I noticed how a significant number of objects in Python return a __repr__() string along the lines of : < Object at 0xXX> I find this notation quite convenient to avoid out of control strings when using large arra

Returned mail: see transcript for details

2007-04-27 Thread Mail Administrator
*** ** Attachment file.scr was filtered. ***-- http://mail.python.org/mailman/listinfo/python-list

Re: Dedicated CPU core for Python?

2007-04-27 Thread John Nagle
Joshua J. Kugler wrote: > On Thursday 26 April 2007 14:07, Gabriel Genellina wrote: > > >>En Thu, 26 Apr 2007 15:54:38 -0300, Joshua J. Kugler >><[EMAIL PROTECTED]> escribió: >> >> >>>Are you talking about CPU affinity >>>(http://en.wikipedia.org/wiki/Processor_affinity) or an actual CPU that >>>

Re: editing scripts on a mac

2007-04-27 Thread Michael Bentley
On Apr 27, 2007, at 11:08 AM, Steve Holden wrote: > I am teaching someone Python by email, and part of our conversation > recently ran as follows: > > him> How do I save a script and run it? > > me > Do you have a text editor? If so, edit the script in that, then > save it > me > in your home dir

Re: Dedicated CPU core for Python?

2007-04-27 Thread Joshua J. Kugler
On Thursday 26 April 2007 14:07, Gabriel Genellina wrote: > En Thu, 26 Apr 2007 15:54:38 -0300, Joshua J. Kugler > <[EMAIL PROTECTED]> escribió: > >> Are you talking about CPU affinity >> (http://en.wikipedia.org/wiki/Processor_affinity) or an actual CPU that >> can directory execute Python byte

Re: : Re-ocurring Events

2007-04-27 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Robert Rawlins - Think Blue <[EMAIL PROTECTED]> wrote: . . . >I've been thinking about the possibility of using a combination of xpath to >search the XML with some loops which change the date. As

More urllib timeout issues.

2007-04-27 Thread John Nagle
I thought I had all the timeout problems with urllib worked around, but no. socket.setdefaulttimeout is useful, but not always effective. I'm setting that to 15 seconds. If the host end won't open the connection within 15 seconds, urllib times out. But if the host end opens the connection,

Re: Access to raw command line?

2007-04-27 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2007-04-26, Donn Cave <[EMAIL PROTECTED]> wrote: > > >> One possible way to work around this is to get the raw command line > >> and do the shell expansions ourselves from within Python. Ignoring the > >> question of w

wxPython (Flex)GridSizer Failing

2007-04-27 Thread [EMAIL PROTECTED]
Python v2.5 wxPython v2.8.3.0 I've got an app that has a wx.Panel managed by a FlexGridSizer. There are 5 columns and 6 rows, all with StaticText widgets and all of similar size. Everything works fine until I Clear and re-fill the sizer a few times, then it puts all of the text in the upper-left

Re: http pipelining

2007-04-27 Thread swq22
On Fri, 27 Apr 2007 13:50:21 -0400, Steve Holden <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] wrote: >> Which python module is capable of pipelining http requests? >> >> (I know httplib can send mulitple requests per tcp connection, but in >> a strictly serial way. ) >> >> >There's nothing in

Re: Learning to use wxPython

2007-04-27 Thread KDawg44
On Apr 27, 11:25 am, Michele Petrazzo <[EMAIL PROTECTED]> wrote: > KDawg44 wrote: > > Hi, > > Hi, > > > I downloaded the wxPython demo and did an emerge wxpython (gentoo) to > > install. When I run the demo, I am getting this error: > > > # python demo.py Traceback (most recent call last): File >

Re: http pipelining

2007-04-27 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Which python module is capable of pipelining http requests? > > (I know httplib can send mulitple requests per tcp connection, but in > a strictly serial way. ) > > There's nothing in the standard library, I believe, that includes both client and server functionality

Re: http pipelining

2007-04-27 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Which python module is capable of pipelining http requests? > > (I know httplib can send mulitple requests per tcp connection, but in > a strictly serial way. ) > Oops, sorry, you meant sending requests in parallel, right? You'll need to use either urllib or urllib2 f

Re: My newbie annoyances so far

2007-04-27 Thread John Nagle
Dennis Lee Bieber wrote: > On 27 Apr 2007 08:34:42 -0700, Paul McGuire <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > >>deficient - ternary expressions are now part of the language after >>years of refugees from C and C++ asking how to write "a = b ? c : d", >>and now they

Re: Rational numbers

2007-04-27 Thread M.-A. Lemburg
On 2007-02-23 16:35, Martin Manns wrote: > Hi, > > I am starting to use rationals and since I found no batteries included, > I tried out the mxNumber package. > > However, I get strange warnings on comparison operations > (which however seem to yield correct results): > > --- > $ python > Python

Re: Correct behavior?

2007-04-27 Thread Mitja Trampus
[EMAIL PROTECTED] wrote: > On Apr 26, 8:34 pm, asker <[EMAIL PROTECTED]> wrote: >> But:>>> print "%15.2f" % a+b >> >> Traceback (most recent call last): >> File "", line 1, in >> TypeError: cannot concatenate 'str' and 'float' objects >> >> Is this correct for Python to issue this error? > > Th

Re: use urllib library to have an upload status bar

2007-04-27 Thread Larry Bates
shirish wrote: > Hi all, > Before I start, please know that I'm no developer, just a user. > This is also a cross-post as I have tried to post the same at python- > bugs mailing list, just don't know if it gets in or not. > > We have a bug-reporting system in ubuntu called apport. Apparently

Re: editing scripts on a mac

2007-04-27 Thread Tommy Nordgren
On 27 apr 2007, at 18.08, Steve Holden wrote: > I am teaching someone Python by email, and part of our conversation > recently ran as follows: > > him> How do I save a script and run it? > > me > Do you have a text editor? If so, edit the script in that, then > save it > me > in your home directo

Re: editing scripts on a mac

2007-04-27 Thread Thomas Nelson
On Apr 27, 11:37 am, Tommy Grav <[EMAIL PROTECTED]> wrote: > > him> I do not have a text editor, but here are the answers to > > him> questions 1-5. > > > Now, frankly, I don't think this answer is correct, since I know OS > > X is > > a UNIX derivative, but I am loathe to involve a programming n

Re: My newbie annoyances so far

2007-04-27 Thread Michael Hoffman
John Nagle wrote: > (P.S. PEP 3117 is a joke, right?) Note date of creation. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: editing scripts on a mac

2007-04-27 Thread Tommy Grav
> him> I do not have a text editor, but here are the answers to > him> questions 1-5. > > Now, frankly, I don't think this answer is correct, since I know OS > X is > a UNIX derivative, but I am loathe to involve a programming noob > with vi > or something similar. So I wondered if one of the c

Re: Learning to use wxPython

2007-04-27 Thread Michele Petrazzo
KDawg44 wrote: > Hi, > Hi, > I downloaded the wxPython demo and did an emerge wxpython (gentoo) to > install. When I run the demo, I am getting this error: > > > # python demo.py Traceback (most recent call last): File > "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-ansi/wx/ _misc.py", > line

Re: Accessing SQL View with Python

2007-04-27 Thread kyosohma
On Apr 27, 10:29 am, Tim Golden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi All, > > > I need to access a Microsoft SQL database View. Is there a way to do > > this with Python? I have done a fair share of "googling" and found > > nothing on accessing Views, just executing SQL, whi

Learning to use wxPython

2007-04-27 Thread KDawg44
Hi, I downloaded the wxPython demo and did an emerge wxpython (gentoo) to install. When I run the demo, I am getting this error: # python demo.py Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-ansi/wx/ _misc.py", line 1286, in Notify self.notify()

Re: My newbie annoyances so far

2007-04-27 Thread John Nagle
Paul McGuire wrote: > Python is not VB and Python is not Java and Python is not Ruby and > Python is not any other language that is not Python. As someone who's written in too many programming languages over a long career, I'm quite pleased with Python as a programming language. It's straigh

editing scripts on a mac

2007-04-27 Thread Steve Holden
I am teaching someone Python by email, and part of our conversation recently ran as follows: him> How do I save a script and run it? me > Do you have a text editor? If so, edit the script in that, then save it me > in your home directory (the place you can see when you open the terminal him>

Re: regex question

2007-04-27 Thread proctor
On Apr 27, 8:50 am, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Apr 27, 9:10 am, proctor <[EMAIL PROTECTED]> wrote: > > > > > On Apr 27, 1:33 am, Paul McGuire <[EMAIL PROTECTED]> wrote: > > > > On Apr 27, 1:33 am, proctor <[EMAIL PROTECTED]> wrote: > > > > > hello, > > > > > i have a regex: rx_te

use urllib library to have an upload status bar

2007-04-27 Thread shirish
Hi all, Before I start, please know that I'm no developer, just a user. This is also a cross-post as I have tried to post the same at python- bugs mailing list, just don't know if it gets in or not. We have a bug-reporting system in ubuntu called apport. Apparently apport uses a python libra

Re: Access to raw command line?

2007-04-27 Thread Pieter Edelman
Of course you're right about that. I think an optional GUI or wizard- like interface (in this particular case) would be best, but I was looking for an easy fix :) Thanks for the suggestion though. On Apr 26, 5:25 pm, Michele Simionato <[EMAIL PROTECTED]> wrote: > On Apr 26, 9:04 am, Pieter Edelman

Re: regex question

2007-04-27 Thread Duncan Booth
proctor <[EMAIL PROTECTED]> wrote: >> >>> re.findall('(.)*', 'abc') >> ['c', ''] > thank you this is interesting. in the second example, where does the > 'nothingness' match, at the end? why does the regex 'run again' when > it has already matched everything? and if it reports an empty match >

My newbie annoyances so far

2007-04-27 Thread Paul McGuire
Python is not VB and Python is not Java and Python is not Ruby and Python is not any other language that is not Python. 1. Functions cannot be called without the parens (like in VB) 2. Python uses some naming conventions as programmer cues, such as leading and trailing double-underscores to indic

Re: conditional print statement ?

2007-04-27 Thread Paul McGuire
On Apr 27, 9:45 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > Paul McGuire <[EMAIL PROTECTED]> wrote: > > The Enable/Disable decorators on the Python wiki (http:// > > wiki.python.org/moin/PythonDecoratorLibrary?highlight=%28decorator > > %29#head-8298dbf9ac7325d9ef15e7130e676378bbbda572) help you

Re: Access to raw command line?

2007-04-27 Thread Pieter Edelman
Yes, but I want to make it less difficult for my end users, not more difficult. I think the best is to require an extra switch for the photo files, as some of the people here suggested. On Apr 26, 6:27 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2007-04-26, Pieter Edelman <[EMAIL PROTECTED]>

building _tkinter module with .NET 2005?

2007-04-27 Thread joshusdog
I have the Python 2.5.1 source and I'm trying to build the debug version of the _tkinter module. I've got .NET 2005 (Visual Studio 8) but the instructions in the pcbuild\readme.txt file only contain instructions for using .NET 2003 (Visual Studio 7.1). There's another readme.txt file under the pcbu

Re: Accessing SQL View with Python

2007-04-27 Thread Tim Golden
[EMAIL PROTECTED] wrote: > Hi All, > > I need to access a Microsoft SQL database View. Is there a way to do > this with Python? I have done a fair share of "googling" and found > nothing on accessing Views, just executing SQL, which I already know > how to do. > > I am running Windows XP, Python

Accessing SQL View with Python

2007-04-27 Thread kyosohma
Hi All, I need to access a Microsoft SQL database View. Is there a way to do this with Python? I have done a fair share of "googling" and found nothing on accessing Views, just executing SQL, which I already know how to do. I am running Windows XP, Python 2.4. Thanks a lot! Mike -- http://mai

Re: My python annoyances so far

2007-04-27 Thread Antoon Pardon
On 2007-04-27, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > 7stud a écrit : >> [EMAIL PROTECTED] wrote: >>> Annoyances: >>> >> >> Every language has annoyances. Python is no exception. > > Sure. But we may disagree on what are actually Python's annoyances !-) That is probably why the subje

  1   2   >