Re: non-blocking IO EAGAIN on write

2010-07-27 Thread Lawrence D'Oliveiro
In message , Roy Smith wrote: > Consider, for example, a write on a TCP connection. You are sitting in > a select(), when the other side closes the connection. The select() > should return, and the write should then immediately fail. Remember that select can return 3 different sets of file obje

Re: Are those features still the same?

2010-07-27 Thread Lawrence D'Oliveiro
In message , francogrex wrote: > By the way Peter Norvig is not biased, he works for Google research and is > a supporter of programming in any language, especially in Python. Bias doesn’t have to be a conscious thing. -- http://mail.python.org/mailman/listinfo/python-list

Re: python terminology on classes

2010-07-27 Thread Bruno Desthuilliers
Peng Yu a écrit : Hi I'm still kind of confused about the terminology on classes in python. Could you please let me know what the equivalent terms for the following C++ terms? C++ and Python having very different semantics and object models, there's not necessarily a straight one to one mapp

Re: hasattr + __getattr__: I think this is Python bug

2010-07-27 Thread Bruno Desthuilliers
Ethan Furman a écrit : Bruno Desthuilliers wrote: Duncan Booth a écrit : (snip) Or you could create the default as a class attribute from the OP: """ I have a class (FuncDesigner oofun) that has no attribute "size", but it is overloaded in __getattr__, so if someone invokes "myObject.size",

Re: hasattr + __getattr__: I think this is Python bug

2010-07-27 Thread Bruno Desthuilliers
Bruno Desthuilliers a écrit : Ethan Furman a écrit : Bruno Desthuilliers wrote: Duncan Booth a écrit : (snip) Or you could create the default as a class attribute from the OP: """ I have a class (FuncDesigner oofun) that has no attribute "size", but it is overloaded in __getattr__, so if s

Re: Personal archive tool, looking for suggestions on improving the code

2010-07-27 Thread Peter Otten
mo reina wrote: > i've written a tool in python where you enter a title, content, then > tags, and the entry is then saved in a pickle file. it was mainly > designed for copy-paste functionality (you spot a piece of code you > like on the net, copy it, and paste it into the program), not really >

Re: Checking that 2 pdf are identical (md5 a solution?)

2010-07-27 Thread Peter Otten
rlevesque wrote: > On Jul 24, 1:34 pm, Peter Otten <__pete...@web.de> wrote: >> rlevesque wrote: >> > Unfortunately there is an other pair of values that does not match and >> > it is not obvious to me how to exclude it (as is done with the " / >> > CreationDate" pair). >> > and the pdf document i

Re: Sorting a list created from a parsed xml message

2010-07-27 Thread kak...@gmail.com
On Jul 22, 12:56 pm, Thomas Jollans wrote: > On 07/21/2010 03:38 PM, kak...@gmail.com wrote: > > > > > On Jul 21, 9:04 am, "kak...@gmail.com" wrote: > >> On Jul 21, 8:58 am, Stefan Behnel wrote: > > >>> kak...@gmail.com, 21.07.2010 14:36: > > From the subject of my message it's clear that i

parsing different xml messages

2010-07-27 Thread kak...@gmail.com
Hello, I receive the following different Xml Messages from a socket: http://test.com/pt";> 5a62ded 101 Angie online Some IP http://test.com/pt";> Server server-1 is going down for rede

Re: How to capture all the environment variables from shell?

2010-07-27 Thread Nobody
On Mon, 26 Jul 2010 21:42:24 -0500, Tim Chase wrote: >> Please! Never export anything from your .bashrc unless you >> really know what you're doing. Almost all exports should be >> done in your .bash_profile > > Could you elaborate on your reasoning why (or why-not)? I've > found that my .bash_

Re: Personal archive tool, looking for suggestions on improving the code

2010-07-27 Thread mo reina
On 27 Lug, 10:23, Peter Otten <__pete...@web.de> wrote: > mo reina wrote: > > i've written a tool in python where you enter a title, content, then > > tags, and the entry is then saved in a pickle file. it was mainly > > designed for copy-paste functionality (you spot a piece of code you > > like o

Re: parsing different xml messages

2010-07-27 Thread Stefan Behnel
kak...@gmail.com, 27.07.2010 12:17: I receive the following different Xml Messages from a socket: From a bare socket? TCP? UDP? Or what else? Which is the best way to make a distinction between them so that every time my app receives the one or the other, parse them correctly? Use an appli

Re: Accumulate function in python

2010-07-27 Thread geremy condra
On Wed, Jul 21, 2010 at 8:17 AM, John Nagle wrote: > On 7/19/2010 9:56 AM, dhruvbird wrote: >> >> On Jul 19, 9:12 pm, Brian Victor  wrote: >>> >>> dhruvbird wrote: > >>> Having offered this, I don't recall ever seeing reduce used in real >>> python code, and explicit iteration is almost always pre

newb

2010-07-27 Thread whitey
hi all. am totally new to python and was wondering if there are any newsgroups that are there specifically for beginners. i have bought a book for $2 called "learn to program using python" by alan gauld. starting to read it but it was written in 2001. presuming that the commands and info would

Re: Accumulate function in python

2010-07-27 Thread Stefan Behnel
geremy condra, 27.07.2010 12:54: On Wed, Jul 21, 2010 at 8:17 AM, John Nagle wrote: On 7/19/2010 9:56 AM, dhruvbird wrote: On Jul 19, 9:12 pm, Brian Victor wrote: dhruvbird wrote: Having offered this, I don't recall ever seeing reduce used in real python code, and explicit iteration is a

Re: newb

2010-07-27 Thread John Machin
On Jul 27, 9:07 pm, whitey wrote: > hi all. am totally new to python and was wondering if there are any > newsgroups that are there specifically for beginners. i have bought a > book for $2 called "learn to program using python" by alan gauld. > starting to read it but it was written in 2001. pres

Re: python styles: why Use spaces around arithmetic operators?

2010-07-27 Thread Roy Smith
In article , Stephen Hansen wrote: > PEP8 is a style guide. Parts of style guides are rational judgements and > decisions based on experience and can certainly be "explained" or > justified, but parts are just... personal taste. Style is part rational > thought and part intuition, and in the lat

Re: Checking that 2 pdf are identical (md5 a solution?)

2010-07-27 Thread Robin Becker
.. repeatable,identical PDFs with same timestamp info (for regression testing) I suggest that you edit that file or add from reportlab import rl_config rl_config.invariant = True to your code. Peter WOW!! You are good! Your suggested solution works perfectly. Given your expertise I

Re: parsing different xml messages

2010-07-27 Thread kak...@gmail.com
On Jul 27, 6:30 am, Stefan Behnel wrote: > kak...@gmail.com, 27.07.2010 12:17: > > > I receive the following different Xml Messages from a socket: > >  From a bare socket? TCP? UDP? Or what else? > > > Which is the best way to make a distinction between them so that every > > time my app receives

Re: Personal archive tool, looking for suggestions on improving the code

2010-07-27 Thread Peter Otten
mo reina wrote: > On 27 Lug, 10:23, Peter Otten <__pete...@web.de> wrote: >> mo reina wrote: >> > i've written a tool in python where you enter a title, content, then >> > tags, and the entry is then saved in a pickle file. it was mainly >> > designed for copy-paste functionality (you spot a piece

Re: parsing different xml messages

2010-07-27 Thread Stefan Behnel
kak...@gmail.com, 27.07.2010 13:58: On Jul 27, 6:30 am, Stefan Behnel wrote: kak...@gmail.com, 27.07.2010 12:17: I receive the following different Xml Messages from a socket: From a bare socket? TCP? UDP? Or what else? Which is the best way to make a distinction between them so that ever

Re: parsing different xml messages

2010-07-27 Thread kak...@gmail.com
On Jul 27, 8:14 am, Stefan Behnel wrote: > kak...@gmail.com, 27.07.2010 13:58: > > > > > On Jul 27, 6:30 am, Stefan Behnel wrote: > >> kak...@gmail.com, 27.07.2010 12:17: > > >>> I receive the following different Xml Messages from a socket: > > >>   From a bare socket? TCP? UDP? Or what else? > >

Re: parsing different xml messages

2010-07-27 Thread Stefan Behnel
kak...@gmail.com, 27.07.2010 14:26: On Jul 27, 8:14 am, Stefan Behnel wrote: kak...@gmail.com, 27.07.2010 13:58: On Jul 27, 6:30 am, Stefan Behnel wrote: kak...@gmail.com, 27.07.2010 12:17: I receive the following different Xml Messages from a socket: From a bare socket? TCP? UDP? Or

Re: parsing different xml messages

2010-07-27 Thread kak...@gmail.com
On Jul 27, 8:41 am, Stefan Behnel wrote: > kak...@gmail.com, 27.07.2010 14:26: > > > > > On Jul 27, 8:14 am, Stefan Behnel wrote: > >> kak...@gmail.com, 27.07.2010 13:58: > > >>> On Jul 27, 6:30 am, Stefan Behnel wrote: > kak...@gmail.com, 27.07.2010 12:17: > > > I receive the following d

Why is there no platform independent way of clearing a terminal?

2010-07-27 Thread Daniel Fetchinson
Hi folks, If I'm only interested in linux and windows I know I can do import os import platform if platform.system( ) == 'Linux': clear = 'clear' else: clear = 'cls' os.system( clear ) or something equivalent using os.na

Re: parsing different xml messages

2010-07-27 Thread Stefan Behnel
kak...@gmail.com, 27.07.2010 14:43: On Jul 27, 8:41 am, Stefan Behnel wrote: kak...@gmail.com, 27.07.2010 14:26: On Jul 27, 8:14 am, Stefan Behnel wrote: kak...@gmail.com, 27.07.2010 13:58: On Jul 27, 6:30 am, Stefan Behnel wrote: kak...@gmail.com, 27.07.2010 12:17: I receive the follo

Re: parsing different xml messages

2010-07-27 Thread kak...@gmail.com
On Jul 27, 9:06 am, Stefan Behnel wrote: > kak...@gmail.com, 27.07.2010 14:43: > > > > > On Jul 27, 8:41 am, Stefan Behnel wrote: > >> kak...@gmail.com, 27.07.2010 14:26: > > >>> On Jul 27, 8:14 am, Stefan Behnel wrote: > kak...@gmail.com, 27.07.2010 13:58: > > > On Jul 27, 6:30 am, Stefa

Re: newb

2010-07-27 Thread Dave Angel
whitey wrote: hi all. am totally new to python and was wondering if there are any newsgroups that are there specifically for beginners. i have bought a book for $2 called "learn to program using python" by alan gauld. starting to read it but it was written in 2001. presuming that the commands

Re: Accumulate function in python

2010-07-27 Thread sturlamolden
On 19 Jul, 13:18, dhruvbird wrote: > Hello, >   I have a list of integers: x = [ 0, 1, 2, 1, 1, 0, 0, 2, 3 ] >   And would like to compute the cumulative sum of all the integers > from index zero into another array. So for the array above, I should > get: [ 0, 1, 3, 4, 5, 5, 5, 7, 10 ] >   What is

string manipulation.

2010-07-27 Thread gerardob
I am trying to read an xml using minidom from python library xml.dom This is the xml file: - AB 100 2 ---

Urrlib2 IncompleteRead error

2010-07-27 Thread dirknbr
I am running urllib2.request and get this response when I do the read. Any ideas what causes this? return response.read() File "C:\Python26\lib\socket.py", line 329, in read data = self._sock.recv(rbufsize) File "C:\Python26\lib\httplib.py", line 518, in read return self._read_chunked(

Re: Why is there no platform independent way of clearing a terminal?

2010-07-27 Thread Bruno Desthuilliers
Daniel Fetchinson a écrit : Hi folks, If I'm only interested in linux and windows I know I can do import os import platform if platform.system( ) == 'Linux': clear = 'clear' else: clear = 'cls' os.system( clear ) or so

Check in interpreter if running a debug version of python

2010-07-27 Thread John Reid
Can I check in the interpreter if I am running a debug version of python? I don't mean if __debug__ is set, I want to know if python was compiled in debug mode. Thanks, John. -- http://mail.python.org/mailman/listinfo/python-list

Re: string manipulation.

2010-07-27 Thread Neil Cerutti
On 2010-07-27, gerardob wrote: > > I am trying to read an xml using minidom from python library xml.dom > > This is the xml file: > - > > > > AB > 100 > > 2 > >

Re: Check in interpreter if running a debug version of python

2010-07-27 Thread Christian Heimes
> Can I check in the interpreter if I am running a debug version of > python? I don't mean if __debug__ is set, I want to know if python was > compiled in debug mode. Python has multiple flavors of debug builds. hasattr(sys, "gettotalrefcount") is only available if Py_REF_DEBUG is enabled. This

Re: string manipulation.

2010-07-27 Thread Mark Tolonen
"gerardob" wrote in message news:29276755.p...@talk.nabble.com... I am trying to read an xml using minidom from python library xml.dom This is the xml file: - AB 100 2 -- This is the python code:

Best practice way to open files in Python 2.6+?

2010-07-27 Thread python
What is the best practice way to open files in Python 2.6+ It looks like there are at least 3 different ways to open files: - built-in open() - io.open() - codecs.open() It seems like io.open() combines the best of the built-in open() and the codecs open(). Am I missing any obvious drawbacks to us

Re: Why is there no platform independent way of clearing a terminal?

2010-07-27 Thread Grant Edwards
On 2010-07-27, Bruno Desthuilliers wrote: > Daniel Fetchinson a ?crit : >> Hi folks, >> >> If I'm only interested in linux and windows I know I can do >> >> >> import os >> import platform >> >> if platform.system( ) == 'Linux': >> clear = 'clear' >> else:

Windows: How to detect whether a Python app/script is running in console/GUI mode?

2010-07-27 Thread python
Windows: How can I detect whether a Python app/script is running in console/GUI mode? By app I mean a script compiled to an exe via py2exe or similar. Thank you, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Check in interpreter if running a debug version of python

2010-07-27 Thread Brian Curtin
On Tue, Jul 27, 2010 at 09:06, John Reid wrote: > Can I check in the interpreter if I am running a debug version of python? I > don't mean if __debug__ is set, I want to know if python was compiled in > debug mode. > > Thanks, > John. Starting with Python 2.7 and 3.2 you can do this: >>> syscon

Re: Why is there no platform independent way of clearing a terminal?

2010-07-27 Thread Bruno Desthuilliers
Grant Edwards a écrit : On 2010-07-27, Bruno Desthuilliers wrote: Daniel Fetchinson a ?crit : (snip) Why was clearing a terminal left out? What you're talking about is a shell, not a terminal (a terminal is a physical device). No, what he's talking about is clearing a terminal (or a term

Re: Why is there no platform independent way of clearing a terminal?

2010-07-27 Thread Phil Thompson
On Tue, 27 Jul 2010 16:02:23 +0200, Bruno Desthuilliers wrote: > Daniel Fetchinson a écrit : >> Hi folks, >> >> If I'm only interested in linux and windows I know I can do >> >> >> import os >> import platform >> >> if platform.system( ) == 'Linux': >> clear

Re: Personal archive tool, looking for suggestions on improving the code

2010-07-27 Thread mo reina
On Jul 27, 2:06 pm, Peter Otten <__pete...@web.de> wrote: > mo reina wrote: > > On 27 Lug, 10:23, Peter Otten <__pete...@web.de> wrote: > >> mo reina wrote: > >> > i've written a tool in python where you enter a title, content, then > >> > tags, and the entry is then saved in a pickle file. it was

Re: Best practice way to open files in Python 2.6+?

2010-07-27 Thread Brian Curtin
On Tue, Jul 27, 2010 at 09:33, wrote: > What is the best practice way to open files in Python 2.6+ > > It looks like there are at least 3 different ways to open files: > - built-in open() > - io.open() > - codecs.open() > > It seems like io.open() combines the best of the built-in open() and the

Re: Best practice way to open files in Python 2.6+?

2010-07-27 Thread Antoine Pitrou
On Tue, 27 Jul 2010 10:33:06 -0400 pyt...@bdurham.com wrote: > What is the best practice way to open files in Python 2.6+ > > It looks like there are at least 3 different ways to open files: > - built-in open() > - io.open() > - codecs.open() > It seems like io.open() combines the best of the buil

Re: Windows: How to detect whether a Python app/script is running in console/GUI mode?

2010-07-27 Thread Brian Curtin
On Tue, Jul 27, 2010 at 09:36, wrote: > Windows: How can I detect whether a Python app/script is running in > console/GUI mode? By app I mean a script compiled to an exe via py2exe or > similar. > > Thank you, > Malcolm > I don't remember much about py2exe, but you could check if ``os.path.split

Re: Best practice way to open files in Python 2.6+?

2010-07-27 Thread python
Brian, > As an FYI, the builtin open() uses io.open() on at least 3.1 (maybe also 3.0, don't know). I don't know your use cases or > what you get or don't get from any of those options, but the future is io.open. > > >>> io.open is open > True Under Python 2.6.4 (Windows), "io.open is open" retur

Re: Best practice way to open files in Python 2.6+?

2010-07-27 Thread Brian Curtin
On Tue, Jul 27, 2010 at 09:59, wrote: > Brian, > > Under Python 2.6.4 (Windows), "io.open is open" returns False. Retrieving > help() on io.open and open() reinforces that these are 2 different > implementations of open. > > My use case is reading and writing UTF-8 text files with universal newl

Re: Check in interpreter if running a debug version of python

2010-07-27 Thread Christian Heimes
> Starting with Python 2.7 and 3.2 you can do this: > sysconfig.get_config_var("Py_DEBUG") > 1 > > (returns None if the var doesn't exist) IIRC sysconfig.get_config_var() still depends on parsing the pyconfig.h file. This won't work on Windows because we are using project and config setting

multicpu bzip2 using os.system or queue using python script

2010-07-27 Thread harijay
I want to quickly bzip2 compress several hundred gigabytes of data using my 8 core , 16 GB ram workstation. Currently I am using a simple python script to compress a whole directory tree using bzip2 and a system call coupled to an os.walk call. I see that the bzip2 only uses a single cpu while the

Re: Windows: How to detect whether a Python app/script is running in console/GUI mode?

2010-07-27 Thread Tim Golden
On 27/07/2010 15:58, Brian Curtin wrote: On Tue, Jul 27, 2010 at 09:36, wrote: Windows: How can I detect whether a Python app/script is running in console/GUI mode? By app I mean a script compiled to an exe via py2exe or similar. Thank you, Malcolm I don't remember much about py2exe, but y

Re: Windows: How to detect whether a Python app/script is running in console/GUI mode?

2010-07-27 Thread Emile van Sebille
On 7/27/2010 7:36 AM pyt...@bdurham.com said... Windows: How can I detect whether a Python app/script is running in console/GUI mode? By app I mean a script compiled to an exe via py2exe or similar. Once you've got an exe, you'll need to know the name you're looking for. There are several ut

Re: Personal archive tool, looking for suggestions on improving the code

2010-07-27 Thread John Bokma
mo reina writes: > i mainly did it because i'm always scanning through my pdf files, > books, or the net for some coding example of solution that i'd already > seen before, and it just seemed logical to have something where you > could just put the content in, give it a title and tags, and just l

Re: Urrlib2 IncompleteRead error

2010-07-27 Thread Nitin Pawar
Hi, Check if the webpage you are trying to access is redirecting the page to some other page? or the timeout is too less for the request to finish Thanks, Nitin On Tue, Jul 27, 2010 at 7:30 PM, dirknbr wrote: > I am running urllib2.request and get this response when I do the read. > Any ideas

Re: Urrlib2 IncompleteRead error

2010-07-27 Thread Dirk Nachbar
Thanks, I don't think it's redirecting, how can I increase the timeout? On 27 July 2010 16:56, Nitin Pawar wrote: > Hi, > > Check if the webpage you are trying to access is redirecting the page to > some other page? > or the timeout is too less for the request to finish > > > Thanks, > Nitin > >

Re: Urrlib2 IncompleteRead error

2010-07-27 Thread Nitin Pawar
import socket # timeout in seconds timeout = 10 socket.setdefaulttimeout(timeout) On Tue, Jul 27, 2010 at 10:09 PM, Dirk Nachbar wrote: > Thanks, I don't think it's redirecting, how can I increase the timeout? > > > On 27 July 2010 16:56, Nitin Pawar wrote: > >> Hi, >> >> Check if the webpage

Re: Orange County, California Python User Group

2010-07-27 Thread Calhoon, Tom
Dan: I am an instructor at Cal State Fullerton, and we are looking for a few industry leaders that would be willing to server on an advisory board for a Python programming class series. If you have a minute to talk or know of someone who is interested, please give me a call. Thanks To

Re: Why is there no platform independent way of clearing a terminal?

2010-07-27 Thread Daniel Fetchinson
>>> Hi folks, >>> >>> If I'm only interested in linux and windows I know I can do >>> >>> >>> import os >>> import platform >>> >>> if platform.system( ) == 'Linux': >>> clear = 'clear' >>> else: >>> clear = 'cls' >>> >>> os.system( clear ) >>> #

Re: Why is there no platform independent way of clearing a terminal?

2010-07-27 Thread John Nagle
On 7/27/2010 7:44 AM, Bruno Desthuilliers wrote: Grant Edwards a écrit : On 2010-07-27, Bruno Desthuilliers wrote: Daniel Fetchinson a ?crit : (snip) Why was clearing a terminal left out? What you're talking about is a shell, not a terminal (a terminal is a physical device). No, what he'

Re: hasattr + __getattr__: I think this is Python bug

2010-07-27 Thread Ethan Furman
Bruno Desthuilliers wrote: Bruno Desthuilliers a écrit : Ethan Furman a écrit : Bruno Desthuilliers wrote: Duncan Booth a écrit : (snip) Or you could create the default as a class attribute from the OP: """ I have a class (FuncDesigner oofun) that has no attribute "size", but it is overlo

Re: Why is there no platform independent way of clearing a terminal?

2010-07-27 Thread Grant Edwards
On 2010-07-27, Daniel Fetchinson wrote: > After getting the technicalities out of the way, maybe I should have asked: > > Is it only me or others would find a platform independent python API > to clear the terminal useful? I write a lot of command-line programs, and I can't remember the last tim

Re: multicpu bzip2 using os.system or queue using python script

2010-07-27 Thread MRAB
harijay wrote: I want to quickly bzip2 compress several hundred gigabytes of data using my 8 core , 16 GB ram workstation. Currently I am using a simple python script to compress a whole directory tree using bzip2 and a system call coupled to an os.walk call. I see that the bzip2 only uses a sin

Re: python terminology on classes

2010-07-27 Thread John Nagle
On 7/27/2010 12:17 AM, Bruno Desthuilliers wrote: destructor Python has no real destructor. You can implement a __del__ method that will _eventually_ be called before the instance gets garbage-collected, but you'd rather not rely on it. Also, implementing this method will prevent cycle detecti

Re: Updating path.py

2010-07-27 Thread Michael Hoffman
Robert Kern wrote: On 7/26/10 5:16 PM, Michael Hoffman wrote: I have been using Jason Orendorff's path.py module for a long time. It is very useful. The only problem is that Python 2.6 deprecates the md5 module it imports, so I (and others using my software) now get this warning whenever they

suitable py2app.

2010-07-27 Thread ata.jaf
Hi, I'm looking for a suitable tutorial for "py2app". I googled it but couldn't find anything. Can you help me please? Thanks Ata -- http://mail.python.org/mailman/listinfo/python-list

Re: suitable py2app.

2010-07-27 Thread Nitin Pawar
see if this helps http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html On Tue, Jul 27, 2010 at 11:06 PM, ata.jaf wrote: > Hi, > I'm looking for a suitable tutorial for "py2app". I googled it but > couldn't find anything. > Can you help me please? > Thanks > Ata > -- > http://mail.python.

Re: Why is there no platform independent way of clearing a terminal?

2010-07-27 Thread Terry Reedy
On 7/27/2010 12:58 PM, Daniel Fetchinson wrote: After getting the technicalities out of the way, maybe I should have asked: Is it only me or others would find a platform independent python API to clear the terminal useful? One problem is, Where would you put it? The OS module is for system c

pyodbc problem

2010-07-27 Thread Martin Gregorie
I have a small problem: I can't get pyodbc to connect to a PostgreSQL database. All it does is spit out a malformed error message. When I run this: == import pyodbc dsn = pyodbc.dataSources() print "Data sources:%s" % dsn conn = pyodbc.connect(ds

Re: multicpu bzip2 using os.system or queue using python script

2010-07-27 Thread harijay
Thanks a tonne..That code works perfectly and also shows me how to think of using queue and threads in my python programs Hari On Jul 27, 1:26 pm, MRAB wrote: > harijay wrote: > > I want to quickly bzip2 compress several hundred gigabytes of data > > using my 8 core , 16 GB ram workstation. > >

Re: Why are String Formatted Queries Considered So Magical? (Spammer analysis)

2010-07-27 Thread John Nagle
On 7/26/2010 4:19 PM, Justin Smith wrote: Seeking industry expert candidates I’m Justin Smith, Director of Tech Recruiting at Express Seattle. I am currently seeking candidates to fill Tech Positions for multiple A- List Clients: Spammer detected. Injection-Info: r27g2000yqb.googlegroup

Which multiprocessing methods use shared memory?

2010-07-27 Thread Kevin Ar18
I'm not sure my previous message went through (I wasn't subscribe), so I'm gonna try again. The multiprocessing module has 4 methods for sharing data between processes: Queues Pipes Shared Memory Map Server Process Which of these use shared memory? I understand that the 3rd (Shared Memory Ma

Re: Which multiprocessing methods use shared memory?

2010-07-27 Thread MRAB
Kevin Ar18 wrote: I'm not sure my previous message went through (I wasn't subscribe), so I'm gonna try again. The multiprocessing module has 4 methods for sharing data between processes: Queues Pipes Shared Memory Map Server Process Which of these use shared memory? I understand that the 3r

tkinter unicode question

2010-07-27 Thread jyoung79
Just curious if anyone could shed some light on this? I'm using tkinter, but I can't seem to get certain unicode characters to show in the label for Python 3. In my test, the label and button will contain the same 3 characters - a Greek Alpha, a Greek Omega with a circumflex and soft breath

Re: Why are String Formatted Queries Considered So Magical? (Spammer analysis)

2010-07-27 Thread John Bokma
John Nagle writes: > On 7/26/2010 4:19 PM, Justin Smith wrote: >> Seeking industry expert candidates >> >> I’m Justin Smith, Director of Tech Recruiting at Express Seattle. I >> am currently seeking candidates to fill Tech Positions for multiple A- >> List Clients: > >Spammer detected. But

Re: Windows: How to detect whether a Python app/script is running in console/GUI mode?

2010-07-27 Thread MrJean1
On Jul 27, 8:36 am, Tim Golden wrote: > On 27/07/2010 15:58, Brian Curtin wrote: > > > On Tue, Jul 27, 2010 at 09:36,  wrote: > > >> Windows: How can I detect whether a Python app/script is running in > >> console/GUI mode? By app I mean a script compiled to an exe via py2exe or > >> similar. > >

Re: Why is there no platform independent way of clearing a terminal?

2010-07-27 Thread Tim Harig
On 2010-07-27, John Nagle wrote: > On 7/27/2010 7:44 AM, Bruno Desthuilliers wrote: >> Grant Edwards a écrit : >>> On 2010-07-27, Bruno Desthuilliers >>> wrote: Daniel Fetchinson a ?crit : >> (snip) > Why was clearing a terminal left out? > What you're talking about is a shell,

Re: tkinter unicode question

2010-07-27 Thread Ned Deily
In article <20100727204532.r7gmz.27213.r...@cdptpa-web20-z02>, wrote: > Just curious if anyone could shed some light on this? I'm using > tkinter, but I can't seem to get certain unicode characters to > show in the label for Python 3. > > In my test, the label and button will contain the sa

urllib timeout

2010-07-27 Thread kBob
I created a script to access weather satellite imagery fron NOAA's ADDS. It worked fine until recently with Python 2.6. The company changed the Internet LAN connections to "Accept Automatic settings" and "Use automatic configuration script" How do you get urllib.urlopen to use the the "aut

Re: Binary compatibility across Python versions?

2010-07-27 Thread Philip Semanchuk
On Jul 26, 2010, at 5:19 PM, Ned Deily wrote: In article , Christian Heimes wrote: [Philip Semanchuk wrote:] Specifically, I'm concerned with binaries created by SWIG for a C++ library that our project uses. We'd like to ship precompiled binaries for Linux, OS X and Windows for Python 2.5

Re: newb

2010-07-27 Thread Lie Ryan
On Tue, 27 Jul 2010 11:07:09 GMT, whitey wrote: hi all. am totally new to python and was wondering if there are any newsgroups that are there specifically for beginners. Yes, Python Tutor list is specifically aimed for beginners. You can access it by subscribing to either tu...@python.org or

Re: urllib timeout

2010-07-27 Thread MRAB
kBob wrote: I created a script to access weather satellite imagery fron NOAA's ADDS. It worked fine until recently with Python 2.6. The company changed the Internet LAN connections to "Accept Automatic settings" and "Use automatic configuration script" How do you get urllib.urlopen to use

Re: Binary compatibility across Python versions?

2010-07-27 Thread Ned Deily
In article <0a4c9b21-6eff-461a-b15c-415d1408d...@semanchuk.com>, Philip Semanchuk wrote: [...] > Thanks to all who replied on this topic. A little more background -- > these binaries are just a convenience for our users and we don't have > to cover every possible permutation of Python, only t

Re: urllib timeout

2010-07-27 Thread kBob
On Jul 27, 4:23 pm, MRAB wrote: > kBob wrote: > > >  I created a script to access weather satellite imagery fron NOAA's > > ADDS. > > >  It worked fine until recently with Python 2.6. > > >  The company changed the Internet LAN connections to "Accept Automatic > > settings" and "Use automatic conf

Re: urllib timeout

2010-07-27 Thread MRAB
kBob wrote: On Jul 27, 4:23 pm, MRAB wrote: kBob wrote: I created a script to access weather satellite imagery fron NOAA's ADDS. It worked fine until recently with Python 2.6. The company changed the Internet LAN connections to "Accept Automatic settings" and "Use automatic configuration s

subprocess module under python 2.7

2010-07-27 Thread Timothy W. Grove
I am using the following code to hide the console window when launching a subprocess under Windows. startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW startupinfo.wShowWindow = subprocess.SW_HIDE self.mplayer = Popen(args,

Re: subprocess module under python 2.7

2010-07-27 Thread Chris Rebert
On Tue, Jul 27, 2010 at 4:12 PM, Timothy W. Grove wrote: > I am using the following code to hide the console window when launching a > subprocess under Windows. > >       startupinfo = subprocess.STARTUPINFO() >       startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW >       startupinfo.wShow

Re: Are those features still the same?

2010-07-27 Thread Thomas Jollans
On 07/25/2010 11:02 AM, francogrex wrote: > Terry Reedy wrote: >> As other have said, mostly, but I would change the following... > > Thanks for all those who replied. I know these are not all the features but > some of them and again this is not a comparison but a little taste of what > python

Re: newb

2010-07-27 Thread Monte Milanuk
On 7/27/10 4:07 AM, whitey wrote: hi all. am totally new to python and was wondering if there are any newsgroups that are there specifically for beginners. i have bought a book for $2 called "learn to program using python" by alan gauld. starting to read it but it was written in 2001. presuming t

Re: newb

2010-07-27 Thread Mithrandir
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/27/2010 04:07 AM, whitey wrote: > hi all. am totally new to python and was wondering if there are any > newsgroups that are there specifically for beginners. i have bought a > book for $2 called "learn to program using python" by alan gauld. >

Re: Are those features still the same?

2010-07-27 Thread Mithrandir
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/26/2010 11:58 PM, Lawrence D'Oliveiro wrote: > In message , francogrex wrote: > >> By the way Peter Norvig is not biased, he works for Google research and is >> a supporter of programming in any language, especially in Python. > > Bias doesn’t

The Miracle and Challenge of the Quran

2010-07-27 Thread nais-saudi
The Miracle and Challenge of the Quran ---­--- http://www.youtube.com/watch?v=m3A8R...layer_embedded http://www.youtube.com/watch?v=m3A8R...layer_embedded -

Where is the help page for re.MatchObject?

2010-07-27 Thread Peng Yu
I know the library reference webpage for re.MatchObject is at http://docs.python.org/library/re.html#re.MatchObject But I don't find such a help page in python help(). Does anybody know how to get it in help()? >>> help(re.MatchObject) Traceback (most recent call last): File "", line 1, in Att

Re: How to capture all the environment variables from shell?

2010-07-27 Thread Steven W. Orr
On 07/26/10 22:42, quoth Tim Chase: > On 07/26/10 21:26, Steven W. Orr wrote: >> Please! Never export anything from your .bashrc unless you >> really know what you're doing. Almost all exports should be >> done in your .bash_profile > > Could you elaborate on your reasoning why (or why-not)? I've

Re: Which multiprocessing methods use shared memory?

2010-07-27 Thread John Nagle
On 7/27/2010 12:30 PM, MRAB wrote: Kevin Ar18 wrote: I'm not sure my previous message went through (I wasn't subscribe), so I'm gonna try again. The multiprocessing module has 4 methods for sharing data between processes: Queues Pipes Shared Memory Map Server Process Which of these use shared