Re: OT: Text editors

2012-07-28 Thread rusi
On Jul 29, 10:08 am, Ben Finney  wrote:
> Tim Chase  writes:
> > On Sat, Jul 28, 2012 at 6:29 PM, Mark Lawrence wrote:
> > > I highly recommend the use of notepad++.  If anyone knows of a
> > > better text editor for Windows please let me know :)

I would have bet Mark was ribbing the folks on this list.
Maybe you were not Mark? [Well you did say notepad++ not notepad]
But to get a bit more serious...

>
> I highly recommend not tying your editor skills to a single OS,
> especially one as ornery for programmers as Windows.
>
> > I'll advocate for Vim which is crazy-powerful and works nicely on
> > just about any platform I touch.
>
> > Others will advocate for Emacs, which I can't say fits the way my
> > brain works but it's also powerful and loved by many.
>
> Right. I'm in Tim's position, but reversed: my preference is for Emacs
> but Vim is a fine choice also. They are mature, well-supported with
> regular updates and a massive library of plug-ins for different uses,
> have a huge community to help you, and work on all major programming
> OSen.
>
> > The ubiquity of these two platforms makes a worthwhile investment of
> > time spent in learning at least one if not both.
>
> I use both frequently in my work for different things, and they are good
> for pretty much any task involving manipulation of text.
>
> Learn one of Emacs or Vim well, and you won't need to worry about text
> editors again.

Just curious about your emacs+python usage.
Do you use the emacs builtin python mode or the separate python-mode?
Do you use pdb?
Any other special setups?
How about ipython?

[Personal note: Ive been using and teaching python with emacs for over
10 years now.
But I am getting increasing 'funny looks' for not (for example) using
eclipse.]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: OT: Text editors

2012-07-28 Thread Ben Finney
Tim Chase  writes:

> On Sat, Jul 28, 2012 at 6:29 PM, Mark Lawrence wrote:
> > I highly recommend the use of notepad++.  If anyone knows of a
> > better text editor for Windows please let me know :)

I highly recommend not tying your editor skills to a single OS,
especially one as ornery for programmers as Windows.

> I'll advocate for Vim which is crazy-powerful and works nicely on
> just about any platform I touch.
>
> Others will advocate for Emacs, which I can't say fits the way my
> brain works but it's also powerful and loved by many.

Right. I'm in Tim's position, but reversed: my preference is for Emacs
but Vim is a fine choice also. They are mature, well-supported with
regular updates and a massive library of plug-ins for different uses,
have a huge community to help you, and work on all major programming
OSen.

> The ubiquity of these two platforms makes a worthwhile investment of
> time spent in learning at least one if not both.

I use both frequently in my work for different things, and they are good
for pretty much any task involving manipulation of text.

Learn one of Emacs or Vim well, and you won't need to worry about text
editors again.

-- 
 \“All opinions are not equal. Some are a very great deal more |
  `\   robust, sophisticated, and well supported in logic and argument |
_o__) than others.” —Douglas Adams |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: OT: Text editors (was Re: Search and replace text in XML file?)

2012-07-28 Thread Chris Angelico
On Sun, Jul 29, 2012 at 12:33 PM, hamilton  wrote:
> Ok, so the answer is no.

In terms of the editor, it's fine; you need only worry about Scintilla
itself if you're aiming to incorporate it in your own program.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: OT: Text editors (was Re: Search and replace text in XML file?)

2012-07-28 Thread hamilton

On 7/28/2012 4:42 PM, Chris Angelico wrote:

On Sun, Jul 29, 2012 at 7:43 AM, hamilton  wrote:

On 7/28/2012 1:23 PM, wxjmfa...@gmail.com wrote:


For info: http://scintilla.org/



Just did a quick check on scintilla.

This looks like a single file editor.

Is there a project like capability in there that I did not notice ?


Scintilla is a text editing widget; SciTE is a Scintilla-based Text
Editor (and is by the same author). The editor wraps up Scintilla with
facilities for handling multiple files simultaneously (multiple
buffers/tabbed display/whatever you want to call it).

ChrisA


Ok, so the answer is no.

Thanks

--
http://mail.python.org/mailman/listinfo/python-list


Re: How to represent dates BC

2012-07-28 Thread jwp
On Tuesday, July 24, 2012 2:55:29 AM UTC-7, Laszlo Nagy wrote:
>  >>> conn.getqueryvalue("select '1311-03-14 BC'::date")
> What is the good representation here? Should I implement my own date 

Do your datetime formatting in postgres: "select '1311-03-14 BC'::date::text"

PG does have a have a reasonable set of functions for working with datetime.
If you need something more complicated than a simple cast to text, I'd suggest 
creating a function:

CREATE OR REPLACE FUNCTION fmt_my_dates(date) RETURNS text LANGUAGE SQL AS
$$
SELECT EXTRACT(.. FROM $1)::text || ...
$$;
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: pythonpackages.com beta

2012-07-28 Thread Alex Clark

Hi Python folks,


I am reaching out to various Python-related programming communities in 
order to offer new help packaging your software.


If you have ever struggled with packaging and releasing Python software 
(e.g. to PyPI), please check out this service:



- http://pythonpackages.com


The basic idea is to automate packaging by checking out code, testing, 
and uploading (e.g. to PyPI) all through the web, as explained in this 
introduction:



- http://docs.pythonpackages.com/en/latest/introduction.html


Also, I will be available to answer your Python packaging questions most 
days/nights in #pythonpackages on irc.freenode.net. Hope to meet/talk 
with all of you soon.




Alex



--
Alex Clark · http://pythonpackages.com/ONE_CLICK

--
http://mail.python.org/mailman/listinfo/python-list


Re: OT: Text editors (was Re: Search and replace text in XML file?)

2012-07-28 Thread Chris Angelico
On Sun, Jul 29, 2012 at 7:43 AM, hamilton  wrote:
> On 7/28/2012 1:23 PM, wxjmfa...@gmail.com wrote:
>>
>> For info: http://scintilla.org/
>
>
> Just did a quick check on scintilla.
>
> This looks like a single file editor.
>
> Is there a project like capability in there that I did not notice ?

Scintilla is a text editing widget; SciTE is a Scintilla-based Text
Editor (and is by the same author). The editor wraps up Scintilla with
facilities for handling multiple files simultaneously (multiple
buffers/tabbed display/whatever you want to call it).

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Search and replace text in XML file?

2012-07-28 Thread Tim Roberts
todd.tab...@gmail.com wrote:
>
>I basically need to replace every occurrence C:\Program Files with
>C:\Program Files (x86), regardless of location. For example, that 
>text appears within: 
>C:\Program Files\\Map Data\Road_Centerlines.shp
>and also within: 
>C:\Program 
>Files\Templates\RoadNetwork.rtx
>...among others.
>I've tried some non-python methods and they all ruined the XML structure. 

I don't see how that's possible.  XML doesn't have any character counts,
and it doesn't care about extra white space.  A rock-stupid editor
substitution should have been able to do this in two seconds.
-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: OT: Text editors (was Re: Search and replace text in XML file?)

2012-07-28 Thread hamilton

On 7/28/2012 1:23 PM, wxjmfa...@gmail.com wrote:

For info: http://scintilla.org/


Just did a quick check on scintilla.

This looks like a single file editor.

Is there a project like capability in there that I did not notice ?

Thanks

hamilton


--
http://mail.python.org/mailman/listinfo/python-list


Re: OT: Text editors (was Re: Search and replace text in XML file?)

2012-07-28 Thread wxjmfauth
On Saturday, July 28, 2012 7:47:24 PM UTC+2, Chris Angelico wrote:
> On Sun, Jul 29, 2012 at 3:43 AM,   wrote:
> 
> > On Saturday, July 28, 2012 5:51:48 PM UTC+2, Chris Angelico wrote:
> 
> >
> 
> > ... and has a few limitations (eg it only really supports
> 
> >>
> 
> >> UTF-8),
> 
> >
> 
> > ?!
> 
> >
> 
> > It's my daily plain text editor (Windows) since ? (I don't remember).
> 
> > And I'm using it for utf-8, utf-16 and cp1252 (my favorite coding)
> 
> > without problems.
> 
> 
> 
> Okay, I must have misunderstood something then. Was under the
> 
> impression that it had some internals where it worked only in bytes,
> 
> and that things wouldn't always work if you used anything other than
> 
> UTF-8. It's not an issue for me, since UTF-8 suits me just fine, so
> 
> I've never looked into it. Apologies for the Elmer FUD!
> 
> 
> 
> ChrisA

No problem. Important is just to say SciTE works
fine with many codings.

Having said this, I think there is probably some
confusion between the scintilla widget and the editor,
the application, SciTE using scintilla.

In the Python world, the ported "scintilla widget",
wxStyleTextCtrl in wxPython and QScintilla in PyQt
are working internally in utf-8 and the api's, at least
in wxPython, work with a byte arithmetic (annoying).
If I used the PyQt version, I do not remember the status
with Qt. I prefer the QPlainTextEdit widget.

For info: http://scintilla.org/

jmf

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: OT: Text editors (was Re: Search and replace text in XML file?)

2012-07-28 Thread Tim Chase
On Sat, Jul 28, 2012 at 6:29 PM, Mark Lawrence wrote:
> I highly recommend the use of notepad++.  If anyone knows of a
> better text editor for Windows please let me know :)

I'll advocate for Vim which is crazy-powerful and works nicely on
just about any platform I touch.

Others will advocate for Emacs, which I can't say fits the way my
brain works but it's also powerful and loved by many.

The ubiquity of these two platforms makes a worthwhile investment of
time spent in learning at least one if not both.

-tkc



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: OT: Text editors (was Re: Search and replace text in XML file?)

2012-07-28 Thread Chris Angelico
On Sun, Jul 29, 2012 at 3:43 AM,   wrote:
> On Saturday, July 28, 2012 5:51:48 PM UTC+2, Chris Angelico wrote:
>
> ... and has a few limitations (eg it only really supports
>>
>> UTF-8),
>
> ?!
>
> It's my daily plain text editor (Windows) since ? (I don't remember).
> And I'm using it for utf-8, utf-16 and cp1252 (my favorite coding)
> without problems.

Okay, I must have misunderstood something then. Was under the
impression that it had some internals where it worked only in bytes,
and that things wouldn't always work if you used anything other than
UTF-8. It's not an issue for me, since UTF-8 suits me just fine, so
I've never looked into it. Apologies for the Elmer FUD!

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: OT: Text editors (was Re: Search and replace text in XML file?)

2012-07-28 Thread wxjmfauth
On Saturday, July 28, 2012 5:51:48 PM UTC+2, Chris Angelico wrote:

... and has a few limitations (eg it only really supports
> 
> UTF-8), 

?!

It's my daily plain text editor (Windows) since ? (I don't remember).
And I'm using it for utf-8, utf-16 and cp1252 (my favorite coding)
without problems.

jmf
-- 
http://mail.python.org/mailman/listinfo/python-list


PyCon UK 2012 - Call for talks

2012-07-28 Thread Zeth

PyCon UK 2012 - Call for talks

Please forward this email to relevant lists, social networks, etc.

PyCon UK 2012, the UK's official Python conference, returns from the 
28th September to 1st October, Coventry UK.


This volunteer run and organised conference includes sprints, training, 
open space and social events. For more information please see our site 
at pyconuk.org and our wiki at pyconuk.net


If you would like to share your expertise, tell us your horror stories 
or pimp your project, please consider giving a talk at PyConUK.


Your talk should reflect at least one of our four themes ( 
http://pyconuk.net/Themes ).


When planning your talk, it should be no more than 40 minutes.

Please email us the following:

Your name
A contact number
A one paragraph biography
The title of your talk
A short one paragraph abstract
Which theme (or themes) your talk can be categorised under.

If we accept your talk, we would also require a longer abstract in order 
to create a wiki page.


To submit a talk, please email sub...@pyconuk.net before Tuesday 14th 
August 2012.


If you have already given us your talks, and had confirmation from John 
or Zeth, then ignore this message, but we still need the data in the 
wiki if it is not already there.


Best Wishes,
PyCon UK Team
--
http://mail.python.org/mailman/listinfo/python-list


Re: OT: Text editors (was Re: Search and replace text in XML file?)

2012-07-28 Thread Alister
On Sun, 29 Jul 2012 01:51:48 +1000, Chris Angelico wrote:

> On Sat, Jul 28, 2012 at 6:29 PM, Mark Lawrence 
> wrote:
>> I highly recommend the use of notepad++.  If anyone knows of a better
>> text editor for Windows please let me know :)
> 
> My current preference is SciTE, available on Linux and Windows both.
> It's configured using Lua, has lexers (and thus syntax highlighters and
> auto-indenters) for a huge list of languages (including Python, or I
> wouldn't mention it), and isn't RAM-hungry. It's not bug-free (but what
> isn't), and has a few limitations (eg it only really supports UTF-8),
> but I've found it excellent as both text editor and pseudo-IDE.
> 
> ChrisA

I like Geany at present, although i have not tried too many others



-- 
Nothing increases your golf score like witnesses.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Search and replace text in XML file?

2012-07-28 Thread MRAB

On 28/07/2012 09:29, Mark Lawrence wrote:

On 28/07/2012 08:17, Terry Reedy wrote:

On 7/27/2012 9:23 PM, todd.tab...@gmail.com wrote:

I'm looking to search an entire XML file for specific text and
replace that text, while maintaining the structure of the XML file.


For a one-off project, or for experimentation, I would use a proper
text-editor* and run through with search/replace. For automation, use
Jason's suggestion of .replace, perhaps on a line-by-line basis.

* By definition, such only make changes you request. Notepad++ is one
such on Windows. You do not want a word or document processor, or, for
simple xml oblivious text substitutions, an xml processor. Such things
often make changes of various sorts.



I highly recommend the use of notepad++.  If anyone knows of a better
text editor for Windows please let me know :)


My own preference is EditPad. I liked EditPad Lite so much that I
bought EditPad Pro.
--
http://mail.python.org/mailman/listinfo/python-list


OT: Text editors (was Re: Search and replace text in XML file?)

2012-07-28 Thread Chris Angelico
On Sat, Jul 28, 2012 at 6:29 PM, Mark Lawrence  wrote:
> I highly recommend the use of notepad++.  If anyone knows of a better text
> editor for Windows please let me know :)

My current preference is SciTE, available on Linux and Windows both.
It's configured using Lua, has lexers (and thus syntax highlighters
and auto-indenters) for a huge list of languages (including Python, or
I wouldn't mention it), and isn't RAM-hungry. It's not bug-free (but
what isn't), and has a few limitations (eg it only really supports
UTF-8), but I've found it excellent as both text editor and
pseudo-IDE.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Search and replace text in XML file?

2012-07-28 Thread Mark Lawrence

On 28/07/2012 08:17, Terry Reedy wrote:

On 7/27/2012 9:23 PM, todd.tab...@gmail.com wrote:

I'm looking to search an entire XML file for specific text and
replace that text, while maintaining the structure of the XML file.


For a one-off project, or for experimentation, I would use a proper
text-editor* and run through with search/replace. For automation, use
Jason's suggestion of .replace, perhaps on a line-by-line basis.

* By definition, such only make changes you request. Notepad++ is one
such on Windows. You do not want a word or document processor, or, for
simple xml oblivious text substitutions, an xml processor. Such things
often make changes of various sorts.



I highly recommend the use of notepad++.  If anyone knows of a better 
text editor for Windows please let me know :)


--
Cheers.

Mark Lawrence.

--
http://mail.python.org/mailman/listinfo/python-list


Re: Search and replace text in XML file?

2012-07-28 Thread Terry Reedy

On 7/27/2012 9:23 PM, todd.tab...@gmail.com wrote:

I'm looking to search an entire XML file for specific text and
replace that text, while maintaining the structure of the XML file.


For a one-off project, or for experimentation, I would use a proper 
text-editor* and run through with search/replace. For automation, use 
Jason's suggestion of .replace, perhaps on a line-by-line basis.


* By definition, such only make changes you request. Notepad++ is one 
such on Windows. You do not want a word or document processor, or, for 
simple xml oblivious text substitutions, an xml processor. Such things 
often make changes of various sorts.


--
Terry Jan Reedy



--
http://mail.python.org/mailman/listinfo/python-list