Re: test systems

2011-08-01 Thread James Matthews
Wow, why don't you find some cloud providers and write bootstrap programs.

James

On Mon, Aug 1, 2011 at 6:35 PM, Dan Stromberg  wrote:

>
> I've been testing my Python code on these using virtualbox and/or physical
> machines (but mostly virtualbox):
>
> CentOS 6.0
> Debian
> DragonflyBSD
> Fedora 15
> FreeBSD
> Haiku R1 alpha 3
> Linux Mint
> Minix
> OpenIndiana
> openSUSE
> Sabayon
> Scientific Linux 6
> Slackware
> Solaris Express
> Ubuntu
> Windows 7
>
> Sadly, I don't have enough physmem to run them all concurrently, so I boot,
> test, shutdown; boot, test, shutdown...
>
>
> On Mon, Aug 1, 2011 at 3:42 PM, Ethan Furman  wrote:
>
>> Howdy,
>>
>> I'm going to setup a few linux systems for testing (probably three) as
>> well as the three FreeBSD, OpenBSD, and (possibly) NetBsd.  Oh, and Windows.
>>  ;)
>>
>> Any recommendations on which linuces to pick?
>>
>> ~Ethan~
>> --
>> http://mail.python.org/**mailman/listinfo/python-list
>>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>


-- 
http://www.theboxery.com

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


64bit Python builds on HP-UX ia64 and PA-RISC (Using GCC)

2015-09-23 Thread James Matthews
Hi,

I'm having some issues getting 64bit Python builds on HP-UX. I'm using the
GCC version available from the HP website. I've also tried using HP's
compiler but don't have much success either, even following the readme.
These are the results I get:

PA-RISC:

./configure CC=/opt/hp-gcc64-4.7.1/bin/gcc
make

Traceback (most recent call last):
  File "./setup.py", line 2240, in 
main()
  File "./setup.py", line 2235, in main
'Lib/smtpd.py']
  File "/tmp/jxm/Python-2.7.10/Lib/distutils/core.py", line 151, in setup
dist.run_commands()
  File "/tmp/jxm/Python-2.7.10/Lib/distutils/dist.py", line 953, in
run_commands
self.run_command(cmd)
  File "/tmp/jxm/Python-2.7.10/Lib/distutils/dist.py", line 972, in
run_command
cmd_obj.run()
  File "/tmp/jxm/Python-2.7.10/Lib/distutils/command/build.py", line 127,
in run
self.run_command(cmd_name)
  File "/tmp/jxm/Python-2.7.10/Lib/distutils/cmd.py", line 326, in
run_command
self.distribution.run_command(command)
  File "/tmp/jxm/Python-2.7.10/Lib/distutils/dist.py", line 972, in
run_command
cmd_obj.run()
  File "/tmp/jxm/Python-2.7.10/Lib/distutils/command/build_ext.py", line
337, in run
self.build_extensions()
  File "./setup.py", line 251, in build_extensions
build_ext.build_extensions(self)
  File "/tmp/jxm/Python-2.7.10/Lib/distutils/command/build_ext.py", line
446, in build_extensions
self.build_extension(ext)
  File "./setup.py", line 287, in build_extension
if not self.configure_ctypes(ext):
  File "./setup.py", line 2041, in configure_ctypes
exec f in fficonfig
  File "build/temp.hp-ux-B.11.31-9000-800-2.7/libffi/fficonfig.py", line
33, in 
ffi_sources += ffi_platforms['PA64_HPUX']
KeyError: 'PA64_HPUX'
*** Error exit code 1

During make I also get lots of errors like this: ./pyconfig.h:1188:0:
warning: "_POSIX_C_SOURCE" redefined [enabled by default]


ia64:

./configure CC=/opt/hp-gcc-4.7.1/bin/gcc CFLAGS="-mlp64"
Make

./pyconfig.h:1188:0: warning: "_POSIX_C_SOURCE" redefined [enabled by
default]
:0:0: note: this is the location of the previous definition
/opt/hp-gcc-4.7.1/bin/gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes  Parser/acceler.o  Parser/grammar1.o
Parser/listnode.o  Parser/node.o  Parser/parser.o  Parser/parsetok.o
Parser/bitset.o  Parser/metagrammar.o  Parser/firstsets.o
Parser/grammar.o  Parser/pgen.o Objects/obmalloc.o  Python/mysnprintf.o
Python/pyctype.o  Parser/tokenizer_pgen.o  Parser/printgrammar.o
Parser/pgenmain.o -lnsl -lrt -ldld -ldl  -o Parser/pgen
ld: Mismatched Data ABI. Expected None but found EF_IA_64_ABI64 in file
Parser/acceler.o
Fatal error.
collect2: error: ld returned 1 exit status
*** Error exit code 1
Stop.
*** Error exit code 1

Seems to be a library mismatch?

Any help would be appreciated.

Regards,
James
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: JSONBOT 0.80.3 RELEASED

2011-11-21 Thread James Matthews
Looks good I am going to plug twisted into this.

On Mon, Nov 21, 2011 at 9:49 PM, Bart Thate  wrote:

> Hello world !! I released JSONBOT 0.80.3 .. the first in the 0.80 series ;]
>
> about
> ~
>
> JSONBOT is a chatbot that can take commands and react to events on the
> network it is connected to (IRC, XMPP, WEB
> mostely). Push functionality is also provided (think RSS feeds to your IRC
> channel or XMPP conference). It is possible to program your own plugins to
> create custom
> functionality.
>
> source/docs
> ~~~
>
>  see http://jsonbot.org and http://jsonbot.googlecode.com
>
>
> make backup first
> ~
>
> I added the jsb-backup program, please run this before starting the 0.80
> bot. It will make a backup of your datadir into ~/jsb-backups
>
> changes
> ~~~
>
> * GAE is no longer part of the standard distribution, as that is aimed at
> shell users as of 0.80 - use the mercurial repo if you want to use the GAE
> part of the bot
> * web console is now supported on shell - use the jsb-tornado program to
> launch a tornado web server bot on port 10102
> * jsb-xmpp now supports OpenFire - use --openfire option to enable this
> * todo now uses per user databases instead of per channel - use the -c
> option to the todo command to show the channel todo
> * learn items are not global per default - use !learn-toglobal to copy
> local learn data to the global learndb
> * relay plugins has been rewritten to use bot.cfg.name as well - means
> that relays need to be created again
> * jsb-udpstripped program has been added that can be used to send udp data
> to the bot without the need of making config files (copy and edit it)
> * add fulljids = 1 to your xmpp bot config (most of the times in
> ~/.jsb/config/fleet/default-sxmpp/config) to enable full JID discovery in
> xmpp conference rooms
>  (non anonymous)
>
> and:
>
> * lots of new plugins .. see !list ;]
> * lots of bug fixes - thnx everybody for reporting them
> * still lots of things to fix at
>
> 03:35 < jsonbot> tracker is http://code.google.com/p/jsonbot/issues/list
>
> If you find any problems or have feature request please post that on the
> tracker url above.
>
> Or try @botfather on #dunkbots on irc.freenode.net ;]
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://www.goldwatches.com

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


Re: Multiple Threads - I/O in Same File

2011-11-21 Thread James Matthews
You may have some issues with disk reading as the drive heads move in
different ways

On Mon, Nov 21, 2011 at 8:15 AM,  wrote:

> Hi All,
>
> ** **
>
> Just a question in general.  Is it possible that we have opened one file
> in r+ mode ( file1.txt ). 
>
> We have 2 threads, 
>
> **· **Thread1 will continuously ‘only read’ the file in a loop. **
> **
>
> **· **Thread2 will only update the data in the file ( say a
> number < 100 ). 
>
> Now thread2 has called other script ( written in say Perl/Powershell using
> subprocess.call() ) and those scripts are inturn updating ( only writing )
> into that file by their own file i/o mechanism.
>
> ** **
>
> Is it possible by any chance? One file being shared between different
> processes one is only updating and other is only reading ..? Will this work
> in practical and what can be the complications ?
>
> ** **
>
> ** **
>
> Thanks
>
> Nikunj
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>


-- 
http://www.goldwatches.com

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


Debugger

2007-07-05 Thread James Matthews

Can anyone please tell me of a good debugger that can debug threads. My
issue is that i have a program that is crashing only under certain threads
but others are fine. And when i do it without threads it runs fine!

--
http://www.goldwatches.com/watches.asp?Brand=14
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Changing the user-agent in urllib

2007-07-08 Thread James Matthews

Is there anyway of changing the user-agent in urllib without sub classing
it?

--
http://www.goldwatches.com/watches.asp?Brand=14
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Pydev 1.3.7 Released

2007-07-09 Thread James Matthews

I just downlaoded the old one!

On 7/9/07, Fabio Zadrozny <[EMAIL PROTECTED]> wrote:


Hi All,

Pydev and Pydev Extensions 1.3.7 have been released

Details on Pydev Extensions: http://www.fabioz.com/pydev
Details on Pydev: http://pydev.sf.net
Details on its development: http://pydev.blogspot.com

Release Highlights:
--

* Support for Eclipse 3.3
* Bug Fix: Interpreter modules not correctly set/persisted after
specifying interpreter (so, the builtins and other system libraries would
not be available in completions).
* Mylyn integration.
* Open With Pydev: does not appear for containers anymore.
* Code-completion:
  The folowing cases are now considered in code-completion to discover the
type of a variable:
  o Type/Interface checking: (note that 'assert' is required) assert
isinstance(obj, Interface) -- default from python
  o assert Interface.implementedBy(obj) -- zope
  o assert IsImplementation(obj, Interface) -- custom request
  o assert IsInterfaceDeclared(obj, Interface) -- custom request
  o Factory methods a = adapt(obj, Interface) -- pyprotocols
  o a = obj.GetAdapter(Interface) -- custom request
  o a = obj.get_adapter(Interface) -- custom request
  o a = GetSingleton(Interface) -- custom request
  o a = GetImplementation(Interface) -- custom request


What is PyDev?
---

PyDev is a plugin that enables users to use Eclipse for Python and Jython
development -- making Eclipse a first class Python IDE -- It comes with many
goodies such as code completion, syntax highlighting, syntax analysis,
refactor, debug and many others.


Cheers,

--
Fabio Zadrozny
--
Software Developer

ESSS - Engineering Simulation and Scientific Software
http://www.esss.com.br

Pydev Extensions
http://www.fabioz.com/pydev

Pydev - Python Development Enviroment for Eclipse
http://pydev.sf.net
http://pydev.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list





--
http://www.goldwatches.com/watches.asp?Brand=14
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Choosing Tkinter over wxPython...

2007-07-09 Thread James Matthews

Sorry i am a wxpython person! TKinter wouldn't work for me so i moved to
wxPython. However try pyQT or pyGTK both seem to be good toolkits and have
large user bases

On 7/9/07, Kevin Walzer <[EMAIL PROTECTED]> wrote:


I've spent some time playing with both, and while wxPython is nice,
Tkinter just seems to fit my head better, and with appropriate selection
of widgets and interface design, seems to yield up perfectly usable GUI's.

Can anyone else who finds Tkinter better for them than wxPython (or the
other toolkits) explain why it works for them?

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list





--
http://www.goldwatches.com/watches.asp?Brand=14
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: wxPython and threads

2007-07-18 Thread James Matthews

Sounds like a race condition. is List Ctrl waiting for the gui to return?
Maybe make the processing more then one thread!

On 7/17/07, Stef Mientki <[EMAIL PROTECTED]> wrote:


Benjamin wrote:
> I'm writing a search engine in Python with wxPython as the GUI. I have
> the actual searching preformed on a different thread from Gui thread.
> It sends it's results through a Queue to the results ListCtrl which
> adds a new item. This works fine or small searches, but when the
> results number in the hundreds, the GUI is frozen for the duration of
> the search. I suspect that so many search results are coming in that
> the GUI thread is too busy updating lists to respond to events. I've
> tried buffer the results so there's 20 results before they're sent to
> the GUI thread and buffer them so the results are sent every .1
> seconds. Nothing helps. Any advice would be great.
>
maybe you'ld better ask this question in the wxPython discussion group:

[EMAIL PROTECTED]

cheers,
Stef
--
http://mail.python.org/mailman/listinfo/python-list





--
http://www.goldwatches.com/watches.asp?Brand=14
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Exiting from python shell

2007-07-18 Thread James Matthews

try raise SystemExit

On 7/18/07, Mark Elston <[EMAIL PROTECTED]> wrote:


* James Stroud wrote (on 7/18/2007 4:27 PM):
> Tobiah wrote:
>> For years now, I've been exiting the shell by typing 'exit\n',
>> being chid by the shell, and then typing ^D.  I can't
>> remember a time that I typed the ^D the first time.  Call
>> me an idiot if you must, but since someone took the trouble
>> to catch the command 'exit' in a special way, would it have
>> been so awful to just let it be a way to exit when the shell?
>>
>> Thanks,
>>
>> Toby
>>
>
> Yes, this would have required a ground-up approach to redesigning the
> python language, transmuting it to something like a cross between lisp
> and COBOL and would have rendered it impossible to author with C because
> of the way C implements pointers--hardcoding in assembly would likely be
> required. Beyond that, exiting an interpreter is not known in computer
> science and has been shown impossible by Goedel himself in a series of
> monographs on the topic. Thus, to exit python via a keyword would
> require also reformulating mathematics as we know it. Furthermore, such
> a change would propagate itself, via the observer effect, to the
> behavior of sub atomic particles via ill-defined quantum-mechanical
> affects and would likely result in the reversal of the Second Law of
> Thermodynamics, wherein your refrigerator would end up heating its
> contents and milk would spontaneously spoil, among other anomalies.
>
> For these reasons, you might propose a "quit" keyword.
>
> James
>

You know, some answers simply *must* be saved for posterity

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





--
http://www.goldwatches.com/watches.asp?Brand=14
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Copy List

2007-07-19 Thread James Matthews

A slice still has some references to the old objects a deep copy is a
totally new object!

On 19 Jul 2007 17:04:00 GMT, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]>
wrote:


On Thu, 19 Jul 2007 09:21:54 -0700, Falcolas wrote:

> On Jul 18, 6:56 am, "Rustom Mody" <[EMAIL PROTECTED]> wrote:
>> This is shallow copy
>> If you want deep copy then
>> from copy import deepcopy
>
> What will a "deep copy" of a list give you that using the slice
> notation will not?

Well, a deep copy of course.  ;-)

In [6]: import copy

In [7]: a = [[1, 2], [3, 4]]

In [8]: b = a[:]

In [9]: c = copy.deepcopy(a)

In [10]: a[0][1] = 42

In [11]: a
Out[11]: [[1, 42], [3, 4]]

In [12]: b
Out[12]: [[1, 42], [3, 4]]

In [13]: c
Out[13]: [[1, 2], [3, 4]]

Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list





--
http://www.goldwatches.com/Watches.asp?Brand=14
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Posted messages not appearing in this group

2007-07-19 Thread James Matthews

I am also having some issues. There is a post on the list that appeared 7
times because of this issue i think.

On 7/19/07, David H Wild <[EMAIL PROTECTED]> wrote:


In article <[EMAIL PROTECTED]>,
   Adrian Petrescu <[EMAIL PROTECTED]> wrote:
> Maybe it has shown up and Google simply isn't showing it yet. Can
> anyone confirm that a thread posted yesterday (July 18th, 2007) whose
> title was something like "interpreting os.lstat() output" exists or
> not?

That thread is there, with four postings.

--
David Wild using RISC OS on broadband
www.davidhwild.me.uk
--
http://mail.python.org/mailman/listinfo/python-list





--
http://www.goldwatches.com/watches.asp?Brand=14
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: wxPython, searching, and threads

2007-07-19 Thread James Matthews

I have seen this thread for a while and i do not see it on the wxpython list
so i am posting it there now and will post a reply if i still see this
later!

James

On 7/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


On Jul 18, 3:15 pm, Benjamin <[EMAIL PROTECTED]> wrote:
> Hello! I am writing a search engine with wxPython as the GUI. As the
> search thread returns items, it adds them to a Queue which is picked
> up by the main GUI thread calling itself recursively with
> wx.CallAfter. These are then added to a ListCtrl. This works fine for
> small searches, but with larger and longer searchs the GUI is clogged
> and won't respond. I suspect (I may be wrong) that there are so many
> results being sent to the ListCtrl that the event loop doesn't have
> time to respond to events. I've tried buffering the results before
> sending them to the GIU, but that doesn't help at all. Please advise.

I think what you need to look at is
http://wiki.wxpython.org/LongRunningTasks

That's what the people on the wxPython list usually recommend when
doing what you're doing. I've used the techniques there and they work
great!

Mike

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





--
http://www.goldwatches.com/watches.asp?Brand=14
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Trying to choose between python and java

2007-07-20 Thread James Matthews

You can always use jython. ;)

On 7/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


On Sun, 15 Jul 2007 at 22:28:08 -0700, Alex Martelli wrote:
> James T. Dennis <[EMAIL PROTECTED]> wrote:
>...
> >  You can start writing all your code now as: print() --- calling
> >  the statement as if it were a function.  Then you're future Python
>
> ...except that your output format will thereby become disgusting...:
>
> >>> name = 'Alex'
> >>> print 'Hello', name, 'and welcome to my program!'
> Hello Alex and welcome to my program!
> >>> print('Hello', name, 'and welcome to my program!')
> ('Hello', 'Alex', 'and welcome to my program!')
>
> In Python 2.*, the parentheses will make a tuple, and so you'll get an
> output full of parentheses, quotes and commas.  I think it's pretty bad
> advice to give a newbie, to make his output as ugly as this.
>
>
> Alex
> --

One possible kind of print function that might be used in the interim is
something like:


def print_fn(*args):
"""print on sys.stdout"""
arg_str = " ".join([str(x) for x in args])
print arg_str

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





--
http://www.goldwatches.com/watches.asp?Brand=14
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Python Flagged as a Virus by AVG

2007-07-20 Thread James Matthews

I was reading a Microsoft news group  and came across this post

Got this during a scan of my computer:

infected: object C:\hp\bin\python-2.2.3.exe:\comparisons.html

result: trojan horse PHP/MPack.B

status: infected embedded object

inefected: object C:\hp\bin\python-2.2.3.exe

What can/should I do about this?

Thanks for your help.


then there is another post


I got the same thing with my free AVG, but it was not moved to virus valut.
Have no idea what to do. Any help is appreciated!!!

Mine says Comparisons.HTML PHP/MPACKB

Python-2.2.1.exe

then finnaly

I just read on the AVG forum, many folks  have gotten this threat today, it
is a false positive. To clear it, update your virus definitions and then run

another scan. The new update is suppose to fix it. I did an update, then
another scan, and it finally came back clean. Seems it isn't going in
people's virus vaults.

Hope this helps:-)


--
http://www.goldwatches.com/watches.asp?Brand=14
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: I am giving up perl because of assholes on clpm -- switching to Python

2007-07-25 Thread James Matthews

Welcome aboard

On 7/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


Python is a better language, with php support, anyway, but I am fed up
with attitudes of comp.lang.perl.misc. Assholes in this newsgroup ruin
Perl experience for everyone. Instead of being helpful, snide remarks,
back-biting, scare tactings, and so on proliferate and self
reinforce. All honest people have left this sad newsgroup. Buy bye,
assholes, I am not going to miss you!!!

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





--
http://www.goldwatches.com/watches.asp?Brand=55
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: I am giving up perl because of assholes on clpm -- switching to Python

2007-07-25 Thread James Matthews

Wow! They might leave this newsgroup now also!

On 7/25/07, Jürgen Exner <[EMAIL PROTECTED]> wrote:


[EMAIL PROTECTED] wrote:
> Python is a better language, with php support, anyway, but I am fed up
> with attitudes of comp.lang.perl.misc. Assholes in this newsgroup ruin
> Perl experience for everyone. Instead of being helpful, snide remarks,
> back-biting, scare tactings, and so on proliferate and self
> reinforce. All honest people have left this sad newsgroup. Buy bye,
> assholes, I am not going to miss you!!!

Considering that your total posting history according to DejaNews consists
of exactly 3 posts (not including this last one) from 2001 to 2003 in NGs
that are so closely related to programming as pregnancy, marriage, and
cancer I believe the last sentiment is very mutual. After all, you didn't
ever leave any trace in CLPM until today.

jue


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





--
http://www.goldwatches.com/watches.asp?Brand=55
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

<> vs !=

2007-07-27 Thread James Matthews

Dear Lists

What is the difference between <> and !=

Thank You

James

--
http://www.goldwatches.com/watches.asp?brand=55
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: calling a .net application from Python 2.5

2007-08-01 Thread James Matthews
http://pythonnet.sourceforge.net/

On 8/1/07, Acm <[EMAIL PROTECTED]> wrote:
>
> I am working with Python 2.5.
>
> I would like to know how to call a .NET application (or .dll) from a
> Python script.
>
> Can anyone help please?
>
> Thank you.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://www.goldwatches.com/
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Wing IDE for Python v. 3.0 beta1 released

2007-08-01 Thread James Matthews
I am very happy with there support i concur with what Joshua wrote! I have
yet to see a full paying consumer not happy with wingide

On 8/1/07, Steve Holden <[EMAIL PROTECTED]> wrote:
>
> Joshua J. Kugler wrote:
> > On Wednesday 01 August 2007 13:53, Robert Dailey wrote:
> >> He's secretly an employee of Wing IDE in disguise!!!
> >
> > Sorry to destroy your conspiracy theories, but no, I've never been
> employed
> > by Wing IDE in any fashion, nor have I ever received any monetary
> > compensation from them in any form.  Just a satisfied user.  That's all.
> >
> > j
> >
> Me too, and I have to say the response I have had to all my technical
> support requests has been first-class. Maybe they are busy because
> they're in beta? I know they aren't the largest company, but they can
> stand comparison with most when it comes to support.
>
> I can't think of any other products I use where you can contact the
> support team from right inside the software. And get answers without
> paying per-incident support fees!
>
> regards
>   Steve
> --
> Steve Holden+1 571 484 6266   +1 800 494 3119
> Holden Web LLC/Ltd   http://www.holdenweb.com
> Skype: holdenweb  http://del.icio.us/steve.holden
> --- Asciimercial --
> Get on the web: Blog, lens and tag the Internet
> Many services currently offer free registration
> --- Thank You for Reading -
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://www.goldwatches.com/
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: which IDE is highly recommended in Windows OS

2007-08-13 Thread James Matthews
www.wingide.com

On 8/13/07, Ge Chunyuan <[EMAIL PROTECTED]> wrote:
>
> On Aug 13, 10:24 am, _spitFIRE <[EMAIL PROTECTED]> wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > Ge Chunyuan wrote:
> > > hi Group:
> >
> > > I am a new comer for Python, I wonder which IDE is recommended in
> > > Windows OS.
> > > Can anyone give some suggestion.
> >
> > > Thanks indeed
> > > Ge Chunyuan
> >
> > - - Stani's Python Editor
> > (
> http://www.softpedia.com/get/Programming/Coding-languages-Compilers/S...)
> > - - Black Adder (http://www.thekompany.com/products/blackadder/)
> > - - Zeus (http://www.zeusedit.com/python.html)
> > - - PyScripter (http://mmm-experts.com/Products.aspx?ProductId=4)
> > - - ActivePython (http://www.activestate.com/)
> > - - IDLE (http://www.python.org/idle/doc/idle2.html)
> >
> > and depending on how you define IDEs, you can also decide whether or not
> to
> > include, the following
> > - - emacs
> > - - vim
> > - - scite
> > ...
> >
> > - --
> > _ _ _]{5pitph!r3}[_ _ _
> > __
> > "I'm smart enough to know that I'm dumb."
> >   - Richard P Feynman
> > -BEGIN PGP SIGNATURE-
> > Version: GnuPG v1.4.6 (GNU/Linux)
> > Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org
> >
> > iD8DBQFGv8DSA0th8WKBUJMRAqGcAJ9hhMp3tyS7XmBZT2+fol/A69j4jwCfXNya
> > xQTmmDlDF5BAfiWkrSW3TuQ=
> > =902n
> > -END PGP SIGNATURE-
>
> thanks buddy, I am now using ActivePython, actually it is beyond my
> expectation:)
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://www.goldwatches.com/
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Opinions about this new Python book?

2007-08-14 Thread James Matthews
i got to say that the best python book i bought was Core Python Programming
(2nd)  by Wesly Chun! Aside for all the spelling mistakes and syntax errors
that there are i feel that the book really explained the language well for
someone coming from another programming language!


On 8/14/07, Dick Moores <[EMAIL PROTECTED]> wrote:
>
> At 05:57 AM 8/14/2007, [EMAIL PROTECTED] wrote:
> >On Aug 14, 7:05 am, Dick Moores <[EMAIL PROTECTED]> wrote:
> > > I'd appreciate opinions about this new Python book.
> > >
> > > Title: Python Power!: The Comprehensive Guide
> > > Author:  Matt Telles
> > > Publisher:  Course Technology
> > > Pub. Date:  Jul 27, 2007
> > > Edition:  1st edition
> > > Binding:  Paperback
> > > Pages:  508
> > > ISBN:  1598631586
> > > List Price:  34.99 USD
> > >
> > > The book on the publisher's website: 
> > >
> > > And at BestBookDeal.com:
> > > 
> > >
> > > Thanks,
> > >
> > > Dick Moores
> >
> >I just got this book over the weekend. I'll start reading/skimming
> >through it this week and hopefully remember to get back to you.
>
> Thanks!
>
> >  By the
> >way, why do you want to know?
>
> If the experts like it, I'll buy it.
>
> Dick
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://www.goldwatches.com/
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Problem with Thread.join()

2007-08-20 Thread James Matthews
Post some code so we can see the issue! I would say that the issue is where
your function that you are calling isn't exiting!

On 8/20/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
>
> En Mon, 13 Aug 2007 20:10:53 -0300, Robert Dailey <[EMAIL PROTECTED]>
> escribi�:
>
> > I have a class that derives from threading.Thread. To signal the thread
> > to
> > exit its infinite loop, I set an Event. Once the thread checks
> > Event.isSet()
> > and it is true, it proceeds to break out of the loop and exit the
> > function.
> > In the main thread, right after calling Event.set(), I call
> > Thread.join() to
> > wait on the thread to exit. However, if I call Thread.join() the
> > application
> > locks up because for some reason calling Thread.join() prevents the
> > thread
> > from exiting. I don't know why. Any help? Thanks...
>
> Conceptually you're doing it the right way. Post some code demonstrating
> the problem...
>
> --
> Gabriel Genellina
>
> --
> http://mail.python.org/mailman/listinfo/python-list




-- 
http://www.goldwatches.com/
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Gmane's been quiet ...

2007-08-28 Thread James Matthews
Maybe they are sick of the spam!

On 8/28/07, Lawrence Oluyede <[EMAIL PROTECTED]> wrote:
>
> Steve Holden <[EMAIL PROTECTED]> wrote:
> > ... so I was wondering if it's just me who hasn't seen any postings
> today?
>
> I think so, through my usenet server I saw the usual lot of postings
>
> --
> Lawrence, oluyede.org - neropercaso.it
> "It is difficult to get a man to understand
> something when his salary depends on not
> understanding it" - Upton Sinclair
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://www.goldwatches.com/
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Thread issue

2007-08-29 Thread James Matthews
Hi

I have a program that downloads webpages. The webpages are stored in a list
and i make each has it's own thread that downloads it. Sometimes the threads
exit (because urlopen() throws an exception) Now the question is how can i
recover from this thread failing


Example Code
from urllib import urlopen
import threading

threaded_object = []
urls= [url1,url2]
for i in urls:
   do_thread = threading.Thread(target=urlopen,args=(url,))
threaded_object.append(do_thread)
 for i in threaded_object:
i.start()
for i in threaded_object:
i.join()

Thanks
James



-- 
http://www.goldwatches.com/
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: How do you limit the # of lines Read?

2007-09-18 Thread James Matthews
for i in range():
   line = file.readline()

On 9/18/07, John Machin <[EMAIL PROTECTED]> wrote:
>
> On Sep 19, 6:59 am, [EMAIL PROTECTED] wrote:
> > I am working on a loop for my code and was wondering if there is a way
> > to limit the number of lines read through?  I'd hate to cut the test
> > file in order to run the code in the testing phase.  Can you add a
> > value in the parenthesis of the readline() function?
> >
> > t = string.readline()  # Limit this somehow?
>
> *STRING*.readline() 
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://www.goldwatches.com/
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Removing objects in a list via a wild card

2007-09-19 Thread James Matthews
Hi List

I have a list of files from my current directory:

import os

files = os.listdir(os.getcwd())

Now this list also includes some files that i don't want like my python
files... How would i remove them

Thanks
James

-- 
http://www.goldwatches.com/
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Simple threading example freezes IDLE?

2007-09-29 Thread James Matthews
idle doesn't work well with threads

On 9/27/07, 7stud <[EMAIL PROTECTED]> wrote:
>
> On Sep 26, 5:01 pm, "Sergio Correia" <[EMAIL PROTECTED]> wrote:
> >
> > I'm using IDLE 1.2.1, Python 2.5.1, and Tk 8.4. Does anyone has any
> > idea of why is this happening?
> >
>
> Two mainloops == bad.  IDLE == 1 mainloop.  your program == 1
> mainloop.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://www.goldwatches.com/mens/cufflinks.html
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: HOT!!!PYTHON DEVELOPER REQUIRED @ ADOBE SYSTEMS

2007-09-29 Thread James Matthews
Spam!

On 9/27/07, Recruiter-Adobe <[EMAIL PROTECTED]> wrote:
>
> Hi PYTHON DEVELOPERS,
>
> ADOBE SYSTEMS is looking for a PYTHON DEVELOPER who can troubleshoot
> Python based applet which makes data base queries and populates Excel
> tables used to generate pivot charts, graphs and tables showing bug
> metrics. Isolate problem which is causing reports to crash and
> institute fix.
>
> This is a position through Manpower at our customer Adobe Systems,
> you will be employed as a Manpower's contractor.
>
> Job Responsibilities:
>
> · Setup a new server (development environment)
>
> · Install updated versions of both python and other plugins
> used for our applet.
>
> · Import Code/applet  instance.
>
> · Remove code that uploads it to the Production Server
> Instance
>
> · Eventually move the entire Production Instance over to the
> newer server.
>
> · Update Code to comply with the latest Python standards
>
> Knowledge & Skills:
>
> · Expert in Python Programming
>
> · Experience in COM Object programming speficially Excel COM
> Objects
>
> · Experience in using WebServices (SOAP)
>
> · Win2k System Administration Experience a Plus
>
> · Need to migrate from version 2.3 to latest version of Python
>
> Hourly Pay rate: $85-$100/hr
>
> If interested, please send a Word copy of your resumeto
> [EMAIL PROTECTED] with your expected hourly rate, availability,
> visa status, best time and phone # to contact you.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://www.goldwatches.com/mens/cufflinks.html
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: New to python

2007-09-30 Thread James Matthews
Both are good however when looking for a book i would recommend core python
programming version 2! Enjoy OOP

On 30 Sep 2007 05:21:50 GMT, Stargaming <[EMAIL PROTECTED]> wrote:
>
> On Sat, 29 Sep 2007 21:20:10 -0700, Googy wrote:
>
> > I am new to python...
> >
> > The programming language i know well is C Can any one recommend me the
> > good ebook for beginners. I have loads of ebooks but i am not able to
> > decide which to start with which book. Also i am learning XML so later
> > on i can switch to books on Python and XML but initially which book to
> > read??
> >
> > Please help...
>
> Generically, `A byte of Python`_ and `Dive into Python`_ are pretty
> common. ABOP has a few comments for C programmers as well, AFAIK.
>
> If you already got a few (e)books, you should perhaps just look through
> all of them and then, sequentially, read them.
>
> .. _A byte of Python: http://www.byteofpython.info/download/
> .. _Dive into Python: http://www.diveintopython.org/
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://www.goldwatches.com/mens/cufflinks.html
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: slice last 4 items from a list

2007-10-01 Thread James Matthews
Very pythoninc!

On 10/1/07, John Machin <[EMAIL PROTECTED]> wrote:
>
> On Oct 2, 6:27 am, brad <[EMAIL PROTECTED]> wrote:
> > Is this the correct way to slice the last 4 items from a list?
> >
> > x = [1,2,3,4,5,6,7,8,9]
> > print x[-4:]
> >
> > It works, but is it Pythonic?
>
> It's Pythonic. It's also unambiguous, unlike your specification, which
> could be interpreted as 'chop off the last 4 items from a list' i.e.
> del x[-4:]. What you are actually doing is 'print the last 4 items of
> a list'.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/search.aspx?Search=cufflinks
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Top Programming Languages of 2013

2007-10-07 Thread James Matthews
What are these stats based on?

On 10/7/07, Alan Gauld <[EMAIL PROTECTED]> wrote:
>
>
> "Dick Moores" <[EMAIL PROTECTED]> wrote
>
> > 
> >
>
> Interesting, but I'm not sure what the criteria for "top" is.
> Is it a measure of power, popularity, usage?
>
> Scary that HTML/CSS should be so high though
> given its not a programming language at all!
>
> Alan G.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://www.goldwatches.com/mens/cufflinks.html
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Yet another comparison of Python Web Frameworks

2007-10-07 Thread James Matthews
But the question is when will the cheap hosting company's start to host
normal python files!

On 10/7/07, genro <[EMAIL PROTECTED]> wrote:
>
> On Oct 7, 8:35 am, Michele Simionato <[EMAIL PROTECTED]>
> wrote:
> > On Oct 6, 12:57 pm, Bruno Desthuilliers
> >
> > > Michele Simionato a écrit :
> >
> > > > I looked at the source code and it seems fine to me, but I have
> > > > not used it directly, not stressed it. I need a
> > > > production-level WSGI session middleware and I wonder what the
> > > > players are (for instance how Beaker does compare with flup?)
> >
> > > Can't tell, but I'd trust the Pylons team on this kind of choices.
> > > They're doing good job so far AFAICT.
> >
> > Probably Beaker works well, but it is certainly NOT doing things
> > as Eby recommends:
> >
> > http://dirtsimple.org/2007/02/wsgi-middleware-considered-harmful.html
> >
> > BTW, I know that Eby is asking opinions about WSGI 2.0 on the
> > WSGI SIG and interested people may have a look there.
> >
> >Michele Simionato
>
>
> I think that Beaker is a Mako dependency.
> So if you use Mako, Beaker is not an option  :)
>
> G
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://www.goldwatches.com/mens/cufflinks.html
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Off Topic: Gmail hates newsgroups!!!

2007-10-08 Thread James Matthews
I agree it annoys me also!


-- 
http://search.goldwatches.com/search.aspx?Search=Cufflinks
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Library for crawling forums

2007-10-11 Thread James Matthews
Well i know some that do half the job

urllib or urllib2 to download the page
htmlparser or beautifulsoup For html parsing

Enjoy

On 10/11/07, BlueCrux <[EMAIL PROTECTED]> wrote:
>
> I'm trying to write a utility to crawl forums and strip posts to be
> gone through offline. Just the content, I don't need to get who posted
> or sigs or any identifying info.
>
> Can anyone suggest a library that is already geared toward this?
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/search.aspx?Search=Cufflinks
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Entering username & password automatically using urllib.urlopen

2007-10-14 Thread James Matthews
if you want to hardcode the password in the url. What you need to do is
http:username:[EMAIL PROTECTED]

On 10/14/07, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
>
> rodrigo schrieb:
> > I am trying to retrieve a password protected page using:
> >
> > get = urllib.urlopen('http://password.protected.url";').read()
> >
> > While doing this interactively, I'm asked for  the username, then the
> > password at the terminal.
> > Is there any way to do this non-interactively? To hardcode the user/
> > pass into the script so I can get the page automatically?
> >
> > (This is not a cracking attempt, I am trying to retrieve a page I have
> > legitimate access to, just doing it automatically when certain
> > conditions are met.)
>
> Is that HTTP-auth? Then this might help:
>
> http://www.voidspace.org.uk/python/articles/authentication.shtml
>
> BTW, use urllib2.
>
> Diez
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://www.goldwatches.com/
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Best Python Linux distribution

2007-10-17 Thread James Matthews
Redhat and now Oracle's Linux installer is written in python! They are all
very good but watch for some programs that require legacy versions of
library's like wx

On 17 Oct 2007 23:10:33 -0700, Devraj <[EMAIL PROTECTED]> wrote:
>
> I would recommend a Debian based distribution like Ubuntu or Debian
> itself :)
>
> On Oct 17, 10:29 pm, Anthony Perkins <[EMAIL PROTECTED]> wrote:
> > Hi everyone,
> >
> > What is the best GNU/Linux distribution (or the most preferred) for
> > developing Python applications?  Ideally I would like one with both
> > Python *and* IDLE included on the install media (neither Ubuntu nor SUSE
> > have IDLE on the CDs), so that I can use it on machines without a
> > network connection.
> >
> > Thanks,
> >
> > -Anthony
> >
> > --
> > Anthony Perkins
> > muzz.be
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://www.goldwatches.com/
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Thread Profiling

2007-11-05 Thread James Matthews
Try passing the verbose=1 flag when creating the tread!

On 11/6/07, Chris Mellon <[EMAIL PROTECTED]> wrote:
>
> On Nov 5, 2007 1:32 PM, JamesHoward <[EMAIL PROTECTED]> wrote:
> > Are there any good thread profilers available that can profile a
> > thread as it is running instead of after execution is completed?
> >
> > I would like to find a python class which looks at a currently running
> > thread and if its memory exceeds a certain amount than kill it.
>
> Killing a non-cooperative thread is undefined behavior. You can't do
> it with the Python threading API and even OS thread implementations
> that permit it don't guarantee that your process will be in a sane
> state afterward.
>
> > Ideally I would like the program to track memory used not just by that
> > thread, but by any threads or processes that it may spawn.
> >
> > If there isn't anything like that, then something that lets me set the
> > maximum memory allowed to be allocated within a thread would be
> > acceptable also.
> >
>
> Memory isn't allocated on a per-thread basis and there's not really
> any way to know what should be charged to a particular thread. That's
> on top of the normal caveats about trying to judge memory usage within
> Python
>
>
> > Thanks in advance,
> > James Howard
> >
> > --
> > http://mail.python.org/mailman/listinfo/python-list
> >
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://www.goldwatches.com/
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Wanted: Software Engineers in San Jose, CA

2007-11-06 Thread James Matthews
Please use monster.com! or linkedin

On Nov 6, 2007 10:49 PM, Peter Hsu <[EMAIL PROTECTED]> wrote:

>  I hope job posting is appropriate on this mailing list.  I couldn't find
> anything indicating otherwise.
>
>
>
> I'm looking for software engineers of all levels to help create a
> next-generation spam filtering solution for Abaca Technology.  Abaca is
> located in San Jose, CA.
>
>
>
> The job posting for the senior position follows.   If you have any
> questions, please feel free to email me.
>
>
>
> Peter Hsu
>
> Engineering Manager
>
> Abaca Technology Corporation
>
> [EMAIL PROTECTED]
>
>
>
> =
>
>
>
> Abaca is looking for a Senior Software Engineer.  In addition to being a
> python guru, you will be required to provide technical leadership.  You will
> design and implement software using the latest technologies and development
> process. Set engineering priorities in support of company goals to deliver
> quality, high-performance products in a fast-paced startup environment. You
> will also be expected to:
>
>
>
>  * Lead the full software development lifecycle from prototyping and
> design to release
>
>  * Provide realistic scoping of projects
>
>  * Create extensible designs and implement products with high quality, and
> performance
>
>  * Insure quality development processes are used and that code is designed
> to facilitate testability and support
>
>  * Support Sales and Marketing efforts
>
>  * Mentor technical team members in a collaborative
>
> team-oriented environment
>
>
>
> JOB REQUIREMENTS:
>
>  * 7-10 years software development experience
>
>  * Proven track record of meeting tight deadlines
>
>  * Positive, team-oriented attitude
>
>  * Excellent oral and written communication skills
>
>  * Excellent analytic and troubleshooting skills
>
>  * Demonstrated ability to complete highly detailed tasks with strict
> attention to quality, completeness and timeliness
>
>  * Strong organizational and self-management skills
>
>  * Must be a self-motivated learner
>
>  * Must be able to work individually and with others with little
> supervision in fast-paced, constantly changing start-up environment
>
>  * Will likely have customer contact and/or need to provide customer-level
> documentation
>
>
>
> TECHNICAL SKILLS REQUIREMENTS:
>
>  * Application development experience on Linux platform
>
>  * Strong knowledge of Python
>
>  * Strong background of OO, MVC-based, web-focused analysis and design
>
>  * Knowledge of Internet protocols such as SMTP, LDAP, HTTP, POP3, IMAP,
> FTP, SNMP, etc.
>
>  * Knowledge of Java, C++ or other object-oriented language is a plus.
>
>  * Experience with Postgres stored procedures a plus.
>
>  * Prior experience with AJAX a plus
>
>  * Experience designing areas of security, performance, capacity and
> maintainability
>
>  * SQL and schema design experience
>
>  * Must understand the general software development release cycle, source
> management and defect management methodologies in a mixed Microsoft Windows
>
>  and Linux environment.
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: >>>> 911 operation by evil JEWS and Mossad <<<

2007-11-08 Thread James Matthews
Thank You!

Maybe we can get rid of this guy now... This is a python group...
On Nov 8, 2007 12:28 PM, philipp neulist <[EMAIL PROTECTED]>
wrote:

> On Nov 7, 4:08 pm, [EMAIL PROTECTED] wrote:
> > 911 carried out by evil jews and
> mossadhttp://www.guba.com/watch/2000991770
> >
> > 911 truckload of Explosives on the George Washington
> Bridgehttp://www.youtube.com/watch?v=J520P-MD9a0
> >
> [...]
>
> I reported the first post in this thread (on Google groups) as abuse
> as its content is "false and defamatory". In addition to that, it has
> nothing to do with TeX.
>
> => Double reason to blaim the author!
>
> Please ignore threads like those in future and just report it!
>
> PN
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: [OT] The Jew Spam on this list

2007-11-13 Thread James Matthews
I agree!

On Nov 13, 2007 1:26 PM, Martin Marcher <[EMAIL PROTECTED]> wrote:

> Hello,
>
> please do not respond to the "political" spam on this list anymore.
> Rather report it as spam to your provider/anti-spam-measures or report
> it to the listmasters (if you have the feeling that it helps, I guess
> they're already on this issue).
>
> I understand that this might be a heated topic but people please it's
> "just spam" and every message regarding this topic is spam too (funny
> enough, so is this message) please just add this stuff to your
> killfile or whatever you use.
>
> thanks
> martin
>
> PS: if you must discuss this opinion with me answer to me off list as
> I guess most people just aren't interested...
>
> --
> http://noneisyours.marcher.name
> http://feeds.feedburner.com/NoneIsYours
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://www.goldwatches.com/movado--watches.html
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Web update library in python?

2007-11-20 Thread James Matthews
I think the best one would be to write it on your own! It shouldn't take
more then 150 lines of code! Or you can use Egg's

On Nov 20, 2007 9:39 AM, Jorgen Bodde <[EMAIL PROTECTED]> wrote:

> Hi all,
>
> I want to provide my users the ability to download a repository from
> the web, and after that check for updates. I thought of a mechanism
> that could do that, but since there is patch and diff readily
> available I wondered if there is a python solution that allows me to
> download a file, and let the patch be applied locally. In the patch
> there are binaries and sources I am not sure if patch can handle them
> both though.
>
> So here are the situations;
>
> Downloading
> 1. User enters URL and local path where to store
> 2. Updated downloads the file
> 3. Either creates a new repository or patches an existing one
>
> Check for updates
> 1. A web check is done if there is a newer version
> 2. File is downloaded, patch is applied
>
> Plain zip file extraction is possible, but I will miss out on files
> that might be deleted in future versions, but not yet on the client
> side. Also local changes might need to be preserved although it is not
> a show stopper if it doesn't.
>
> I want to have a solution that is very easy for the user, so point and
> click kind of work. Is there a tool / library around that can provide
> me a base for this problem?
>
> Thanks in advance!
> - Jorgen
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Python too complex ?!?!?!

2007-11-20 Thread James Matthews
I think they need to change teachers in this school!

On Nov 17, 2007 2:46 PM, Brian <[EMAIL PROTECTED]> wrote:

> Had a unsettling conversation with a CS instructor that
> teaches at local high schools and the community
> college. This person is a long-term Linux/C/Python
> programmer, but he claims that the install, config, and
> library models for C# have proved to be less
> problematic than Python. So both his courses (intro,
> data structs, algorithms) are taught in C#.
>
> I am a low-end (3-year) journeyman Pythonista, and I
> was attracted to the language because of its
> simplicity. And I have come to enjoy the richness of
> available libraries.
>
> Many of the good people of this NG may be 'too close'
> to answer, but has Python, as a general devel platform,
> lost its simplicity ? Is library install too complex
> and unreliable ? Will my dog go to heaven ?
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Python strings question (vertical stack)

2007-11-20 Thread James Matthews
I would say to split it by the newline!

On Nov 20, 2007 10:59 PM, John Machin <[EMAIL PROTECTED]> wrote:

> On Nov 21, 7:15 am, Farshid Lashkari <[EMAIL PROTECTED]> wrote:
> > J. Clifford Dyer wrote:
> > > I think you mean '\n'.join([string1,string2,string3])
> >
> > > You actually do want the \ to do its thing in this case.
> >
> > Yeah, my brain must still be asleep. Thanks for waking it up :)
>
> You're not alone :-)
>
> >>> a = """
> ... x
> ... y
> ... z
> ... """
> >>> a
> '\nx\ny\nz\n'
> >>> '\n'.join(['x', 'y', 'z'])
> 'x\ny\nz'
> >>>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Tk 8.5

2007-11-26 Thread James Matthews
I also cannot wait!

On Nov 24, 2007 4:12 PM, Ron Provost <[EMAIL PROTECTED]> wrote:

>  Hello,
>
> According to the tk wiki, the final release of Tcl/Tk is just weeks away
> (see http://wiki.tcl.tk/12753).  Does anyone know if the Tk enhancements
> will be in Python 2.6?  Since I don't use tk but I do use Python and
> Tkinter (and Tix) extensively, I'm excited about these long-awaited changes.
>
> Thanks,
> Ron
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Rss Feed Creator

2007-11-26 Thread James Matthews
Hi,

I am looking for a library that will create Rss/Atom feeds in python. It
needs to format the XML in a readable format! Does anyone have any
suggestions?

Thanks James


-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.goldwatches.com/coupons
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Rss Feed Creator

2007-11-26 Thread James Matthews
Thank You Shane,

However that is using PyRss2Gen which doesn't put newlines in the XML. So
it's a little out of the picture!
On Nov 27, 2007 1:57 AM, Shane Geiger <[EMAIL PROTECTED]> wrote:

> http://www.bigbold.com/snippets/tag/beautifulsoup
>
>
>
> James Matthews wrote:
> > Hi,
> >
> > I am looking for a library that will create Rss/Atom feeds in python.
> > It needs to format the XML in a readable format! Does anyone have any
> > suggestions?
> >
> > Thanks James
> >
> >
> > --
> > http://search.goldwatches.com/?Search=Movado+Watches
> > http://www.goldwatches.com/coupons
> > http://www.jewelerslounge.com
>
>
> --
> Shane Geiger
> IT Director
> National Council on Economic Education
> [EMAIL PROTECTED]  |  402-438-8958  |  http://www.ncee.net
>
> Leading the Campaign for Economic and Financial Literacy
>
>


-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.goldwatches.com/coupons
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Rss Feed Creator

2007-11-26 Thread James Matthews
Is there any where you do not have us tidy?

On Nov 27, 2007 2:03 AM, Shane Geiger <[EMAIL PROTECTED]> wrote:

> I think this is what you need to make the output readable:
>
> tidy -asxml output.xml
>
>
>
>
>
> James Matthews wrote:
> > Thank You Shane,
> >
> > However that is using PyRss2Gen which doesn't put newlines in the XML.
> > So it's a little out of the picture!
> > On Nov 27, 2007 1:57 AM, Shane Geiger < [EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]>> wrote:
> >
> > http://www.bigbold.com/snippets/tag/beautifulsoup
> >
> >
> >
> > James Matthews wrote:
> > > Hi,
> > >
> > > I am looking for a library that will create Rss/Atom feeds in
> > python.
> > > It needs to format the XML in a readable format! Does anyone
> > have any
> > > suggestions?
> > >
> > > Thanks James
> > >
> > >
> > > --
> > > http://search.goldwatches.com/?Search=Movado+Watches
> > > http://www.goldwatches.com/coupons
> > > http://www.jewelerslounge.com
> >
> >
> > --
> > Shane Geiger
> > IT Director
> > National Council on Economic Education
> > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>  |  402-438-8958  |
> > http://www.ncee.net
> >
> > Leading the Campaign for Economic and Financial Literacy
> >
> >
> >
> >
> > --
> > http://search.goldwatches.com/?Search=Movado+Watches
> > http://www.goldwatches.com/coupons
> > http://www.jewelerslounge.com
>
>
> --
> Shane Geiger
> IT Director
> National Council on Economic Education
> [EMAIL PROTECTED]  |  402-438-8958  |  http://www.ncee.net
>
> Leading the Campaign for Economic and Financial Literacy
>
>


-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Rss Feed Creator

2007-11-27 Thread James Matthews
Thank you everyone!

On Nov 27, 2007 10:13 AM, Vladimir Rusinov <[EMAIL PROTECTED]> wrote:

>
>
> On 11/27/07, James Matthews <[EMAIL PROTECTED]> wrote:
> >
> > I am looking for a library that will create Rss/Atom feeds in python. It
> > needs to format the XML in a readable format! Does anyone have any
> > suggestions?
>
>
> You can also use some xml-based template engine (Kid or Genshi).
>
> --
> Vladimir Rusinov
> GreenMice Solutions: IT-решения на базе Linux
> http://greenmice.info/




-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.goldwatches.com/coupons
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: read/write to java socket in python

2007-11-27 Thread James Matthews
It's a socket interface it should be universal!

On Nov 27, 2007 4:08 PM, <[EMAIL PROTECTED]> wrote:

> Hi all,
>
> I have a problem with reading from a Java server after I have written
> to it - it just hangs. It works fine if I just write to the server and
> not try to write. I have read the HOWTO on sockets - and it states
> that there is a problem (something about flushing), but not what the
> solutions is. Nor do google. Can somebody please help?
>
> A few lines down you can see the example code that sums up the
> problem. Just change the name of the Python HOST-variable.
>
> Thanks
> Mads
>
>
> This is the client in Python:
> #! /usr/bin/env python
>
> import sys
> from socket import *
>
> PORT = 3122
> HOST = 'app-5'
> SUCCESS = 'Success'
> FAILURE = 'Failure'
>
> s = socket(AF_INET, SOCK_STREAM)
> s.connect((HOST, PORT))
> s.send("Hi Java Server");
> print "Have written, waiting to recieve.."
> print s.recv(1014)
> s.close()
>
> And this the server in Java:
> import java.io.*;
> import java.net.*;
>
> public class Server{
>public static void main(String args[]){
>
>int port = 3122;
>int backLog = 50;
>
>ServerSocket ss = null;
>try{
>
>InetAddress localhost =
> InetAddress.getLocalHost();
>ss = new ServerSocket(port, backLog,
> localhost);
>while(true){
>final Socket client = ss.accept();
>new Thread(){
>public void run(){
>try{
>
>
>InputStream is =
> client.getInputStream();
>BufferedReader buf =
> new BufferedReader(new InputStreamReader(is));
>print(buf.readLine());
>
>PrintWriter out = new
> PrintWriter(client.getOutputStream());
>out.write("Hi Python
> Client.");
>out.flush();
>client.close();
>}catch(Exception e)
> {print(e);}
>}
>}.start();
>}
>}catch(Exception e){print(e);}
>}
>
>private static void print(Object o){System.out.println(o);}
> }
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.goldwatches.com/coupons
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a Python tutor

2007-11-27 Thread James Matthews
Please post on the job section!

On Nov 27, 2007 6:46 PM, hong2221 <[EMAIL PROTECTED]> wrote:

> I'm looking for a Python programmar that is willing write simple
> functions, prices can be talked over. Contact me asap.
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.goldwatches.com/coupons
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Donloadin mail on the background

2007-11-30 Thread James Matthews
Use threads or sub processes

On Nov 29, 2007 9:17 PM, Francesco Pietra <[EMAIL PROTECTED]> wrote:

> Dennis:
>
> Why am I using web-based email? As I work on several machines scp linked.
> I
> find often useful to see the same mail on different machines around,
> without
> downloading anything, just to set up the files on-the-fly for local trial
> computation before sending a calculation to the mainframe. That I found
> easy
> with web-based email. I do not maintain locally on any machine any mail
> for
> longer than working on.
>
> I am sure you have, or can devise, a better strategy to the same purpose.
> I am
> not an expert in software.
>
> Regards
> francesco pietra
>
>
>
>
>  
> 
> Be a better sports nut!  Let your teams follow you
> with Yahoo Mobile. Try it now.
> http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Benchmark...

2007-11-30 Thread James Matthews
Google and wikipedia!

On Nov 30, 2007 9:39 AM, ArShAm Shirvani <[EMAIL PROTECTED]> wrote:

> Hi
> I need a benchmark for speed , comparing with other languages
>
> Regards
> Arsham
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.goldwatches.com
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Witch editor to use!

2007-11-30 Thread James Matthews
Eric

On Nov 30, 2007 12:26 PM, Bruno Desthuilliers <
[EMAIL PROTECTED]> wrote:

> Carl Banks a écrit :
> > On Nov 30, 4:40 am, Ant <[EMAIL PROTECTED]> wrote:
> >> On Nov 30, 9:10 am, SMALLp <[EMAIL PROTECTED]> wrote:
>
> (snip)
>
> >>> And if editor is bether choice witch one to use!
> >> One with a spell checker would be a good start.
> >
> > Punny.
>
> indeed !-)
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Accessing a URL file Remotely

2007-11-30 Thread James Matthews
Once you use urlopen you can read the website like a file

On Nov 30, 2007 10:58 AM, mcl <[EMAIL PROTECTED]> wrote:

> On 29 Nov, 22:32, TheSeeker <[EMAIL PROTECTED]> wrote:
> > On Nov 29, 3:13 pm, mcl <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > I have been given a url ofCSVfile (http://hostname/dir/file.csv),
> > > which when I put the full URL in a web browser shows the contents of
> > > the file.
> >
> > > I want to be able to use theCSVmodule to read that file, which I
> > > have successfully used with a localCSVfile.
> >
> > > Any examples anywhere would be appreciated.
> >
> > > My basic research suggests URLLIB, but I can not find a suitable
> > > example.
> >
> > > I do not understand what additional information, needs to be given to
> > > the remote site in order for it to expose the contents of the file as
> > > though I was reading it locally.
> >
> > > Do I need to copy it to my local machine or can I read it directly
> > > from the remote site.
> >
> > > As you can probably tell, I have never done anything like this, so any
> > > help will be gratefully received.
> >
> > > Thanks
> >
> > > Richard
> >
> > -untested--
> >
> > import urllib,csv
> >
> > fp_page = urllib.urlopen("http://URL_of_file";)
> > reader =csv.reader(fp_page)
> > for row in reader:
> > print row
> >
> > Duane
>
> Duane,
>
> Brilliant - I had fears of much more complication.
>
> Thank you very much
>
> Richard
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.goldwatches.com
http://www.jewelerslounge.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: How to read strings cantaining escape character from a file and use it as escape sequences?

2007-12-01 Thread James Matthews
Also alot of times in the interactive interpeter it will show you charater
codes!

On Dec 1, 2007 6:04 PM, slomo <[EMAIL PROTECTED]> wrote:

> WOW! Great! Thanks, Duncan.
>
>
> On 12월2일, 오전12시33분, Duncan Booth <[EMAIL PROTECTED]> wrote:
> > slomo <[EMAIL PROTECTED]> wrote:
> >  print line
> > > \u0050\u0079\u0074\u0068\u006f\u006e
> >
> > > But I want to get a string:
> >
> > > "\u0050\u0079\u0074\u0068\u006f\u006e"
> >
> > > How do you make it?
> >
> > line.decode('unicode-escape')
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: python not a good name.

2007-12-01 Thread James Matthews
Well in the future we will ask the internet god "Google" to guide us in
making the name!

On Dec 1, 2007 7:36 AM, Joseph king <[EMAIL PROTECTED]> wrote:

> sorry for not responding to the thread the regular way...[cough]
>
> just to prove everyone i counted what was found while searching python in
> google.
>
> i only looked at the first 6 pages but out of them only one did not
> mention the language
>
> plus i can't beleive people would be so synical about the issue.  if the
> only reason you use a language is because it has a pretty name.. (you
> would be limited to only ruby)
>
> that is all i can say.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: "Python" is not a good name, should rename to "Athon"

2007-12-01 Thread James Matthews
Well in the future we will ask the internet god "Google" to guide us in
making the name!

On Dec 1, 2007 6:02 PM, Dotan Cohen <[EMAIL PROTECTED]> wrote:

> On 01/12/2007, Tóth Csaba <[EMAIL PROTECTED]> wrote:
> > man.. :)) the biggest point in this thread :DD
> > btw in my country not much, because we write it "szex" :DD
> >
> > tsabi
> >
>
> We got you beat: "סקס". Try that on a Latin keyboard!
>
> Actually, "szex" might be a great name, as it implies the meaning
> without actually saying it (as far as English speakers are concerned).
> That will be the name of my band if I ever have one...
>
> Dotan Cohen
>
> http://what-is-what.com
> http://gibberish.co.il
> א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: C/C++ on UNIX Developer required in Woodmead, Johannesburg

2007-12-01 Thread James Matthews
Please post in the Python Wiki under the jobs

On Dec 1, 2007 9:38 AM, arnold <[EMAIL PROTECTED]> wrote:

> We seek the following sort of experience / skill for developer
> resources (if u do not qualify - we offer a handsome referral fee if
> you refer someone that is succesfully placed:-) .
>
> C Programming  5 years
> C++ Programming  2 years
> SQL Programming  2 years
> Software Design  2 years
> Software Engineering Process  3 years
> GUI Development 1 year
> Unix/Linux environment 2 years
> Scientific/Mathematical Programming  2 years
>
>
> These skills all need to be current.
>
>
> The candidate should demonstrate an ability to work resourcefully and
> independently, whilst delivering in the framework of a team.  The
> candidate must also demonstrate a willingness and desire to program
> hands-on in C and C++ code.  He/she must have personally developed
> significant amounts of program code, demonstrating and requiring
> modular design and the use of a source code repository for version
> control.
>
>
> The candidate must communicate well, and be comfortable discussing
> design issues with both the team and the customer.  His / her present
> role should require this of him/her.
>
>
> The candidate must be able to describe the software development
> lifecycle and identify his/her personal points of interaction in that
> cycle. These points must be Functional Requirements Specification,
> Software Design, Programming and Unit Testing.
>
>
> The following skills would be an advantage:
>   Object oriented design
>   UML and the use of design tools like Rational Rose
>   Development tools (GDB, DBX, WxWidets/Qt/GTK, Makefiles
> etc.)
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: pythonw.exe and python.exe

2007-12-01 Thread James Matthews
Because they use two different API's to execute your code!

On Nov 30, 2007 9:09 PM, whatazor <[EMAIL PROTECTED]> wrote:

> Hi all,
> I made a little application with multithreading in winxp with
> python2.5. An event generated from a third part software is the
> trigger for the creation of progress bar in a wxPython app. This
> python app is launched via wxExecute.
> I've noticed a different behaviour if the script is launched with
> python.exe  and  pythonw.exe (i.e. without dos shell), in fact in the
> first case it's all ok, while in the other case only the first, the
> third , the fifth  ... progress bar is setted correctly and update its
> value.
> Now, before control again the code , what can be the origin of the
> problem? why python and pythonw give a result so different?
>
> thank you
> w
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: String formatting with %s

2007-12-02 Thread James Matthews
try to import printf using ctypes

On Dec 2, 2007 7:49 PM, MRAB <[EMAIL PROTECTED]> wrote:

> On Dec 2, 1:35 pm, Donn Ingle <[EMAIL PROTECTED]> wrote:
> > Hi,
> >  I'm sure I one read somewhere that there is a simple way to set the
> order
> > of replacements withing a string *without* using a dictionary.
> >
> > What I mean is:>>> s = "%s and %s" % ( "A", "B" )
> > >>> print s
> >
> > A and B
> >
> > Now, is there something quick like:>>> s = "%s/2 and %s/1" % ( "A", "B"
> )
> > >>> print s
> >
> > B and A
> >
> > ?
> >
> > I know it can be done with a dict:
> > d = { "one" : "A", "two" : "B"  }
> > s = "%(two)s and %(one)s" % d
> >
> > \d
>
> One quick solution is to write a function for it:
>
> def format(template, values):
>import re
># Collect the indexes from the template.
>order = map(int, re.findall(r'%\[(\d+)\]', template))
># Remove the indexes from the template.
>template = re.sub(r'(?<=%)\[(\d+)\]', '', template)
># Create a tuple containing the values in the correct positions.
>values = tuple(values[index] for index in order)
>return template % values
>
> >>> format("%[0]s and %[1]s", ("A", "B"))
> 'A and B'
> >>> format("%[1]s and %[0]s", ("A", "B"))
> 'B and A'
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: [OT] minimalist web server

2007-12-03 Thread James Matthews
Using DSL (Damn Small Linux) try apache! Or you can try litehttpd

On Dec 2, 2007 3:35 AM, Daniel Fetchinson <[EMAIL PROTECTED]> wrote:

> Hi list,
>
> This is way off topic but maybe somebody knowledgeable can help.
>
> I'm looking for the most minimalist web server ever that does nothing
> else than return a fixed static page for every request. Regardless of
> what the request is, it just needs to be an HTTP request to port 80,
> the web server should return always the same html document. What would
> be the best choice for this? The goal is of course to minimize system
> resources in terms of memory, cpu, etc, etc.
>
> Cheers,
> Daniel
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: a Python person's experience with Ruby

2007-12-08 Thread James Matthews
I have been waiting for something like this! Thanks!

On Dec 8, 2007 6:08 AM, Steve Howell <[EMAIL PROTECTED]> wrote:

> Python is my favorite programming language.  I've used
> it as my primary language for about six years now,
> including four years of using it full-time in my day
> job.  Three months ago I decided to take a position
> with a team that does a lot of things very well, but
> they don't use Python.  We use Ruby instead.  I'd like
> to share my observations about Ruby, because I think
> they say important things about Python, which has been
> my frame of reference.
>
> First of all, I actually enjoy programming in Ruby.
> Although I'm still fairly early on the learning curve,
> I feel like I've achieved basic fluency, and it
> generally stays out of the way.
>
> (A quick disclaimer is that some of the observations I
> make about Ruby may simply reflect my ignorance about
> the language.  I'm still learning it.)
>
> The thing that I like least about Ruby is its
> "require" mechanism.  Basically, when you do "require"
> in Ruby, it sort of pollutes your namespace.  I much
> prefer Python's explicitness.
>
> Some surprising things that I like about Ruby:
>
>  1) It has the Perlish natural language syntax of
> "raise 'foo' if condition."  I never missed having
> that syntax in Python, but now that I have it in Ruby,
> I use it quite often.
>
>  2) On a general note, Ruby is enough like Python
> that it doesn't bend my brain.
>
>  3) I actually like being able to omit parentheses in
> method definitions and method calls.  In Ruby you can
> express "add(3,5,7)" as both "add(3,5,7)" and "add 3,
> 5, 7."  The latter syntax is obviously more error
> prone, but I don't think I've ever actually gotten bit
> by it, and the code appears more clean to me.
>
>  4) Ruby forces you to explicitly make attributes for
> instance variables.  At first I found this clumsy, but
> I've gotten used to it, and I actually kind of like it
> in certain circumstances.
>
> What I miss about Python:
>
>  1) I like the fact that Python's syntax for passing
> around methods is very natural. Ruby's syntax is much
> more clumsy.
>
>  2) I miss indentation.  I get bitten by kEnd in Ruby
> all the time.
>
>  3) I miss Python's maturity.  Just to give a small
> example, Python's interpreter gives more readable
> syntax error messages.
>
> Those are the things that jump out for me.  I'm
> curious to hear what other people have learned about
> Python after maybe going away from it for a while.
>
>
>
>
>
>  
> 
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Nice Python Cartoon!

2007-12-08 Thread James Matthews
http://xkcd.com/353/

-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: download complete webpage with python

2007-12-08 Thread James Matthews
from urllib import urlopen
url = urlopen("http://www.google.com";).read()

Enjoy!

On 12/8/07, Larry Bates <[EMAIL PROTECTED]> wrote:
>
> Gabriel Genellina wrote:
> > En Fri, 07 Dec 2007 17:58:43 -0300, yi zhang <[EMAIL PROTECTED]>
> > escribió:
> >
> >> The urllib.urlretrieve() can only download the text part of a webpage,
> >> not the image associated. How can I download the whole, complete
> >> webpage with python? Thanks!
> >
> > The images are separate from the html document. You have to parse the
> > html text, find the  tags, and retrieve them.
> >
> Actually IMHO this is even more difficult than it sounds.  Javascript can
> change
> the webpage after it loads.
>
> Larry
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Job Offer: Python Ninja or Pirate!

2007-12-10 Thread James Matthews
Please post on the job forum!

On Dec 10, 2007 9:14 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

> Etsy is an online marketplace for buying and selling all things
> handmade: clothing, music, furniture,
> software, jewelry, robots. We launched on June 18, 2005, and ever
> since then have been empowering our
> users to make a living doing what they love most.
>
> Just a few months ago, we found a few amazingly talented ninjas and
> even a few swarthy pirates. The team is doing wonderfully, and we're
> hoping to add a few more adventure-loving souls to our ranks. You'll
> be using python, javascript and other technologies to whip up
> innovative web applications in many challenging and interesting
> domains: social and community, ecommerce, search, and even software
> development.
>
> We're also in the process of redesigning and developing our web stack
> to allow us to scale into outer space
> while still providing a fun and productive programming environment.
> You'll likely end up working on our: in-house orm, customized cherrypy
> environment, jinja templates, django-like form processing library,
> lucene integration, twisted-based communications protocol, or kick-ass
> high-performance memcached library.
>
> Required:
>  * 5+ years of web development experience
>  * 3+ years of writing production-level code with a dynamic language
> (python, ruby, lisp, smalltalk,
>
> OO javascript, etc)
>  * Strong OOP skills
>  * Understanding of dynamic language idioms and patterns
>  * Ability and willingness to pick up other languages and technologies
>
> Desired:
>  * Ability to write python code idiomatically
>  * Lives in New York City
>  * Experience with javascript
>  * Experience with java, postgresql and/or php
>
> Neat:
>  * Plays guitar hero
>
>
> Challenge:
> A valid response will be either a solution to the problem below, or a
> link to some code of which you
> are particularly proud.
>
> Problem: In the dynamic language of your choice, write a short program
> that will:
>  1. define a list of the following user ids 42346, 77290, 729 (you can
> hardcode these, but it should
> still work with more or less ids)
>  2. retrieve an xml document related to each user at this url "http://
> api.etsy.com/feeds/xml_user_details.php?id="
>  3. retrieve the data contained in the city element from each xml
> document
>  4. keep a running total of how many users are found in each city
>  5. display the total count of users living in each city
>
> You can assume user ids are valid and that the url is available. The
> output should look something
> like:
>
> Charlotte: 1
> New York: 2
>
> You can find out more about etsy at http://www.etsy.com or
> http://blog.etsy.com/jobs/index.html
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re:

2007-12-12 Thread James Matthews
you can also use a for loop =)

list = [1,2,3,4,5,6,7]
str = ' '
for i in list:
   str+=i
print str



On Dec 12, 2007 2:25 PM, Lee Capps <[EMAIL PROTECTED]> wrote:

>
> On Dec 11, 2007, at 5:14 PM, katie smith wrote:
>
> > "[16, 16, 2, 16, 2, 16, 8, 16]"
>
> Regular expressions might be a good way to handle this.
>
> import re
>
> s = '[16, 16, 2, 16, 2, 16, 8, 16]'
> get_numbers = re.compile('\d\d*').findall
>
> numbers = [int(x) for x in get_numbers(s)]
>
> See:
>
> http://docs.python.org/lib/module-re.html
>
> ---
> Lee Capps
> Technology Specialist
> CTE Resource Center
> [EMAIL PROTECTED]
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re:

2007-12-12 Thread James Matthews
Can you please explain better?

On Dec 12, 2007 2:19 AM, katie smith <[EMAIL PROTECTED]> wrote:
>
> I tried googling and yahooing to find the answer and there was to many
> conflicting results so i just decided to ask to simple question here.
>
> How do i could the number of letters in a string no a single letter all of
> them.
>
> ex. 'Count this String'
> should turn into an integer saying 17
>
>  
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it
> now.
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: newbie

2007-12-12 Thread James Matthews
I really like this book!

On Dec 11, 2007 3:11 AM, Joe Riopel <[EMAIL PROTECTED]> wrote:
> On Dec 10, 2007 9:03 PM, Whizzer <[EMAIL PROTECTED]> wrote:
> > Is OReilly's Learning Python a good place to start learning to program?
> > I've been told Python is a good first language.
>
> I think this is a great place to start, there is a free version right
> there online.
>
> http://diveintopython.org/
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Best way to protect my new commercial software.

2007-12-12 Thread James Matthews
You can make it hard and annoying etc.. to crack! but you will never stop
people from cracking it!

On Dec 10, 2007 8:15 AM, farsheed <[EMAIL PROTECTED]> wrote:

> I wrote a software and I want to protect it so can not be cracked
> easily. I wrote it in python and compile it using py2exe. what is the
> best way in your opinion?
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: After running for four days, Python program stalled

2007-12-12 Thread James Matthews
INT 3 is a debug interrupt:-)

On Dec 12, 2007 8:41 PM, Chris Mellon <[EMAIL PROTECTED]> wrote:

> On Dec 12, 2007 1:34 PM, John Nagle <[EMAIL PROTECTED]> wrote:
> > Had a Python program stall, using no time, after running OK for four
> days.
> > Python 2.4, Windows.  Here's the location in Python where it's stalled.
> > Any idea what it's waiting for?
> >
> > John Nagle
> >
> > 77FA1428   mov ecx,dword ptr [ebp-10h]
> > 77FA142B   mov dword ptr fs:[0],ecx
> > 77FA1432   pop edi
> > 77FA1433   pop esi
> > 77FA1434   pop ebx
> > 77FA1435   leave
> > 77FA1436   ret 10h
> > 77FA1439   cmp dword ptr [ebp-24h],0
> > 77FA143D   je  77FA1447
> > 77FA143F   pushdword ptr [ebp-24h]
> > 77FA1442   call77F8B5DF
> > 77FA1447   ret
> > 77FA1448   ret 4
> > 77FA144B   int 3# STALLED HERE
> > 77FA144C   ret
> > 77FA144D   int 3
> > 77FA144E   ret
> > 77FA144F   mov eax,dword ptr [esp+4]
> > 77FA1453   int 3
> > 77FA1454   ret 4
> > 77FA1457   mov eax,dword ptr [ebp-14h]
> > 77FA145A   mov eax,dword ptr [eax]
> > 77FA145C   mov eax,dword ptr [eax]
> > --
>
>
> Use a tool like sysinternal procexp to get more useful information
> about the programs state, like what threads there are and a stack
> trace with symbols of the each thread.
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: looking for gui for python code

2007-12-13 Thread James Matthews
Using any GUI package you should be able to build your application into EXE
format!

On Dec 13, 2007 6:46 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

> hi
> i have written some python scripts which take command line arguments
> and do some job. i would like to make it into a .exe using py2exe and
> distribute it with innosetup.. befor that i would like to add some GUI
> support..i mean select some values using a folder explorer etc..which
> would be a good gui builder for this? i have heard about  guibuilder
> from http://spectcl.sourceforge.net/  or is it better to use tkinter
> (i have little experience with gui designing)
>
> can someone  give a suggestion?
> TIA
> dn
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Happy Christmas Pythoneers

2007-12-24 Thread James Matthews
Happy Holidays Y'all!

On Dec 24, 2007 5:50 PM, Nabeel Ali Memon <[EMAIL PROTECTED]> wrote:

> :-) sure if we had machines addressing above hexa...
>
>
> On Dec 24, 2007 9:30 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:
>
> > On Dec 24, 1Ha2:17�am, Paddy < [EMAIL PROTECTED]> wrote:
> > > After quite enjoying participating in the group in 2007, I'd like to
> > > wish you all a Merry Xmas.
> > >
> > > - Paddy.
> >
> > Shouldn't that be 0Xmas?
> > --
> > http://mail.python.org/mailman/listinfo/python-list
>
>
>
>
> --
>
>Nabeel
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Python for web...

2007-12-26 Thread James Matthews
Ha read an RFC for web dev! hehehhe Thats a new one!

On Dec 26, 2007 9:43 AM, Bruno Desthuilliers <
[EMAIL PROTECTED]> wrote:

> [EMAIL PROTECTED] a écrit :
> > Hi everyone,
> >
> > I have to develop a web based enterprise application
>
> "enterprise" ???
>
> > for my final year
> > project. Since i am interested in open source, i searched the net.
> > Almost 90% of them were PHP and MySQL. Cant we use python for that ?
>
> Well, I don't know if *you* can, but as far as I'm concerned, that what
> I do whenever possible !-)
>
> > I
> > tried several sites, but there is not enough tutorial for beginners
> > [mod_python, PSP etc]. I couldnt find any detailed book, not even a
> > single book :( All the python books are covering only CGI part)
>
>
> Knowing CGI is certainly not the worst starting point wrt/ web
> development - I whish more PHP 'programmers' had the minimal
> understanding of the HTTP protocol required to write a CGI script (and
> any serious web app FWIW).
>
> > Any suggestions?
>
> Django or Pylons are probably what you're looking for. The first one is
> the more mature, stable, and well documented, and the second one the
> most promising IMHO. If you're new to both web development and Python,
> I'd actually recommand Django.
>
> > Any recommended book?
>
> The HTTP 1.1 RFC !-)
>
>
> > Execuse my English.
>
> Seems fine to me - at least understandable, and that's the important
> point, isn't it ?-)
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: very newbie question about exception handling

2007-12-26 Thread James Matthews
In short input runs an eval on the text before it passes it! So input like
ord('a') will work fine because it will run that code!

On Dec 26, 2007 5:26 AM, <[EMAIL PROTECTED]> wrote:

> Thanks guys! It worked.
>
> Merry Christmas!
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Game Development

2007-12-26 Thread James Matthews
SO use pygame! but please don't spam this list!





-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Python DLL in Windows Folder

2007-12-26 Thread James Matthews
You have read access just not write! Because you need the DLLS in there!

On Dec 25, 2007 7:53 PM, Thorsten Kampe <[EMAIL PROTECTED]> wrote:

> * Stef Mientki (Tue, 25 Dec 2007 11:39:47 +0100)
> > Another reason "not to put the DLL in win/wys32":
> > on a lot of computers writing to win/sys32 or even the whole C-drive
> > is prohibited !
>
> No, definitely not. It's just not allowed for everyone.
>
> Thorsten
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Cheat sheet

2007-12-27 Thread James Matthews
Looks good thanks!

On Dec 27, 2007 11:06 PM, Scott David Daniels <[EMAIL PROTECTED]> wrote:

> Riccardo T. wrote:
> > I wrote a little cheat sheet for this wonderful language, but because of
> > my still little experience with it, I would like to have a feedback
> > Could you have a look at it and tell me what do you think about, please?
> >
> > http://greyfox.imente.org/index.php?id=73
> >
> > --
> > GreyFox
>
> [in the .png]
>  > ...
>  > Callable types
>  >...
>  >User-definet methods
>
> I personally prefer "User-defined methods"
>
>  >...
>  >Class instances
> I'd try:
>  Class instances with a __call__ method.
>
>  > ...
>  > Classes
>  > Classes Instances
>
> This probably wants to be
>   Class Instances
>
> "file" objects are generally supposed to be built with the
> open function, not instantiated as shown.
> Also note iterating on a file gets the lines.
>
> Do you know about seq[i:] and seq[::-1]?
>
> --Scott David Daniels
> [EMAIL PROTECTED]
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: "Impure" Python modules

2007-12-27 Thread James Matthews
I don't quite understand what the word "impure" means here!

On Dec 27, 2007 10:53 PM, <[EMAIL PROTECTED]> wrote:

> Hi,
>
> Is there some way to get a list of "impure" Python modules/extensions
> from PyPI?  I know the mySQL module is a good example, but I am
> working on creating some decent instructions on how to create Windows
> installers from impure modules and am having a hard time finding them.
>
> Thanks!
>
> Mike
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: What's the limit of variables size in pyhton?

2007-12-31 Thread James Matthews
However some Debuggers will not show you variable's that are too big!

On Dec 31, 2007 7:38 PM, Gabriel Genellina <[EMAIL PROTECTED]> wrote:

> En Mon, 31 Dec 2007 15:40:31 -0200, هنداوى <[EMAIL PROTECTED]>
> escribi�:
>
> > Python allow you to only take care about variable name and ignore it's
> > size because pyhton dynamicly allocate it
> > so what's the limit in the allocated size in the memory
>
> As big as would fit on available memory.
>
> --
> Gabriel Genellina
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Python for web...

2007-12-31 Thread James Matthews
The issue is finding a host with mod_python installed for cheap!

On Dec 31, 2007 7:57 AM, David Van Mosselbeen <
[EMAIL PROTECTED]> wrote:

> on Tue, 25 Dec 2007 20:42:03 -0800 (PST), [EMAIL PROTECTED] <
> [EMAIL PROTECTED]> wrote:
> >
> > Hi everyone,
> >
> > I have to develop a web based enterprise application for my final year
> > project. Since i am interested in open source, i searched the net.
> > Almost 90% of them were PHP and MySQL. Cant we use python for that ? I
> > tried several sites, but there is not enough tutorial for beginners
> > [mod_python, PSP etc]. I couldnt find any detailed book, not even a
> > single book :( All the python books are covering only CGI part)
> >
> > Any suggestions? Any recommended book?
> >
> > Execuse my English.
> >
> > Thushanthan.
>
> You can also take a look to `webpy` and `cherrypy`. These where not yet
> mentioned.
>
> --
> David Van Mosselbeen
> http://dvm.zapto.org:8080/
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: ElementTree should parse string and file in teh same way

2007-12-31 Thread James Matthews
When dealing with files you pass it an object! So make your string an object
and then it should work!

On Dec 31, 2007 8:17 AM, Paddy <[EMAIL PROTECTED]> wrote:

> On Dec 31, 3:42 am, "Peter Pei" <[EMAIL PROTECTED]> wrote:
> > One bad design about elementtree is that it has different ways parsing a
> > string and a file, even worse they return different objects:
> > 1) When you parse a file, you can simply call parse, which returns a
> > elementtree, on which you can then apply xpath;
> > 2) To parse a string (xml section), you can call XML or fromstring, but
> both
> > return element instead of elementtree. This alone is bad. To make it
> worse,
> > you have to create an elementtree from this element before you can
> utilize
> > xpath.
>
> I haven't tried this, but you should be able to wrap your text string
> so that it looks like a file using the stringio module and pass that
> to elementtree:
>
> http://blog.doughellmann.com/2007/04/pymotw-stringio-and-cstringio.html
>
> - Paddy.
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Killing worker threads

2008-01-06 Thread James Matthews
You can use the stop method!

On Jan 6, 2008 2:04 PM, tarun <[EMAIL PROTECTED]> wrote:

> Hello All,
>
> Can anyone help me with a simple code through which the main thread can
> kill the worker thread it started.
>
> Thanks & Regards,
> Tarun Devnani
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Python In VS

2008-01-06 Thread James Matthews
Dear List

I would like to know is it possible to use VS (Visual Studio) as a python
IDE! It's a great IDE for C# and i would like to be able to use it for
python also!

Thanks
James

-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Python's great, in a word

2008-01-07 Thread James Matthews
Just Another Vague Acronym = (Java)

On Jan 7, 2008 10:32 PM, Ben Finney <[EMAIL PROTECTED]>
wrote:

> [EMAIL PROTECTED] writes:
>
> > The best thing about Python is ___.
>
> The best thing about Python is its elegance.
>
> --
>  \"Like the creators of sitcoms or junk food or package tours, |
>  `\ Java's designers were consciously designing a product for |
> _o__)people not as smart as them."  -- Paul Graham |
> Ben Finney
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Python's great, in a word

2008-01-08 Thread James Matthews
We have such nice names so the word Python will be something people like and
not something people fear (A massive 12 foot snake) and Pythonic is a
behavior pattern we should all follow! In layman's terms it means we should
all act like snakes a little more!

On Jan 8, 2008 5:13 PM, Carl Banks <[EMAIL PROTECTED]> wrote:

> On Jan 7, 6:29 pm, MRAB <[EMAIL PROTECTED]> wrote:
> > On Jan 7, 5:40 pm, Martin Marcher <[EMAIL PROTECTED]> wrote:>
> [EMAIL PROTECTED] wrote:
> > > > The best thing about Python is ___.
> >
> > > it's pythonicness.
> >
> > I think it sounds better as "its pythonicity".
>
> Mixing Greek and Latin suffixes usually works better than mixing Greek
> and Germanic, doesn't it.
>
>
> Carl Banks
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Peer To Peer File Sharing...

2008-01-08 Thread James Matthews
Look at the old source code of the Bittorrent client for ideas!

On Jan 8, 2008 8:51 PM, Dom Rout <[EMAIL PROTECTED]> wrote:

> Hello.
> Well, this is my first post on any USENET group anywhere, so I hope I
> get it right. Basically, I just want to get some opinions on a plan of
> mine for a new project.
>
> I want to produce a small, peer to peer, file sharing network for the
> use of myself and some of my friends. The purpose of this is basically
> to allow us to share files conveniently without relying on technology
> such as Windows Live Messenger (Yuck).
>
> I have a VPS which I would like to dedicate to the task of acting as a
> tracker, so I can run a server application written in python on it. I
> will also write the first client in python, although I may go for a
> different language for the client in the final version, for
> performance. For now, Python is perfect because of the ease of use
> that it offers and the fact that I already know a bit about socket
> programming using it.
>
> Also concerning architecture, I will also have a number of peers that
> connect to the tracker and also to other peers, via an IP address
> provided by the server, as necessary to download the files.
>
> The files themselves should be split up into "Chunks" of fixed length,
> which will be given an index and tracked by the server. The server
> should know which clients have which chunks of a file, and when a
> client needs to download a file the server should look for other
> clients that have chunks from that file and give the IP address to the
> client, which should then for a connection to this peer and download
> the parts of the file that are available.
>
> When managing the chunks of a file, I will need to use a mutex to
> allow reading and writing of them. I should provide a getter and
> setter method in each file to allow chunks to be placed into it more
> conveniently. The getter and setter should both use mutex's to allow
> multiple threads of uploads and downloads at the same time.
>
> I will need to implement a username and password system, to restrict
> the users of the system to people that I trust.
>
> To uniquely identify a file, I would like to use a file path. There
> should be a theoretical directory that contains all shared files,
> although the client should be given the option of which files from the
> directory to download.
>
> This directory should look like:
> "Global/"
> "Global/Images/"
> "Global/Music/"
> "Users//"
>
> It would be nice if it was possible to subscribe to certain
> directories, and download new files from them as need be.
>
> Well, these are my ideas so far. Is anything drastically obviously
> wrong, and can anyone suggest to me any best practices when
> implementing this sort of design?
>
> Thanks, Dominic Rout.
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: HOW TO HANDLE POINTERS FROM NON-LOCAL HEAPS??

2008-01-11 Thread James Matthews
Ahh it's good to know that you "love" pointers like everyone else!

On Jan 11, 2008 9:30 AM, Gary Herron <[EMAIL PROTECTED]> wrote:
> abhishek wrote:
> > Hi group any idea on HOW  TO HANDLE POINTERS FROM NON-LOCAL HEAPS??
> >
> >
> > Thank you
> >
> POINTERS?   Heaps?   Huh?   Ummm, let me think -- those terms *do* sound
> vaguely familiar -- from sometime in the deep dark primitive past.
> Perhaps from back in my (shudder) C/C++ days -- ya, that's it.
> Thankfully, this is Python and the modern era -- we don't use no
> stinking POINTERS here.
>
> Seriously, this group deals with Python.  There are no pointers in
> Python.  Now please, what did you *really* mean to ask?
>
> Gary Herron
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: *** AMERICAN BASTARDS DESERVE TO BE RAPED ***

2008-01-13 Thread James Matthews
When did this list become a politics dialog? Please keep on topic "Python"!

Thanks
James

On Jan 12, 2008 8:07 PM, Joe Riopel <[EMAIL PROTECTED]> wrote:
> On Jan 12, 2008 2:00 PM, radiosrfun <[EMAIL PROTECTED]> wrote:
> > Whether we agree on "tactics" or not - if it come to a battlefield with the
> > two of us - or any Americans there - we're still going to fight the same
> > enemy - not each other.
>
> This is a good resource for starting Python
> http://diveintopython.org/
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: question

2008-01-22 Thread James Matthews
Since you aren't familyer with classes i will keep this within the
scope of functions... If you have code like this

def a():
   def b():
  a+=1
Then you can only call function b when you are within function a

James

On Jan 22, 2008 8:58 PM,  <[EMAIL PROTECTED]> wrote:
> I'm still learning Python and was wanting to get some thoughts on this.  I 
> apologize if this sounds ridiculous...  I'm mainly asking it to gain some 
> knowledge of what works better.  The main question I have is if I had a lot 
> of lists to choose from, what's the best way to write the code so I'm not 
> wasting a lot of memory?  I've attempted to list a few examples below to 
> hopefully be a little clearer about my question.
>
> Lets say I was going to be pulling different data, depending on what the user 
> entered.  I was thinking I could create a function which contained various 
> functions inside:
>
> def albumInfo(theBand):
> def Rush():
> return ['Rush', 'Fly By Night', 'Caress of Steel', '2112', 'A 
> Farewell to Kings', 'Hemispheres']
>
> def Enchant():
> return ['A Blueprint of the World', 'Wounded', 'Time Lost']
>
> ...
>
> The only problem with the code above though is that I don't know how to call 
> it, especially since if the user is entering a string, how would I convert 
> that string into a function name?  For example, if the user entered 'Rush', 
> how would I call the appropriate function -->  albumInfo(Rush())
>
> But if I could somehow make that code work, is it a good way to do it?  I'm 
> assuming if the user entered 'Rush' that only the list in the Rush() function 
> would be stored, ignoring the other functions inside the albumInfo() function?
>
> I then thought maybe just using a simple if/else statement might work like so:
>
> def albumInfo(theBand):
> if theBand == 'Rush':
> return ['Rush', 'Fly By Night', 'Caress of Steel', '2112', 'A 
> Farewell to Kings', 'Hemispheres']
> elif theBand == 'Enchant':
> return ['A Blueprint of the World', 'Wounded', 'Time Lost']
> ...
>
> Does anyone think this would be more efficient?
>
> I'm not familiar with how 'classes' work yet (still reading through my 'Core 
> Python' book) but was curious if using a 'class' would be better suited for 
> something like this?  Since the user could possibly choose from 100 or more 
> choices, I'd like to come up with something that's efficient as well as easy 
> to read in the code.  If anyone has time I'd love to hear your thoughts.
>
> Thanks.
>
> Jay
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: translating Python to Assembler

2008-01-22 Thread James Matthews
The reason you were finding a Python Debugger when looking for the PDB
files is because PDB is Python DeBugger! Also why would you be looking
for a PDB file if you can read the C source!

On Jan 22, 2008 11:55 PM, Wim Vander Schelden <[EMAIL PROTECTED]> wrote:
> Python modules and scripts are normally not even compiled, if they have
> been,
> its probably just the Python interpreter packaged with the scripts and
> resources.
>
> My advice is that if you want to learn Python, is that you just read a book
> about
> it or read only resources. Learning Python from assembler is kind of...
> strange.
>
> Not only are you skipping several generations of programming languages,
> spanned
> over a period of 40 years, but the approach to programming in Python is so
> fundamentally different from assembler programming that there is simply no
> reason
> to start looking at if from this perspective.
>
> I truly hope you enjoy the world of high end programming languages, but
> treat them
> as such. Looking at them in a low-level representation or for a low-level
> perspective
> doesn't bear much fruits.
>
> Kind regards,
>
> Wim
>
>
>
> On 1/22/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > My expertise, if any, is in assembler. I'm trying to understand Python
> > scripts and modules by examining them after they have been
> > disassembled in a Windows environment.
> >
> > I'm wondering if a Python symbols file is available. In the Windows
> > environment, a symbol file normally has a PDB extension. It's a little
> > unfortunate that Python also uses PDB for its debugger. Google, for
> > whatever reason, wont accept queries with dots, hyphens, etc., in the
> > query line. For example a Google for "python.pdb" returns +python
> > +pdb, so I get a ridiculous number of returns referring to the python
> > debugger. I have mentioned this to Google several times, but I guess
> > logic isn't one of their strong points.  :-)
> > --
> > http://mail.python.org/mailman/listinfo/python-list
> >
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Stripping whitespace

2008-01-23 Thread James Matthews
Using the split method is the easiest!

On 23 Jan 2008 19:04:38 GMT, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Wed, 23 Jan 2008 10:50:02 -0800, ryan k wrote:
>
> > Hello. I have a string like 'LNAME
> > PASTA   ZONE'. I want to create a list of those words and
> > basically replace all the whitespace between them with one space so i
> > could just do lala.split(). Thank you!
>
> You *can* just do ``lala.split()``:
>
> In [97]: lala = 'LNAME   PASTA   ZONE'
>
> In [98]: lala.split()
> Out[98]: ['LNAME', 'PASTA', 'ZONE']
>
> Ciao,
> Marc 'BlackJack' Rintsch
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: help using python on Vista

2008-01-30 Thread James Matthews
You need to go into folder options which is in the control panel and there
under the view tab click Show hidden files and folders

On Jan 30, 2008 9:36 AM, Safe Alattar <[EMAIL PROTECTED]> wrote:

> I have no issues using python on XP. However on Vista I cant get the
> python gui (IDLE) to open!
>
> I did some research and found out that I need to unhide .idlerc but I
> cannot find any hidden files by that name whatsoever. Please help me. Im
> fairly new to python but I want to get this going. User friendly
> instructions would be much appreciated. Thanks.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Does anyone else use this little idiom?

2008-02-02 Thread James Matthews
What i do is a simple range call. for i in range(number of times i want to
repeat something)

I guess it comes from my C days for(i=0;i<100;i++) { or in python for i in
range(99):

On Feb 3, 2008 3:34 AM, Roy Smith <[EMAIL PROTECTED]> wrote:

> In article
> <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED] wrote:
>
> > Ruby has a neat little convenience when writing loops where you don't
> > care about the loop index: you just do n.times do { ... some
> > code ... } where n is an integer representing how many times you want
> > to execute "some code."
> >
> > In Python, the direct translation of this is a for loop.  When the
> > index doesn't matter to me, I tend to write it as:
> >
> > for _ in xrange (1,n):
> >some code
> >
> > An alternative way of indicating that you don't care about the loop
> > index would be
> >
> > for dummy in xrange (1,n):
> >some code
> >
> > But I like using _ because it's only 1 character and communicates well
> > the idea "I don't care about this variable."
>
> Not to me.  If I read "for _ in ...", I wouldn't be quite sure what _ was.
> Is it some magic piece of syntax I've forgotten about?  Or something new
> added to language while I wasn't paying attention (I still consider most
> stuff added since 1.5 to be new-fangled :-)).  If I see "dummy", I know it
> means, "the language requires a variable here, but the value is not
> needed".
>
> > 1. It might be a little jarring to people not used to it.  I do admit
> > it looks pretty strange at first.
> >
> > 2. The variable _ has special meaning at the interactive interpreter
> > prompt.  There may be some confusion because of this.
>
> Wow, I didn't even know about #2.  Now you see what I mean about "some
> magic syntax"?  Surely, between, "It looks strange", and "there may be
> some
> confusion", that's enough reason not to use it?
>
> But, more to the point, I'd try to find variable name which described why
> I
> was looping, even if I didn't actually use the value in the loop body:
>
> for number_that_you_shall_count_to in xrange(3):
>   print "Whaaa"
>  --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Does anyone else use this little idiom?

2008-02-03 Thread James Matthews
Because 0 is counted therefore i only have to do it 99 times

Thanks

On Feb 3, 2008 4:38 AM, Gabriel Genellina <[EMAIL PROTECTED]> wrote:

> En Sun, 03 Feb 2008 01:03:43 -0200, James Matthews <[EMAIL PROTECTED]>
> escribió:
>
> Sorry to be nitpicking, but people coming from other languages may get
> confused by the wrong examples:
>
> > What i do is a simple range call. for i in range(number of times i want
> > to repeat something)
> > I guess it comes from my C days for(i=0;i<100;i++) { or in python for i
> > in range(99):
>
> Should be `for i in range(100)` to match exactly the C loop. Both iterate
> 100 times, with i varying from 0 to 99 inclusive.
>
> >>  [EMAIL PROTECTED] wrote:
> >>
> >> > Ruby has a neat little convenience when writing loops where you don't
> >> > care about the loop index: you just do n.times do { ... some
> >> > code ... } where n is an integer representing how many times you want
> >> > to execute "some code."
> >> >
> >> > In Python, the direct translation of this is a for loop.  When the
> >> > index doesn't matter to me, I tend to write it as:
> >> >
> >> > for _ in xrange (1,n):
> >> >some code
>
> Should be `for _ in xrange(n)` to match the Ruby example. Both iterate n
> times.
>
> > On Feb 3, 2008 3:34 AM, Roy Smith <[EMAIL PROTECTED]> wrote:
> >
> >> But, more to the point, I'd try to find variable name which described
> >> why I was looping, even if I didn't actually use the value in theloop
> >> body:
>
> Me too. Government don't collect taxes by the number of variable names
> used (yet).
>
> --
> Gabriel Genellina
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Python GUI toolkit

2008-02-03 Thread James Matthews
Just a side question!

Does QT support Events from multiple threads without any special calls!
Example when i use WX i have to call wx.CallAfter()


Thanks!

On Feb 3, 2008 6:05 PM, Jorge Godoy <[EMAIL PROTECTED]> wrote:

> [EMAIL PROTECTED] wrote:
>
> > what i meant was, i tried gtk, didnt like it, the main reason was that
> it
> > had a very bad gui appeal for me, i did try my hand at wx , and i would
> > have stuck with it, but then i saw the qt4 screenshot and couple of
> > examples of its code and i liked it, so i was wondering, if anyone would
> > tell me that i should stick to wx or go forward with qt4.
> >
> > also, is qt4 apps better looking in both win/linux than wx apps, coz the
> > main thing i m looking for is visual appeal of the gui.
>
> Qt is a the best choice, IMHO.  Nice support, free if you write free
> software, very nice API, nice tools to develop with and the best looking
> widget system for *nix and mobile phones.
>
> I also don't like GTK that much but unfortunately we have to live with
> some
> apps written with it.
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Why not a Python compiler?

2008-02-05 Thread James Matthews
You can also compile parts of Python to speed them up!

On Feb 5, 2008 9:37 AM, Kay Schluehr <[EMAIL PROTECTED]> wrote:

> On Feb 5, 9:19 am, Santiago  Romero <[EMAIL PROTECTED]> wrote:
> >  ( Surely if this question has been asked for a zillion of times... )
>
> Sure. You can access comp.lang.python via google.google.com. It has a
> search function.
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Useful site for beginners

2008-02-10 Thread James Matthews
If you don't mind me recommending that you include links to python
documentation and show new users how they can read the docs and see the
info!

James

On Feb 10, 2008 9:30 PM, subeen <[EMAIL PROTECTED]> wrote:

> This website can be helpful for Python newbies:
> http://love-python.blogspot.com/
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Displaying Unicode Chars

2008-02-10 Thread James Matthews
Why don't you use ord?

2008/2/10 [EMAIL PROTECTED] <[EMAIL PROTECTED]>:

> I want to make a little Python utility where a user can enter the
> unicode numerical code and get the actual symbol back in utf-8.
>
> For example, a user could enter something like u221E
>
> And get back ∞
>
> Now, this does seem to work:
>
> >>> print u"\u221E"
> ∞
> However how can I change it so it works with a string variable?
>
> print unicode("\u221E") doesn't seem to do it.
>
> I hope this makes sense.  I don't know all the unicode terminology to
> phrase this question coherently ;-)
>
> Thanks in advance,
>
> Greg
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: win32com.client question

2008-02-13 Thread James Matthews
What do you mean possible?

On Feb 13, 2008 3:05 PM, Juan_Pablo <[EMAIL PROTECTED]> wrote:

> import  win32com.client
> is posible in linux ?
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

  1   2   >