RE: What is the Difference Between quit() and exit() commands in Python?

2019-09-16 Thread wesley

  Hi

exit (http://docs.python.org/2/library/constants.html#exit"; rel="noreferrer) is 
an alias for quit (or vice-versa). They exist together simply to make Python more 
user-friendly.

please refer:  
https://stackoverflow.com/questions/19747371/python-exit-commands-why-so-many-and-when-should-each-be-used
 
(https://stackoverflow.com/questions/19747371/python-exit-commands-why-so-many-and-when-should-each-be-used)



-ursprüngliche Nachricht-
Von:  hongyi.z...@gmail.com (mailto:hongyi.z...@gmail.com)
Gesendet: 16.09.2019 14:35 Uhr
An:  python-list@python.org (mailto:python-list@python.org)
Betreff: What is the Difference Between quit() and exit() commands in Python?



What is the Difference Between quit() and exit() commands in Python?
--
 mail.python.org/mailman/listinfo/python-list 
(https://mail.python.org/mailman/listinfo/python-list"; target="_blank" 
rel="noopener)


-ursprüngliche Nachricht Ende-



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


Sort one sequence by O(n) in time and O(1) in space

2014-02-09 Thread Wesley
Hi guys,
   Here is one question related to algorithm.
Details here:

here is input sequence like a1,a2,...,an,b1,b2,...,bn ,the ax and bx always 
exist in pair. So, now, how to change the sequence to a1,b1,...,an,bn, with 
time complexity as O(n) and space as O(1).

Any comments will be appreciated.
Thanks.
Wesley
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Sort one sequence by O(n) in time and O(1) in space

2014-02-09 Thread Wesley
在 2014年2月9日星期日UTC+8下午11时48分17秒,Oscar Benjamin写道:
> Please don't top-post.
> 
> On Feb 9, 2014 2:40 PM, "Ni Wesley"  wrote:
> 
> >
> 
> > Yes, with no new list, otherwise, space won't to be O(1)
> 
> Did you read the link I posted:
> 
> >> http://en.wikipedia.org/wiki/In-place_matrix_transposition
> 
> 
> Oscar

Sorry getting a network problem these two days.
I am reading :-)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Sort one sequence by O(n) in time and O(1) in space

2014-02-09 Thread Wesley

> > here is input sequence like a1,a2,...,an,b1,b2,...,bn ,the ax and bx always 
> > exist in pair. So, now, how to change the sequence to a1,b1,...,an,bn, with 
> > time complexity as O(n) and space as O(1).
> 
> 
> 
> The two halves of the list are already sorted, yes? 

[Wesley] No, not sorted yet..
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Sort one sequence by O(n) in time and O(1) in space

2014-02-09 Thread Wesley
[Wesley] This is not homework:-) 
And actually I am new to algorithm, so you guys can feel free to say anything 
you want
-- 
https://mail.python.org/mailman/listinfo/python-list


gdb unable to read python frame information

2014-03-06 Thread Wesley
Hi guys,
  My env: centos 6.5 64 bit; gdb 7.1; python 2.6.6

I wanna use gdb to attach my running python scripts.
Successfully import libpython in gdb, but seems all py operations failed to 
read python information.

Here is the snippet:
(gdb) python
>import libpython
>end
(gdb) py-bt
#3 (unable to read python frame information)
#5 (unable to read python frame information)
#7 (unable to read python frame information)
#9 (unable to read python frame information)
#18 (unable to read python frame information)
#22 (unable to read python frame information)
#26 (unable to read python frame information)
#28 (unable to read python frame information)
#29 (unable to read python frame information)
#38 (unable to read python frame information)
#39 (unable to read python frame information)
#40 (unable to read python frame information)
#42 (unable to read python frame information)
#44 (unable to read python frame information)
#45 (unable to read python frame information)
#47 (unable to read python frame information)
#49 (unable to read python frame information)
#51 (unable to read python frame information)
#55 (unable to read python frame information)
#62 (unable to read python frame information)
#64 (unable to read python frame information)
#76 (unable to read python frame information)
#88 (unable to read python frame information)
#100 (unable to read python frame information)
(gdb) py-locals
Unable to read information on python frame
(gdb) 

Is there anything wrong?
Thanks.
Wesley
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: gdb unable to read python frame information

2014-03-07 Thread Wesley
Then, how to make python get debug symbols? 

Install python from source with some special configure options?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: gdb unable to read python frame information

2014-03-08 Thread Wesley
python debuginfo is installed...
Still,py-bt, py-locals.etc cannot read python frame
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: gdb unable to read python frame information

2014-03-08 Thread Wesley
1. install gdb from source with configure option --with-python

2. install python from source with configure option --with-pydebug

3. Got error in gdb here:
2.6.6 (r266:84292, Jan 22 2014, 09:42:36) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]
(gdb) py-bt
Undefined command: "py-bt".  Try "help".
(gdb) python
>import libpython
>end
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/share/gdb/python/libpython.py", line 49, in 
_type_size_t = gdb.lookup_type('size_t')
gdb.error: No type named size_t.
Error while executing Python code.
(gdb) 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: gdb unable to read python frame information

2014-03-08 Thread Wesley
Now I use gdb python -p 
then, import libpython
py-bt is null, py-locals raise here:
Unable to locate python frame

What's going on...
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: gdb unable to read python frame information

2014-03-08 Thread Wesley
So, let me clarify here, in order to try, I get a clean machine.

Centos 6.5 64bit.
Now , I try this:
1. install gdb 7.7 from source , with configure option --with-python

2. install python 2.6.6 from source, with configure option --with-pydebug

3. run a python script

4. from command line, gdb python -p  to attach the running script

5. within gdb, issue python, import libpython, end 
  no errors
6. py-bt outputs nothing, py-locals says Unable to locate python frame
here is the snippet:
[root@localhost Python-2.6.6]# gdb python 52315
GNU gdb (GDB) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...done.
Attaching to program: /home/nipen/test/Python-2.6.6/python, process 52315
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols 
found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
0x0030a98e15c3 in ?? ()
(gdb) bt
#0  0x0030a98e15c3 in ?? ()
#1  0x7f4cf68d1219 in ?? ()
#2  0x in ?? ()
(gdb) py-bt
Undefined command: "py-bt".  Try "help".
(gdb) python
>import libpython
>end
(gdb) py-bt
(gdb) 
(gdb) py-locals
Unable to locate python frame
(gdb) 
Unable to locate python frame
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: gdb unable to read python frame information

2014-03-08 Thread Wesley
Anybody has suggestions?

This really makes me crazy...
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problem using py-bt, py-locals, etc. during GDB debugging [solved]

2014-03-09 Thread Wesley
I hit a problem alike yours.
Cannot fix according your method.

Here is snippet:
root@localhost python]# gdb python 40290
GNU gdb (GDB) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...done.
Attaching to program: /usr/local/bin/python, process 40290
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols 
found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
0x0030a98e15c3 in ?? ()
(gdb) py-bt
(gdb) py-list
Unable to locate python frame
(gdb) py-locals
Unable to locate python frame
(gdb) 

I use gdb 7.7, python 2.6.6 , centos 6.5 64bit
Any suggestion?

Thanks.
Wesley
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: gdb unable to read python frame information

2014-03-09 Thread Wesley
What's information do you want?

I told the OS, gdb and python version.

And my operation steps.

What do you want more, then, I can type here.

Wesley
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: gdb unable to read python frame information

2014-03-09 Thread Wesley
If you don't read the loop from the top, and don't tell me exactly what you 
want by just keep saying context, please ingore this post.

Thanks.
Wesley

在 2014年3月10日星期一UTC+8上午9时48分41秒,Mark Lawrence写道:
> On 10/03/2014 01:06, Wesley wrote:
> 
> > What's information do you want?
> 
> >
> 
> > I told the OS, gdb and python version.
> 
> >
> 
> > And my operation steps.
> 
> >
> 
> > What do you want more, then, I can type here.
> 
> >
> 
> > Wesley
> 
> >
> 
> 
> 
> Context, you just keep sending messages like the above which on its own 
> 
> is meaningless.  Why should anybody answer your question when you can't 
> 
> be bothered to supply all the needed data in one hit?
> 
> 
> 
> -- 
> 
> My fellow Pythonistas, ask not what our language can do for you, ask 
> 
> what you can do for our language.
> 
> 
> 
> Mark Lawrence
> 
> 
> 
> ---
> 
> This email is free from viruses and malware because avast! Antivirus 
> protection is active.
> 
> http://www.avast.com

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


Re: gdb unable to read python frame information

2014-03-10 Thread Wesley
x86_64 already installed and latest 
version
Package matching python-debuginfo-2.6.6-51.el6.x86_64 already installed. 
Checking for update.
Package glibc-debuginfo-2.12-1.132.el6.x86_64 already installed and latest 
version
No debuginfo packages available to install

在 2014年3月10日星期一UTC+8下午3时28分30秒,dieter写道:
> Wesley  writes:
> 
> 
> 
> > If you don't read the loop from the top, and don't tell me exactly what you 
> > want by just keep saying context, please ingore this post.
> 
> 
> 
> You are doing things only a few people do: trying to debug
> 
> a Python process on C level -- and you observe really strange things.
> 
> It is very difficult to guess from the distance what goes wrong.
> 
> 
> 
> Apparently, your gdb sees a very strange state of the debugged
> 
> process. But why?
> 
> 
> 
> Missing symbols was the first guess (the
> 
> gdb output you have provided does not suggest this - but
> 
> I have not seen the "reading symbols from "python" ..."; thus,
> 
> there may still be a problem with this).
> 
> 
> 
> A runaway process is another guess.
> 
> 
> 
> Some gdb problem another one.
> 
> 
> 
> 
> 
> I would approach the situation by simplifying the setup.
> 
> Instead of attaching a running Python process, I would
> 
> use "gdb python"; then "run"; then "CTRL-C" and there look
> 
> what "bt" gives you (this should demonstrate whether your
> 
> "gdb" is set up correctly and can debug Python on C level).
> 
> Then you write an infinitely running function in Python,
> 
> run it and again interrupt with "gdb" to see whether the "py-*"
> 
> commands are working. If this all work, you come again
> 
> to your actual task -- understanding what your python process
> 
> is doing.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: gdb unable to read python frame information

2014-03-10 Thread Wesley
Now, I fixed the problem...

Instead of python2.6.6, for python 2.7 it's OK..

Why? gdb does not support python 2.6.6?

Is it related to python-gdb.py? I googled a lot, seems only has 
python2.7-gdb.py, no python2.6-gdb.py.


在 2014年3月10日星期一UTC+8下午3时28分30秒,dieter写道:
> Wesley  writes:
> 
> 
> 
> > If you don't read the loop from the top, and don't tell me exactly what you 
> > want by just keep saying context, please ingore this post.
> 
> 
> 
> You are doing things only a few people do: trying to debug
> 
> a Python process on C level -- and you observe really strange things.
> 
> It is very difficult to guess from the distance what goes wrong.
> 
> 
> 
> Apparently, your gdb sees a very strange state of the debugged
> 
> process. But why?
> 
> 
> 
> Missing symbols was the first guess (the
> 
> gdb output you have provided does not suggest this - but
> 
> I have not seen the "reading symbols from "python" ..."; thus,
> 
> there may still be a problem with this).
> 
> 
> 
> A runaway process is another guess.
> 
> 
> 
> Some gdb problem another one.
> 
> 
> 
> 
> 
> I would approach the situation by simplifying the setup.
> 
> Instead of attaching a running Python process, I would
> 
> use "gdb python"; then "run"; then "CTRL-C" and there look
> 
> what "bt" gives you (this should demonstrate whether your
> 
> "gdb" is set up correctly and can debug Python on C level).
> 
> Then you write an infinitely running function in Python,
> 
> run it and again interrupt with "gdb" to see whether the "py-*"
> 
> commands are working. If this all work, you come again
> 
> to your actual task -- understanding what your python process
> 
> is doing.

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


gdb python how to output integer for examine memory

2014-03-24 Thread Wesley
Hi all,
  I am trying to use gdb debug python script.
I am using gdb7.7 and python2.7.6, here is my simple test script: 
import time

def next(i):
time.sleep(10)
i = 1 - i

i = 1
while True:
next(i)
When this script running, gdb attach to it, and here is snippet:

(gdb) py-bt
#5 Frame 0x201e130, for file test.py, line 6, in next (i=1)
Python Exception  (2, 
'\xe6\xb2\xa1\xe6\x9c\x89\xe9\x82\xa3\xe4\xb8\xaa\xe6\x96\x87\xe4\xbb\xb6\xe6\x88\x96\xe7\x9b\xae\xe5\xbd\x95',
 'test.py'): 
Error occurred in Python command: (2, 
'\xe6\xb2\xa1\xe6\x9c\x89\xe9\x82\xa3\xe4\xb8\xaa\xe6\x96\x87\xe4\xbb\xb6\xe6\x88\x96\xe7\x9b\xae\xe5\xbd\x95',
 'test.py')
(gdb) frame 5
#5  0x004d01a7 in PyEval_EvalFrameEx (f=Frame 0x201e130, for file 
test.py, line 6, in next (i=1), throwflag=0) at Python/ceval.c:2666
2666x = call_function(&sp, oparg);
(gdb) py-locals
i = 1
(gdb) pyo i
No symbol "i" in current context.
(gdb) 
No symbol "i" in current context.
(gdb) p f->f_localsplus
$1 = {1}
(gdb) p f->f_localsplus[0]
$2 = 1
(gdb) p &(f->f_localsplus[0])
$3 = (PyObject **) 0x201e2b8
(gdb) x/d 0x201e2b8
0x201e2b8:  31304528
(gdb) p sizeof(f->f_localsplus[0])
$4 = 8
(gdb) x/dg 0x201e2b8
0x201e2b8:  31304528
(gdb) x/dw 0x201e2b8
0x201e2b8:  31304528
(gdb) 

So, the latter several commands, I wannted to check memory content, but , how 
to output integer 1?

Thanks.
Wesley
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: gdb python how to output integer for examine memory

2014-03-24 Thread Wesley
Hi Dave,
  Thanks for your response.
It's just a simple script for test:-)
My concern is use gdb to monitor variable in memory within python process.
For details, in my origin post, just wanna why cannot output interger value 
from the address.

Maybe here is not right for gdb python question..but seems I cannot post 
question at another gdb group.

So, post here, since it's also related to python,in case anyone knowns this.
Sorry for that.

Wesley

在 2014年3月24日星期一UTC+8下午8时22分59秒,Dave Angel写道:
> Wesley  Wrote in message:
> 
> > Hi all,
> 
> >   I am trying to use gdb debug python script.
> 
> > I am using gdb7.7 and python2.7.6, here is my simple test script: 
> 
> > import time
> 
> > 
> 
> > def next(i):
> 
> > time.sleep(10)
> 
> > i = 1 - i
> 
> > 
> 
> > i = 1
> 
> > while True:
> 
> > next(i)
> 
> > When this script running, gdb attach to it, and here is snippet:
> 
> > 
> 
> 
> 
> I cannot help with gdb, but I can point out that you have two
> 
>  separate variables here. Decrement ing the local has no effect on
> 
>  the global value.
> 
> 
> 
> The preferred way is to return any values from the function that
> 
>  you want to use after it exits. 
> 
> def next(i):
> 
>  time.sleep(10)
> 
>  i = 1 - i
> 
>  return i
> 
> 
> 
> i = 1
> 
> while True:
> 
> i =next(i)
> 
> 
> 
> Another possibility,  generally a bad idea,  is declaring i global
> 
>  in the function. 
> 
> 
> 
> -- 
> 
> DaveA

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


Re: Python developer salary survey - results

2014-03-24 Thread Wesley
在 2014年3月25日星期二UTC+8上午4时57分49秒,victo...@vtenterprise.com写道:
> PyStreet's February salary survey attracted respondents from 37 countries. 
> 
> 
> 
> Median annual salary in the U.S.: $95,000
> 
> Median annual salary worldwide: $50,000
> 
> 
> 
> Complete study: http://bit.ly/1dgCw3p

I am below the worldwide median...
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: gdb python how to output integer for examine memory

2014-03-25 Thread Wesley
在 2014年3月25日星期二UTC+8下午3时49分09秒,dieter写道:
> Wesley  writes:
> 
> 
> 
> >   I am trying to use gdb debug python script.
> 
> > I am using gdb7.7 and python2.7.6, here is my simple test script: 
> 
> > import time
> 
> >
> 
> > def next(i):
> 
> > time.sleep(10)
> 
> > i = 1 - i
> 
> >
> 
> > i = 1
> 
> > while True:
> 
> > next(i)
> 
> > When this script running, gdb attach to it, and here is snippet:
> 
> >
> 
> > ...
> 
> > (gdb) frame 5
> 
> > #5  0x004d01a7 in PyEval_EvalFrameEx (f=Frame 0x201e130, for file 
> > test.py, line 6, in next (i=1), throwflag=0) at Python/ceval.c:2666
> 
> > 2666x = call_function(&sp, oparg);
> 
> > (gdb) py-locals
> 
> > i = 1
> 
> > (gdb) pyo i
> 
> > No symbol "i" in current context.
> 
> 
> 
> Quite a lot of time has passed since I last had to debug Python
> 
> processes at C level -- thus, my memory may be unreliable.
> 
> 
> 
> When I remember right, then "pyo" is used to interprete
> 
> a C level variable as a Python object (and print it) -- not
> 
> a Python level variable. In your case, "i" is a Python level variable.
> 
> 
> 
> You must carefully distinguish between the C level and the Python level.
> 
> Some commands expect C level names/objects;
> 
> others may expect Python level names/objects.
> 
> 
> 
> To learn how you can obtain the value of a Python variable,
> 
> I see two approaches: look through the list of provided commands
> 
> (and their documentation) and try to figure out which might be applicable
> 
> and then may some tests; or look at the implementation of "py-locals"
> 
> and use this knowledge to define you own command (for this,
> 
> you will also need to understand the gdb language to define commands).

Hi Dieter,
  Thanks.
Actually, I can now see the varialbe names at Python level and C level.
I just want to verify x command to monitor the memory content.
So, in my origin post, I can get variable i's address, and see the value is 1,
then, I wanna have a try x command, the issue is, when use x/format i's 
address, the output is not 1, but other things:-(
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: gdb python how to output integer for examine memory

2014-03-26 Thread Wesley
在 2014年3月26日星期三UTC+8下午3时10分23秒,dieter写道:
> Wesley  writes:
> 
> > ...
> 
> > Actually, I can now see the varialbe names at Python level and C level.
> 
> > I just want to verify x command to monitor the memory content.
> 
> > So, in my origin post, I can get variable i's address, and see the value is 
> > 1,
> 
> > then, I wanna have a try x command, the issue is, when use x/format i's 
> > address, the output is not 1, but other things:-(
> 
> 
> 
> All Python objects start (at C level) with a header (containing
> 
> the reference count, a pointer to the associated type and
> 
> maybe other things); the "real" value starts behind this header.
> 
> 
> 
> This means, to see the "1" in your example, you must skip the
> 
> associated object header -- either in the output or by adding
> 
> the size of the header to the initial address.

Most like this.
I will try later.
-- 
https://mail.python.org/mailman/listinfo/python-list


Python IM server

2014-03-31 Thread Wesley
Hi all,
  I want to develop a instant message server, simply has user and group entity.

Is there any better existing open-source one?
Thus I can download and have a look.

Thanks.
Wesley
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python IM server

2014-03-31 Thread Wesley
在 2014年3月31日星期一UTC+8下午8时37分32秒,Lutz Horn写道:
> Hi,
> 
> 
> 
> >   I want to develop a instant message server, simply has user and 
> 
> > group entity.
> 
> > 
> 
> > Is there any better existing open-source one?
> 
> 
> 
> Take a look at XMPP[0]. There are some Python libraries[1].
> 
> 
> 
> [0] https://en.wikipedia.org/wiki/XMPP
> 
> [1] http://xmpp.org/xmpp-software/libraries/
> 
> 
> 
> -- 
> 
> Opt out of global data surveillance programs like PRISM, XKeyscore and 
> 
> Tempora.
> 
> https://prism-break.org

I am looking at telepathy, empathy.
Currently instant message is urgent, but needs voice/video call in the future.

For instant message, I have user-to-user and user-to-group cases. 
Don't know if it suits well.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python IM server

2014-04-01 Thread Wesley
在 2014年4月1日星期二UTC+8下午1时06分17秒,Miki Tebeka写道:
> >   I want to develop a instant message server, simply has user and group 
> > entity.
> 
> > Is there any better existing open-source one?
> 
> > Thus I can download and have a look.
> 
> You can take a look at Twisted Words 
> (https://twistedmatrix.com/trac/wiki/TwistedWords).

Have you tried this before?
I just have a look. Seems most samples are just for bot.

I have scenarios that user-to-user and user talking in group.
So, for the IM server side, may need store some infomation in database,store 
messages not sent to user .etc
Seems twisted words is high wrapped, we still need to develop lots of things.

Wesley
-- 
https://mail.python.org/mailman/listinfo/python-list


Telepathy is server or client?

2014-04-02 Thread Wesley
Hi,
  These days I see Telepathy on the net. Not so much examples for this guy.

Is it used to write client or server? I mean, for example, I wanna develop a 
voice chatting system, so, can use this guy to develop a client or server?

Thanks.
Wesley
-- 
https://mail.python.org/mailman/listinfo/python-list


Python streaming media server

2014-04-05 Thread Wesley
Hi,
  Anyone knows open source streaming media server written by Python?

I am trying to setup a streaming media server in python, wanna find an existing 
one and have a look.

Thanks.
Wesley
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python streaming media server

2014-04-05 Thread Wesley
在 2014年4月6日星期日UTC+8上午1时38分57秒,Sturla Molden写道:
> Wesley  wrote:
> 
> 
> 
> >   Anyone knows open source streaming media server written by Python?
> 
> > 
> 
> > I am trying to setup a streaming media server in python, wanna find an
> 
> > existing one and have a look.
> 
> 
> 
> Not open source, but there is a famous closed-source one called YouTube.

Are you kidding?
I know youtube, but do you think we can use it setup our own streaming media 
server?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python streaming media server

2014-04-05 Thread Wesley
在 2014年4月5日星期六UTC+8下午6时11分02秒,Wesley写道:
> Hi,
> 
>   Anyone knows open source streaming media server written by Python?
> 
> 
> 
> I am trying to setup a streaming media server in python, wanna find an 
> existing one and have a look.
> 
> 
> 
> Thanks.
> 
> Wesley

After a lot google work, I am looking at Flumotion.
Need to check the streaming mode and file formats it support.

Wesley
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python streaming media server

2014-04-06 Thread Wesley
在 2014年4月6日星期日UTC+8下午8时52分37秒,Sturla Molden写道:
> Wesley  wrote:
> 
> 
> 
> >> Not open source, but there is a famous closed-source one called YouTube.
> 
> > 
> 
> > Are you kidding?
> 
> > I know youtube, but do you think we can use it setup our own streaming 
> > media server?
> 
> 
> 
> Obviously not. 
> 
> 
> 
> Before YouTube was bought by Google, it was common knowledge that it ran on
> 
> Stackless Python. So a streaming media server on Python is absolutely
> 
> possible. But no, I don't know of one you can set up and use on your own.
> 
> 
> 
> You can make a highly scalable server with PyZMQ and Tornado or Twisted.
> 
> NumPy is great for storing binary data like media streams. HDF5 (PyTables
> 
> or h5py) might be a better database than some SQL server, as it is capable
> 
> of highly scalable parallel binary i/o.  
> 
> 
> 
> Sturla

Thanks, Sturla.
Umm,I think we can setup one using the technique skills you mentioned above:-)
But that will need a lot work to do I think.

I am looking at an opensource one named Flumotion.

Wesley
-- 
https://mail.python.org/mailman/listinfo/python-list


gdb python print truncated string

2014-04-07 Thread Wesley
Hi all,
  I have a question regarding gdb python.
I use gdb7.7 and python2.7.6.

Here is snippet that py-print one variable:
(gdb) py-print self
local 'self' = , 
timer513645288=<_Timeout at remote 0xb42f760>, timer1248840930=<_Timeout at 
remote 0x7f85f7f4c300>, timer1678666863=<_Timeout at remote 0x7f85fec0ddf0>, 
timer888598936=<_Timeout at remote 0x7f860579a300>, timer1566174556=<_Timeout 
at remote 0xe69a7d0>, timer1307561941=<_Timeout at remote 0x7f85e41145a0>, 
timer1010094072=<_Timeout at remote 0xb42af40>, to_device={u'sendno': 
u'1252682169', u'msg_content': {u'message': {u'command': True}}, u'msg_type': 
u'2'}, timer2050775853=<_Timeout at remote 0x7f8606ddcb50>, 
timer1115907467=<_Timeout at remote 0x9c02140>, timer333587031=<_Timeout at 
remote 0xbb25450>, timer71350378=<_Timeout at remote 0x7f85e5e38220>, 
timer1044716881=<_Timeout at remote 0x7f86053094c0>, timer2069059536=<_Timeout 
at remote 0x7f85f3d3b530>, timer2139990080=<_Timeout at remote 0x8bd5370>, 
timer1121163931=<_Timeout at remote 0x99e5370>, 
queue=, maxsize=0, all_ta...(truncated)

self is instance of Connection class.
So, actually, I wanna check self.status...but you can see the print is 
truncated.
I tried py-print self.status but failed.
After a lot google work, somebody mention gdb 'set print elements 0/-1', but 
still failed..

So, how to check self.status value?

Thanks.
Wesley
-- 
https://mail.python.org/mailman/listinfo/python-list


python obfuscate

2014-04-10 Thread Wesley
Hi all,
  Does python has any good obfuscate?

Currently our company wanna release one product developed by python to our 
customer. But dont's wanna others see the py code.

I googled for a while but mostly just say using pyc. Any better one?

Our product is deployed on Linux bed.

Thanks.
Wesley
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: python obfuscate

2014-04-10 Thread Wesley
pyc has weakness:
1. easy to decompile
2. python version related, e.g. pyc from py2.5 cannot be used to py2.7 bed


在 2014年4月11日星期五UTC+8上午9时48分04秒,Tobiah写道:
> On 4/10/2014 6:29 PM, Wesley wrote:
> 
>  > Hi all, Does python has any good obfuscate?
> 
>  >
> 
>  > Currently our company wanna release one product developed by python
> 
>  > to our customer. But dont's wanna others see the py code.
> 
>  >
> 
>  > I googled for a while but mostly just say using pyc. Any better one?
> 
> 
> 
> Does that work?  If so, wouldn't that be a great solution?
> 
> 
> 
> Toby

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


Re: python obfuscate

2014-04-10 Thread Wesley
Umm, just wanna make all .py files not human readable.

Or, maybe need a tool like zend in php.

在 2014年4月11日星期五UTC+8上午9时41分11秒,Ben Finney写道:
> Wesley  writes:
> 
> 
> 
> > Hi all,
> 
> >   Does python has any good obfuscate?
> 
> 
> 
> Define “good obfuscate”. What is your goal?
> 
> 
> 
> If it is to hide your program's secrets from others, then obfuscation
> 
> isn't going to help: no matter how good it is, it still needs to be
> 
> readable by the runtime on the machine.
> 
> 
> 
> Moreover, the more effective the obfuscation, the less correspondence
> 
> there is between the distributed code and the code ytou actually
> 
> maintain. Attempting to debug problems will be infeasible, directly in
> 
> proportion to how effective the obfuscation is.
> 
> 
> 
> Before looking to obfuscate your code, first establish – beyond mere
> 
> emotional conviction – that there actually is something in the code
> 
> which is worth hiding from recipients.
> 
> 
> 
> > Currently our company wanna release one product developed by python to
> 
> > our customer. But dont's wanna others see the py code.
> 
> 
> 
> That's impossible: the code is in the hands of the customer. If your
> 
> threat model is “the person who possesses the code must not have
> 
> access”, then you've lost, just as DRM is a failure.
> 
> 
> 
> -- 
> 
>  \  “People demand freedom of speech to make up for the freedom of |
> 
>   `\   thought which they avoid.” —Soren Aabye Kierkegaard (1813–1855) |
> 
> _o__)  |
> 
> Ben Finney

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


Re: gdb python print truncated string

2014-04-11 Thread Wesley
在 2014年4月8日星期二UTC+8上午10时21分24秒,Wesley写道:
> Hi all,
> 
>   I have a question regarding gdb python.
> 
> I use gdb7.7 and python2.7.6.
> 
> 
> 
> Here is snippet that py-print one variable:
> 
> (gdb) py-print self
> 
> local 'self' =  0x7f860614b220>, timer513645288=<_Timeout at remote 0xb42f760>, 
> timer1248840930=<_Timeout at remote 0x7f85f7f4c300>, 
> timer1678666863=<_Timeout at remote 0x7f85fec0ddf0>, timer888598936=<_Timeout 
> at remote 0x7f860579a300>, timer1566174556=<_Timeout at remote 0xe69a7d0>, 
> timer1307561941=<_Timeout at remote 0x7f85e41145a0>, 
> timer1010094072=<_Timeout at remote 0xb42af40>, to_device={u'sendno': 
> u'1252682169', u'msg_content': {u'message': {u'command': True}}, u'msg_type': 
> u'2'}, timer2050775853=<_Timeout at remote 0x7f8606ddcb50>, 
> timer1115907467=<_Timeout at remote 0x9c02140>, timer333587031=<_Timeout at 
> remote 0xbb25450>, timer71350378=<_Timeout at remote 0x7f85e5e38220>, 
> timer1044716881=<_Timeout at remote 0x7f86053094c0>, 
> timer2069059536=<_Timeout at remote 0x7f85f3d3b530>, 
> timer2139990080=<_Timeout at remote 0x8bd5370>, timer1121163931=<_Timeout at 
> remote 0x99e5370>, queue= at remote 0x7081600>, maxsize=0, all_ta...(truncated)
> 
> 
> 
> self is instance of Connection class.
> 
> So, actually, I wanna check self.status...but you can see the print is 
> truncated.
> 
> I tried py-print self.status but failed.
> 
> After a lot google work, somebody mention gdb 'set print elements 0/-1', but 
> still failed..
> 
> 
> 
> So, how to check self.status value?
> 
> 
> 
> Thanks.
> 
> Wesley

Does anyone know this?
-- 
https://mail.python.org/mailman/listinfo/python-list


gdb python core dump file : not in executable format: File format not

2014-04-14 Thread Wesley
Hi guys,
   Today I am debugging an issue related to memory leak.
I use gdb 7.7 and python 2.7.6 to generate one core dump file from production 
env.

And then, just use gdb to debug the coredump upon the same machine.
Got error that seems not support debug core file using pyton?

Here is snippet:
[root@localhost server]# gdb --core  memleak.core 
GNU gdb (GDB) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word".
[New LWP 25738]
[New LWP 25739]
[New LWP 25740]
[New LWP 25745]
[New LWP 25746]
[New LWP 25747]
[New LWP 25635]
Core was generated by `python'.
#0  0x0030016e15e3 in ?? ()
(gdb) file /root/server/deviceserver.py 
"/root/server/deviceserver.py": not in executable format: File format not 
recognized
(gdb) file /root/server/deviceserver
/root/server/deviceserver: No such file or directory.
(gdb) file /root/server/deviceserver.py 
"/root/server/deviceserver.py": not in executable format: File format not 
recognized
(gdb) 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: gdb python core dump file : not in executable format: File format not

2014-04-15 Thread Wesley
在 2014年4月15日星期二UTC+8上午3时37分58秒,david@gmail.com写道:
> Does this help?
> 
> 
> http://plasmodic.github.io/ecto/ecto/usage/external/debugging.html
> 
> 
> 
> 
> 
> 
> http://gnuradio.org/redmine/projects/gnuradio/wiki/TutorialsDebugging
> 
> 
> 
> 
> 
> http://downloads.conceptive.be/downloads/camelot/doc/sphinx/build/advanced/debug.html
> 
> 
> 
> 
> http://forums.gentoo.org/viewtopic-p-7123814.html
> 
> 
> 
> 
> On Mon, Apr 14, 2014 at 1:19 AM, Wesley  wrote:
> 
> Hi guys,
> 
>    Today I am debugging an issue related to memory leak.
> 
> I use gdb 7.7 and python 2.7.6 to generate one core dump file from production 
> env.
> 
> 
> 
> And then, just use gdb to debug the coredump upon the same machine.
> 
> Got error that seems not support debug core file using pyton?
> 
> 
> 
> Here is snippet:
> 
> [root@localhost server]# gdb --core  memleak.core
> 
> GNU gdb (GDB) 7.7
> 
> Copyright (C) 2014 Free Software Foundation, Inc.
> 
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> 
> This is free software: you are free to change and redistribute it.
> 
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> 
> and "show warranty" for details.
> 
> This GDB was configured as "x86_64-unknown-linux-gnu".
> 
> Type "show configuration" for configuration details.
> 
> For bug reporting instructions, please see:
> 
> <http://www.gnu.org/software/gdb/bugs/>.
> 
> Find the GDB manual and other documentation resources online at:
> 
> <http://www.gnu.org/software/gdb/documentation/>.
> 
> For help, type "help".
> 
> Type "apropos word" to search for commands related to "word".
> 
> [New LWP 25738]
> 
> [New LWP 25739]
> 
> [New LWP 25740]
> 
> [New LWP 25745]
> 
> [New LWP 25746]
> 
> [New LWP 25747]
> 
> [New LWP 25635]
> 
> Core was generated by `python'.
> 
> #0  0x0030016e15e3 in ?? ()
> 
> (gdb) file /root/server/deviceserver.py
> 
> "/root/server/deviceserver.py": not in executable format: File format not 
> recognized
> 
> (gdb) file /root/server/deviceserver
> 
> /root/server/deviceserver: No such file or directory.
> 
> (gdb) file /root/server/deviceserver.py
> 
> "/root/server/deviceserver.py": not in executable format: File format not 
> recognized
> 
> (gdb)
> 
> --
> 
> https://mail.python.org/mailman/listinfo/python-list
> 
> 
> 
> 
> 
> -- 
> David Garvey

Yeah, I use gdb --args /usr/local/bin/python ../xxx.py --core xxx.core
Then, 'run' to start script.
However, the core dump file is actually from a memory leak process,which use 
1.2 G momory, but now, through info proc, I got proc id, and then, shell pmap 
proc_id, only 650M, so, seems this is new started proc, not reload env from the 
core file.

Anything wrong?

Thanks.
Wesley
-- 
https://mail.python.org/mailman/listinfo/python-list


Google open positions at Shanghai/China ?

2014-04-22 Thread Wesley
Hi guys,
  Anybody know if there are openning positions at Shanghai, China?
Just ask for one of my friend in case someone here woring for Google:-)
Although see some opened positions from google career, seems no actaully hire 
going on.

Thanks.
Wesley
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: App segmentation fault (CentOS 6.5)

2014-04-23 Thread Wesley
在 2014年4月24日星期四UTC+8上午2时08分29秒,Reginaldo写道:
> Hi,
> 
> 
> 
> I have a GUI app that is written using wx. When I run it on CentOS 6.5, the 
> following error messages are displayed and the app closes:
> 
> 
> 
> (python:10096): Pango-WARNING **: shaping failure, expect ugly output. 
> shape-engine='BasicEngineFc', font='DejaVu Sans 10.9990234375', text=''
> 
> 
> 
> (python:10096): Pango-CRITICAL **: pango_layout_get_line_count: assertion 
> `layout != NULL' failed
> 
> 
> 
> (python:10096): Gdk-CRITICAL **: IA__gdk_draw_layout: assertion 
> `PANGO_IS_LAYOUT (layout)' failed
> 
> Segmentation fault
> 
> 
> 
> I checked if this was a font issue, but the font is installed on the system.
> 
> 
> 
> I use an idle thread in my application.
> 
> 
> 
> Could some let me know what the problem may be in this case? Thank you!
> 
> 
> 
> Python Version used: 2.6.6
> 
> wxPython Version used: 2.8.11

Maybe you can gdb python attach the running pid and check the backtrace.
Severay days ago, I use this guy to address thread hang and memory leak issues.
Just say here if that helps.
-- 
https://mail.python.org/mailman/listinfo/python-list


Pillow installation failed for python with my custom opcode

2015-03-12 Thread Wesley
ocal/lib -L/usr/lib -L/home/src/mypy276/lib 
-ljpeg -lz -lpython2.7 -o build/lib.linux-x86_64-2.7-pydebug/PIL/_imaging.so

/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 
against `.rodata' can not be used when making a shared object; recompile with 
-fPIC

/usr/local/lib/libpython2.7.a: could not read symbols: Bad value

collect2: ld return 1

error: command 'gcc' failed with exit status 1

[74447 refs]


Cleaning up...
Command /home/src/mypy27/bin/python2.7 -c "import 
setuptools;__file__='/home/src/mypy27/build/pillow/setup.py';exec(compile(open(__file__).read().replace('\r\n',
 '\n'), __file__, 'exec'))" install --record 
/tmp/pip-Y7XweN-record/install-record.txt --single-version-externally-managed 
--install-headers /home/src/mypy27/include/site/python2.7 failed with error 
code 1 in /home/src/mypy27/build/pillow
Traceback (most recent call last):
  File "/home/src/mypy27/bin/pip", line 9, in 
load_entry_point('pip==1.4.1', 'console_scripts', 'pip')()
  File "/home/src/mypy27/lib/python2.7/site-packages/pip/__init__.py", line 
148, in main
return command.main(args[1:], options)
  File "/home/src/mypy27/lib/python2.7/site-packages/pip/basecommand.py", line 
169, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 17: 
ordinal not in range(128)
[103880 refs]

I see /usr/local/lib/libpython2.7.a is the formal python2.7.6's, and here is 
libpython2.7.a in my system:
(mypy27)[root@localhost testforpythonencode]# find / -name libpython2.7.a
/usr/local/lib/python2.7/config/libpython2.7.a
/usr/local/lib/libpython2.7.a
/home/src/Python-2.7.6/libpython2.7.a
/home/src/mypy276/lib/python2.7/config/libpython2.7.a

The last one is my customized python location.
For pillow installation, shall I need to specify libpython2.7.a path? 
But I don't know why other packages are correct.
Anyone knows what's wrong here?

Thanks.
Wesley
-- 
https://mail.python.org/mailman/listinfo/python-list


Get html DOM tree by only basic builtin moudles

2015-06-04 Thread Wesley
Hi guys,
  I know there are many modules(builtin or not, e.g. 
beautifulsoup,xml,lxml,htmlparser .etc) to parse html files and output the DOM 
tree. However, if there is any better way to get the DOM tree without using 
those html/xml related modules? I mean, just by some general standard modules, 
e.g. file operations, re module .etc

Input file is something like this:
 
   
DOM Tree test 
   
   
Header 1 
Hello world! 
  


Need the dom tree or just something like:
html -- head -- title(DOM Tree test)
html -- body -- h1(Header 1)
html -- body -- p(Hello world!)

Thanks.
Wesley
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Get html DOM tree by only basic builtin moudles

2015-06-05 Thread Wesley
Hi Laura,
  Sure, I got special requirement that just parse html file into DOM tree, by 
only general basic modules, and based on my DOM tree structure, draft an bitmap.

  So, could you give me an direction how to get the DOM tree?
Currently, I just think out to use something like stack, I mean, maybe read the 
file line by line, adding to a stack data structure(list for example), and, 
then, got the parent/child relation .etc

I don't know if what I said is easy to achieve, I am just trying.
Any better suggestions will be great appreciated.

Thanks.
Wesley

> Elementtree is part of the Python standard library.  You are better off
> using it than rolling your own.   (If you were one of the rare people who
> have some very strange requirements that make you better off writing your
> own, you wouldn't be asking us.  You'd already know.)
> 
> https://docs.python.org/2.7/library/xml.etree.elementtree.html#module-xml.etree.ElementTree
> https://docs.python.org/3.4/library/xml.etree.elementtree.html

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


Re: Get html DOM tree by only basic builtin moudles

2015-06-05 Thread Wesley
> On Fri, Jun 5, 2015 at 12:10 PM, Wesley  wrote:
> > Hi Laura,
> >   Sure, I got special requirement that just parse html file into DOM tree, 
> > by only general basic modules, and based on my DOM tree structure, draft an 
> > bitmap.
> >
> >   So, could you give me an direction how to get the DOM tree?
> > Currently, I just think out to use something like stack, I mean, maybe read 
> > the file line by line, adding to a stack data structure(list for example), 
> > and, then, got the parent/child relation .etc
> >
> > I don't know if what I said is easy to achieve, I am just trying.
> > Any better suggestions will be great appreciated.
> 
> If you want to recreate the same DOM structure that would be created
> by a browser, the standardized algorithm to do so is very complicated,
> but you can find it at
> http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html.
> 
> If you're not necessarily seeking perfect fidelity, I would encourage
> you to try to find some way to incorporate beautifulsoup into your
> project. It likely won't produce the same structure that a real
> browser would, but it should do well enough to scrape from even badly
> malformed html.
> 
> I recommend against using an XML parser, because HTML isn't XML, and
> such a parser may choke even on perfectly valid HTML such as this:
> 
> 
> 
>   Document
>   
> First line
> 
> Second line
>   
> 

Hi,
  Hmm, it's really complex.
Currently, I don't need to involve all error handling,and assume html is well 
formatted, then, generate the DOM tree.

Html sample below:



  
  About - Opera Software
  http://d2jc9zwbrclgz3.cloudfront.net/static-heap/da/dafd15591b35d4f81ca96cf7de6582d705850ff0/apple-touch-icon-57x57.png";>




  
http://operamediaworks.com/";>Opera Mediaworks
  


Who we are, what we do  
  
  


Vision
We strive to develop superior products and services for our users around the 
world, through state-of-the-art technology, innovation, leadership and 
partnerships.http://www.operasoftware.com/company/vision"; 
target="_self">Find out more.







  Page language
  


  
  Select your language:
  English
  

  



Copyright ? 2014 Opera Software ASA. All rights 
reserved.
http://www.opera.com/privacy";>Privacy. http://www.opera.com/terms";>Terms of Use.




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


Captcha identify

2014-08-12 Thread Wesley
Hi guys,
  These days I got a small task to identify Captcha characters.
I googled a lot and find some way to do verification code identify.
However, most are for general captcha.

And, for simple captcha, I can use Pytesser.

However, what about those advanced pictures.
I mean:
1.including number and alpha
2.letters might be rotated
3.letters might be deformed

I don't know why I cannot insert picture attachment here...

But I think you guys can think out what the captcha looks like:-)

So, any suggestions?

Thanks.
Wesley
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Captcha identify

2014-08-12 Thread Wesley

Here is captcha link:
https://drive.google.com/folderview?id=0B33_p7UnVqoyd09mT3V0aWFxRmc&usp=sharing

在 2014年8月12日星期二UTC+8下午8时59分11秒,Dennis Lee Bieber写道:
> On Tue, 12 Aug 2014 00:04:33 -0700 (PDT), Wesley 
> 
> declaimed the following:
> 
> 
> 
> >Hi guys,
> 
> >  These days I got a small task to identify Captcha characters.
> 
> 
> 
>   In other words, you have a task to make a robot that can break the
> 
> procedures put in place to prevent robots from posting to web sites...
> 
> 
> 
>   The whole purpose of the CAPTCHA scheme is that computer AI systems
> 
> aren't advanced enough to process them, whereas a human mind can almost do
> 
> it in the subconscious.
> 
> 
> 
> 
> 
> (as for picture attachments? comp.lang.python is a text newsgroup --
> 
> binaries aren't wanted in it; c.l.p is also gatewayed to a mailing list;
> 
> and that mailing list is gatewayed to gmane.comp.python.general where it is
> 
> made available as a news group (after spam filtering). Google Groups links
> 
> to c.l.p (and many of us wish it didn't)
> 
> -- 
> 
>   Wulfraed Dennis Lee Bieber AF6VN
> 
> wlfr...@ix.netcom.comHTTP://wlfraed.home.netcom.com/

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


Re: Captcha identify

2014-08-12 Thread Wesley
If my questions make you guys not so happy, I am sorry and please just ignore.
I just wanna a general suggestion here in the beginning.
Why I need to write such program is just having such requirements, and has 
nothing to do with the coding work itself. Don't say something to prove you're 
so noble.

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


Re: ANN: Intro+Intermediate Python, San Francisco, Aug 1-3

2012-07-10 Thread wesley chun
hello everyone, hope some of you enjoyed #EuroPython this past
week/end, and perhaps i'll see some of you at OSCON next week!

as promised, here's the one and only FINAL REMINDER of the hardcore
intro+intermediate Python course i'm offering 2012 Aug 1-3 near the
San Francisco airport. reach out to me directly with any questions and
let other folks know who may be interested.

best regards,
--wesley


On Thu, May 10, 2012 at 2:07 PM, wesley chun  wrote:
> Greetings!
>
> I'll be doing another hardcore Python course this summer in the San
> Francisco area. If you're somewhat new to Python or have tinkered but
> want to fill-in the holes, this course is for you. It's somewhat true
> you can learn Python online, watching videos, or reading books, but it
> still takes time and experience to master... I help accelerate this
> process. The course is based on my bestselling "Core Python" books and
> is made up of 3 full days complete with lectures and three hands-on
> coding labs per day.
>
> Please pass on this message to your colleagues who also need to learn
> Python. It's also a great excuse to coming to beautiful Northern
> California for a summer vacation! More details at http://goo.gl/uW4oF
> as well as the links in my .signature below.


-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"A computer never does what you want... only what you tell it."
   +wesley chun : wescpy at gmail : @wescpy
Python training & consulting : http://CyberwebConsulting.com
"Core Python" books : http://CorePython.com
Python blog: http://wescpy.blogspot.com
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: Intro+Intermediate Python, San Francisco, Aug 1-3

2012-05-10 Thread wesley chun
Greetings!

I'll be doing another hardcore Python course this summer in the San
Francisco area. If you're somewhat new to Python or have tinkered but
want to fill-in the holes, this course is for you. It's somewhat true
you can learn Python online, watching videos, or reading books, but it
still takes time and experience to master... I help accelerate this
process. The course is based on my bestselling "Core Python" books and
is made up of 3 full days complete with lectures and three hands-on
coding labs per day.

Please pass on this message to your colleagues who also need to learn
Python. It's also a great excuse to coming to beautiful Northern
California for a summer vacation! More details at http://goo.gl/uW4oF
as well as the links in my .signature below.

Since I hate spam, I'll only send out one more reminder as the date
gets closer... probably around OSCON's timeframe.

Hope to meet some of you soon!
--Wesley Chun
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"A computer never does what you want... only what you tell it."
    wesley chun : wescpy at gmail : @wescpy/+wescpy
    Python training & consulting : http://CyberwebConsulting.com
    "Core Python" books : http://CorePython.com
    Python blog: http://wescpy.blogspot.com
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: Intro+Intermediate Python course, SF, Oct 18-20

2011-07-25 Thread wesley chun
Need to get up-to-speed with Python as quickly and as in-depth as
possible? Already coding Python but still have areas of uncertainty
you need to fill? Then come join me, Wesley Chun, author of
Prentice-Hall's bestseller "Core Python" for a comprehensive
intro/intermediate course coming up this May in Northern California,
then enjoy a beautiful Fall weekend afterwards in San Francisco, the
beautiful city by the bay.

Please pass on this note to whomever you think may be interested. I
look forward to meeting you and your colleagues! Feel free to pass
around the PDF flyer linked down below. Write if you have questions.

Since I hate spam, I'll only send out one reminder as the date gets
closer.

(Comprehensive) Intro+Intermediate Python
Tue-Thu, 2011 Oct 18-20, 9am-5pm

Hope to meet you soon!
-Wesley

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(COMPREHENSIVE) INTRO+INTERMEDIATE PYTHON

Although this course may appear to those new to Python, it is also
perfect for those who have tinkered with it and want to "fill in the
gaps" and/or want to get more in-depth formal training.  It combines
the best of both an introduction to the language as well as a "Python
Internals" training course.

We will immerse you in the world of Python in only a few days, showing
you more than just its syntax (which you don't really need a book to
learn, right?). Knowing more about how Python works under the covers,
including the relationship between data objects and memory management,
will make you a much more effective Python programmer coming out of
the gate. 3 hands-on labs each day will help hammer the concepts home.

Come find out why Google, Yahoo!, Disney, ILM/LucasFilm, VMware,
NASA, Ubuntu, YouTube, and Red Hat all use Python. Users supporting or
jumping to Plone, Zope, TurboGears, Pylons, Django, Google App Engine,
Jython, IronPython, and Mailman will also benefit!

PREVIEW 1: you will find (and can download) a video clip of a
class session recorded live to get an idea of my lecture style and
the interactive classroom environment (as well as sign-up) at:

http://cyberwebconsulting.com

PREVIEW 2: Partnering with O'Reilly and Pearson, Safari Books
Online has asked me to deliver a 1-hour webcast a couple of years ago
called "What is Python?". This was an online seminar based on a
session that I've delivered at numerous conferences in the past. It
will give you an idea of lecture style as well as an overview of the
material
covered in the course.

info:http://www.safaribooksonline.com/events/WhatIsPython.html
download (reg req'd):
http://www.safaribooksonline.com/Corporate/DownloadAndResources/webcastInfo.php?page=WhatIsPython
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

WHERE: near the San Francisco Airport (SFO/San Bruno), CA, USA

WEB:   http://cyberwebconsulting.com

FLYER: http://cyberwebconsulting.com/flyerPP1.pdf

LOCALS: easy freeway (101/280/380) with lots of parking plus public
transit (BART and CalTrain) access via the San Bruno stations, easily
accessible from all parts of the Bay Area

VISITORS: free shuttle to/from the airport, free high-speed internet,
free breakfast and regular evening receptions; fully-equipped suites

See website for costs, venue info, and registration. There is a
significant discounts available for full-time students, secondary
teachers, and others.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
"Python Fundamentals", Prentice Hall, (c)2009
    http://corepython.com

wesley.chun : wescpy-gmail.com : @wescpy
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: Intro+Intermediate Python course, SF, May 24-26

2011-02-25 Thread wesley chun
Need to get up-to-speed with Python as quickly and as in-depth as
possible? Already coding Python but still have areas of uncertainty
you need to fill? Then come join me, Wesley Chun, author of
Prentice-Hall's bestseller "Core Python" for a comprehensive
intro/intermediate course coming up this May in Northern California,
then enjoy the Memorial Day weekend afterwards in San Francisco, the
beautiful city by the bay.

Please pass on this note to whomever you think may be interested. I
look forward to meeting you and your colleagues! feel free to pass
around the PDF flyer linked down below.

(Comprehensive) Introduction to Python
Tue-Thu, 2010 May 24-26, 9am-5pm

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(COMPREHENSIVE) INTRO+INTERMEDIATE PYTHON

Although this course may appear to those new to Python, it is also
perfect for those who have tinkered with it and want to "fill in the
gaps" and/or want to get more in-depth formal training.  It combines
the best of both an introduction to the language as well as a "Python
Internals" training course.

We will immerse you in the world of Python in only a few days, showing
you more than just its syntax (which you don't really need a book to
learn, right?). Knowing more about how Python works under the covers,
including the relationship between data objects and memory management,
will make you a much more effective Python programmer coming out of
the gate. 3 hands-on labs each day will help hammer the concepts home.

Come find out why Google, Yahoo!, Disney, ILM/LucasFilm, VMware,
NASA, Ubuntu, YouTube, and Red Hat all use Python. Users supporting or
jumping to Plone, Zope, TurboGears, Pylons, Django, Google App Engine,
Jython, IronPython, and Mailman will also benefit!

PREVIEW 1: you will find (and can download) a video clip of a
class session recorded live to get an idea of my lecture style and
the interactive classroom environment (as well as sign-up) at:

http://cyberwebconsulting.com

PREVIEW 2: Partnering with O'Reilly and Pearson, Safari Books
Online has asked me to deliver a 1-hour webcast a couple of years ago
called "What is Python?". This was an online seminar based on a
session that I've delivered at numerous conferences in the past. It
will give you an idea of lecture style as well as an overview of the
material
covered in the course.

info:http://www.safaribooksonline.com/events/WhatIsPython.html
download (reg req'd):
http://www.safaribooksonline.com/Corporate/DownloadAndResources/webcastInfo.php?page=WhatIsPython
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

WHERE: near the San Francisco Airport (SFO/San Bruno), CA, USA

WEB:   http://cyberwebconsulting.com

FLYER: http://cyberwebconsulting.com/flyerPP1.pdf

LOCALS: easy freeway (101/280/380) with lots of parking plus public
transit (BART and CalTrain) access via the San Bruno stations, easily
accessible from all parts of the Bay Area

VISITORS: free shuttle to/from the airport, free high-speed internet,
free breakfast and regular evening receptions; fully-equipped suites

See website for costs, venue info, and registration. There is a
significant discounts available for full-time students, secondary
teachers, and others.

Hope to see you there!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
"Python Fundamentals", Prentice Hall, (c)2009
    http://corepython.com

wesley.chun : wescpy-gmail.com : @wescpy
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


How could I implement a virtual method and override it in python?

2016-09-14 Thread wesley . keeling
Hey guys, I will show the code first:

Helper.py:

def Foo( *args ):
print ("This is a callback")

def Run:
Foo()


MyModule.py:

import Helper

def Foo( *args ):
print ("I want to be the new callback")



I want to be able to call the Foo method in MyModule.py when it's there first 
and when it's not I want to call the Foo in helper.py. 

I am coming from .net so I am not fully understanding how the Foo method would 
override the other one. 

Thanks! 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How could I implement a virtual method and override it in python?

2016-09-14 Thread wesley . keeling
On Wednesday, September 14, 2016 at 3:47:52 PM UTC-7, Lawrence D’Oliveiro wrote:
> On Thursday, September 15, 2016 at 10:18:09 AM UTC+12, wesley@iugome.com 
> wrote:
> > Helper.py:
> > 
> > def Foo( *args ):
> > print ("This is a callback")
> > 
> > def Run:
> > Foo()
> > 
> > 
> > MyModule.py:
> > 
> > import Helper
> > 
> > def Foo( *args ):
> > print ("I want to be the new callback")
> 
> Overrides and subclassing applies to classes, not modules.

Yeah I assumed so, is there any ways I can get this to work with the importing 
of the helper?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python 3.6 on Windows - does a python3 alias get created by installation?

2019-10-12 Thread Wesley Peng

smart.thanks.

On 2019/10/12 12:19 下午, Gisle Vanem wrote:


An "alias" could also simply be created using:
   doskey python3=f:\ProgramFiles\Python36\python.exe

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


Re: [RELEASE] Python 3.8.0 is now available

2019-10-14 Thread Wesley Peng

awesome news. thanks for all the hard work.

on 2019/10/15 4:23, Łukasz Langa wrote:

We hope you enjoy Python 3.8!

Thanks to all of the many volunteers who help make Python Development and these 
releases possible! Please consider supporting our efforts by volunteering 
yourself or through organization contributions to the Python Software 
Foundation.

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


Re: A news aggregator for the Python community

2019-10-19 Thread Wesley Peng

Sebastian Steins wrote:

Over the last few weeks I've build a hacker news clone for the Python community:

https://news.python.sc

The source is at github.com/sebst/pythonic-news


that looks interesting. thanks.
--
https://mail.python.org/mailman/listinfo/python-list


Re: I need to study Python

2020-06-26 Thread Wesley Peng

Pick a book like Core Python Programming, read it and do coding follow it.

regards.

sinanp...@gmail.com wrote:

Hey, I'm a completely noob.
I want to learn python, how can i or where can i study python?


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


Re: This is a test

2021-01-08 Thread Wesley Peng
Please don't send a test message to the public list which was read by
thousands of people. thanks.

On Fri, Jan 8, 2021 at 5:26 AM Craig Hatch  wrote:

> I have added you to the EMAIL  list, so when I have questions.
>
> Just learn for fun.
>
>
> Craig Hatch
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


python commmand line params from c++

2005-06-30 Thread Wesley Henwood
What is the proper way to pass command line parameters to a python
script called from C++? I'm tryng this:

path = "c:\\someDir\\someScript.py param1 param2 param3";
PyRun_SimpleFile(PyFile_AsFile( PyFile_FromString( path, "r")),
"someScript.py");

I'm getting a "format error someScript.py, line 1" when the code is
executed.

Note: The strange appearannce of the 3 python function calls nested is
not a bug, but required to prevent a run-time error.

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


Re: python commmand line params from c++

2005-06-30 Thread Wesley Henwood
Thanks Denis.  PySys_SetArgv should do the trick.  The nested function
calls are there because the FILE structrure produced by fopen is not
always compatible with the FILE structure produced by the Python C++
functions.  Something do with the Python C being built with different
version ofthe c run-time libs.

The problem is a bit strange and should be adressed, it's documented
somewhere on the Python site, but no solution is given. That I had to
find by trial and error.  Even better would be a function such as
PyRun_File(char *filename), and do away with handling the FILE
structure altogether.

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


Re: python commmand line params from c++

2005-06-30 Thread Wesley Henwood
Thanks Denis.  PySys_SetArgv should do the trick.  The nested function
calls are there because the FILE structrure produced by fopen is not
always compatible with the FILE structure produced by the Python C++
functions.  Something do with the Python C being built with different
version ofthe c run-time libs.


The FILE problem is a bit strange and should be adressed, it's
documented
somewhere on the Python site, but no solution is given. That I had to
find by trial and error.  Even better would be a function such as
PyRun_File(char *filename), and do away with handling the FILE
structure altogether.

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


ANN: Python training, 2005 Aug 29-31, San Francisco

2005-08-17 Thread Wesley Chun
hi all,

just a reminder that our next Python training course is less than
2 weeks away!  details can be found at http://cyberwebconsulting.com
(click "Python training").  if you're interested in joining us near
San Francisco, sign up soon as there's only room for 9 more people!!
contact us at cyberweb-at-rocketmail.com with any questions.

thanks,
-wesley


> Newsgroups: comp.lang.python
> From: [EMAIL PROTECTED]
> Date: 28 Jul 2005 09:49:31 -0700
> Subject: ANN: Python training, 2005 Aug 29-31, San Francisco
> 
> What:   Python Programming I: Introduction to Python
> When:   August 29-31, 2005
> Where:  San Francisco, CA, USA
> 
> Already know Java, Perl, C/C++, JavaScript, PHP, or TCL/Tk, but want to
> learn Python because you've been hearing about how Google, Yahoo!,
> Industrial Light & Magic, Red Hat, Zope, and NASA are using this
> object-oriented, open source applications and systems development
> language?  Python is rapidly gaining momentum worldwide and seeing more
> new users each year. While similar to those other languages, Python
> differentiates itself with a robust yet simple-as-VB syntax which allows
> for shorter development time and improved group collaboration.
> 
> Need to get up-to-speed with Python as quickly as possible?  Come join
> us in beautiful Northern California the week before Labor Day.  We are
> proud to announce another rigorous Python training event taught by
> software engineer and "Core Python Programming" author, Wesley Chun.
> This is an intense introduction to Python programming geared towards
> those who have some proficiency in another high-level language.  Topics
> include:
> 
> * Python's Objects and Memory Model
> * Data Types, Operators, and Methods
> * Errors and Exception Handling
> * Files and Input/Output
> * Functions and Functional Programming
> * Modules and Packages
> * Classes, Methods, and Class Instances
> * Callable and Executable Objects
> 
> This course will take place daily August 29-31, 2005 (Monday through
> Wednesday, 9am - 5pm) in San Bruno, CA, right near the San Francisco
> International Airport at the:
> 
> Staybridge Suites
> San Francisco Airport
> 1350 Huntington Ave
> San Bruno, CA  94066
> 650-588-0770
> 
> This venue provides free shuttles to/from the airport and has easy
> access to public transit (BART, CalTrain, SamTrans) to help you get all
> over the Bay Area.  Afterwards, feel free to enjoy the holiday weekend
> in the greatest city by the Bay... bring your families!!
> 
> Sign up quickly as we can only take 15-20 enrollees!  For more infor-
> mation and registration, just go to http://cyberwebconsulting.com and
> click on the "Python Training" link.  If you have any questions, feel
> free to contact us at cyberweb-at-rocketmail.com.
-- 
http://mail.python.org/mailman/listinfo/python-list


Beginner PyGTK and MySQL abuse request

2005-02-27 Thread Tom Wesley
Hey,
I've spent far too long being spoilt by a relatively simplistic "just do 
it" style of database application in use at work and have decided to try 
my hand at some Python + MySQL + GTK over the next few days.

I've managed to steal/write a short script that asks for some input and 
searches a database and print the results and was wondering if people 
would have the time to suggest better ways of doing the limited set of 
things it does?

---search.py---
#!/usr/bin/env python
import pygtk
pygtk.require('2.0')
import gtk
import adodb
class AddressSearch:
	def delete_event(self, widget, data=None):
		gtk.main_quit()
		return gtk.FALSE
		
	def btn_search(self, widget, data=None):
		conn = adodb.NewADOConnection('mysql')
		conn.Connect('localhost','root','','rtl')
		
		sql = "select * from address where match(Address1, Address2, Address3, 
Address4, Address5) against('+" + self.entry_address1.get_text() + "+" + 
self.entry_address2.get_text() + "+" + self.entry_address3.get_text() + 
"' in boolean mode);"
		print sql
		cursor = conn.Execute(sql)
		while not cursor.EOF:
			arr = cursor.GetRowAssoc(0)
			print arr['rtlforename'], arr['rtlsurname']
			cursor.MoveNext()
		
		cursor.Close()
		conn.Close()

def __init__(self):
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.set_title("Address search")
self.window.connect("delete_event", self.delete_event)
self.window.set_border_width(20)
table = gtk.Table(5, 2, gtk.TRUE)
self.window.add(table)
label = gtk.Label("Address:")
table.attach(label, 0, 1, 1, 5)
self.entry_address1 = gtk.Entry(max=80)
table.attach(self.entry_address1, 1, 2, 0, 1)
self.entry_address2 = gtk.Entry(max=80)
table.attach(self.entry_address2, 1, 2, 1, 2)
self.entry_address3 = gtk.Entry(max=80)
table.attach(self.entry_address3, 1, 2, 2, 3)
button = gtk.Button(label='Search', stock=gtk.STOCK_OK)
button.connect("clicked", self.btn_search)
table.attach(button, 0, 1, 3, 4)
button = gtk.Button(label="Quit", stock=gtk.STOCK_QUIT)
button.connect("clicked", self.delete_event)
table.attach(button, 1, 2, 3, 4)
self.window.show_all()
def main():
gtk.main()
return 0
if __name__ == "__main__":
AddressSearch()
main()
---end---
Cheers,
Tom
--
http://mail.python.org/mailman/listinfo/python-list


Re: uptime for Win XP?

2004-12-11 Thread Tom Wesley
Esmail Bonakdarian wrote:
Hi,
Is there a way to display how long a Win XP system has been up?
Somewhat analogous to the *nix uptime command.
Thanks,
Esmail
I believe that "uptime" works from the console, but don't have a machine 
to check it with...
--
http://mail.python.org/mailman/listinfo/python-list


Re: Sort one sequence by O(n) in time and O(1) in space

2014-02-09 Thread Ni Wesley
Yes, with no new list, otherwise, space won't to be O(1)

Wesley
2014年2月9日 下午10:31于 "Oscar Benjamin" 写道:

> Please reply to the list rather than directly to me so that other
> people can see the answer to my question and offer you help.
>
> On 9 February 2014 14:04, Ni Wesley  wrote:
> > 2014年2月9日 下午9:41于 "Oscar Benjamin" 写道:
> >
> >> On 9 February 2014 12:13, Wesley  wrote:
> >> > Hi guys,
> >> >Here is one question related to algorithm.
> >> > Details here:
> >> >
> >> > here is input sequence like a1,a2,...,an,b1,b2,...,bn ,the ax and bx
> >> > always exist in pair. So, now, how to change the sequence to
> >> > a1,b1,...,an,bn, with time complexity as O(n) and space as O(1).
> >>
> >> Do you mean that you have a list and you want to rearrange the
> >> elements in-place without creating a new list?
> >
> > Yes
>
> Okay so if you're going to do it with O(1) space then it's going to
> have to be done with a whole bunch of swaps. Have a think with pen and
> paper about how you could do a sequence of swaps that would rearrange
> the order to the one that you want (it's actually a harder problem
> than it looks at first glance). This is an example of what is known as
> "transposition" and much information is available about algorithms for
> doing this in-place:
> http://en.wikipedia.org/wiki/In-place_matrix_transposition
>
>
> Oscar
>
-- 
https://mail.python.org/mailman/listinfo/python-list


ANN: Intro+Intermediate Python, San Francisco, Jul 30-31, Aug 1

2014-05-13 Thread wesley chun
Greetings!

I'll be offering another hardcore Python course this summer near the
San Francisco airport. If you're somewhat new to or have some Python
experience under your belt already but want to fill-in the holes,
this course is for you. Why take a real course when you can learn
Python online or by reading books?

Well, my goal isn't to teach Python syntax, which you can from any
teacher, live or online, or from giant books. My job is to create
great Python developers and removing the roadblocks that impede
your path to getting there. This intensive course is based on my
"Core Python" (http://corepython.com) books and is made up of 3
full days complete with lectures and several hands-on coding labs
per day. t's also a great excuse to coming to beautiful Northern
California for a summer vacation!

Groups and development teams are welcome as well as individuals. I do
more private gigs and fewer of these public courses lately, so please
come join if you can... my next public intro/intermediate course may
not be for awhile, so I'm hoping to meet some of you this time around!

Sign up soon... there's a special earlybird rate for the rest of this
month before going up to the regular rate after that. More details and
registration at http://cyberwebconsulting.com as well as in the ad:
http://goo.gl/pyJseQ

I'm no fan of spam, so I'll only send out one last reminder as the
date gets closer... say around the end of June.

Cheers,
-- Wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"A computer never does what you want... only what you tell it."
+wesley chun <http://google.com/+WesleyChun> : wescpy at gmail :
@wescpy<http://twitter.com/wescpy>
Python training & consulting : http://CyberwebConsulting.com
"Core Python" books : http://CorePython.com
Python blog: http://wescpy.blogspot.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ANN: Intro+Intermediate Python course, SF, Oct 18-20

2011-09-27 Thread wesley chun
** FINAL CALL **

http://sfbay.craigslist.org/sfc/cls/2495963854.html


-- Forwarded message --
From: wesley chun 
Date: Mon, Jul 25, 2011 at 12:32 PM
Subject: ANN: Intro+Intermediate Python course, SF, Oct 18-20

Need to get up-to-speed with Python as quickly and as in-depth as
possible? Already coding Python but still have areas of uncertainty
you need to fill? Then come join me, Wesley Chun, author of
Prentice-Hall's bestseller "Core Python" for a comprehensive
intro/intermediate course coming up this May in Northern California,
then enjoy a beautiful Fall weekend afterwards in San Francisco, the
beautiful city by the bay.

Please pass on this note to whomever you think may be interested. I
look forward to meeting you and your colleagues! Feel free to pass
around the PDF flyer linked down below. Write if you have questions.

Since I hate spam, I'll only send out one reminder as the date gets
closer.

(Comprehensive) Intro+Intermediate Python
Tue-Thu, 2011 Oct 18-20, 9am-5pm

Hope to meet you soon!
-Wesley

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(COMPREHENSIVE) INTRO+INTERMEDIATE PYTHON

Although this course may appear to those new to Python, it is also
perfect for those who have tinkered with it and want to "fill in the
gaps" and/or want to get more in-depth formal training.  It combines
the best of both an introduction to the language as well as a "Python
Internals" training course.

We will immerse you in the world of Python in only a few days, showing
you more than just its syntax (which you don't really need a book to
learn, right?). Knowing more about how Python works under the covers,
including the relationship between data objects and memory management,
will make you a much more effective Python programmer coming out of
the gate. 3 hands-on labs each day will help hammer the concepts home.

Come find out why Google, Yahoo!, Disney, ILM/LucasFilm, VMware,
NASA, Ubuntu, YouTube, and Red Hat all use Python. Users supporting or
jumping to Plone, Zope, TurboGears, Pylons, Django, Google App Engine,
Jython, IronPython, and Mailman will also benefit!

PREVIEW 1: you will find (and can download) a video clip of a
class session recorded live to get an idea of my lecture style and
the interactive classroom environment (as well as sign-up) at:

http://cyberwebconsulting.com

PREVIEW 2: Partnering with O'Reilly and Pearson, Safari Books
Online has asked me to deliver a 1-hour webcast a couple of years ago
called "What is Python?". This was an online seminar based on a
session that I've delivered at numerous conferences in the past. It
will give you an idea of lecture style as well as an overview of the
material
covered in the course.

info:http://www.safaribooksonline.com/events/WhatIsPython.html
download (reg req'd):
http://www.safaribooksonline.com/Corporate/DownloadAndResources/webcastInfo.php?page=WhatIsPython
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

WHERE: near the San Francisco Airport (SFO/San Bruno), CA, USA

WEB:   http://cyberwebconsulting.com

FLYER: http://cyberwebconsulting.com/flyerPP1.pdf

LOCALS: easy freeway (101/280/380) with lots of parking plus public
transit (BART and CalTrain) access via the San Bruno stations, easily
accessible from all parts of the Bay Area

VISITORS: free shuttle to/from the airport, free high-speed internet,
free breakfast and regular evening receptions; fully-equipped suites

See website for costs, venue info, and registration. There is a
significant discounts available for full-time students, secondary
teachers, and others.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
"Python Fundamentals", Prentice Hall, (c)2009
http://corepython.com

wesley.chun : wescpy-gmail.com : @wescpy
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


LinuxJournal Readers' Choice Awards 2011 Best {Programming, Scripting} Language

2011-12-04 Thread wesley chun
in recent news...

Python wins LinuxJournal's Readers' Choice Awards 2011 as Best
Programming Language:
http://www.linuxjournal.com/slideshow/readers-choice-2011?page=27

yee-haw!! it's even more amazing that Python has won this title 3
straight years. let's celebrate and get back to building great things.

wait, in other news...

Python wins LinuxJournal's Readers' Choice Awards 2011 as Best
Scripting Language:
http://www.linuxjournal.com/slideshow/readers-choice-2011?page=28

interestingly enough, this happened last year as well:
http://www.linuxjournal.com/content/readers-choice-awards-2010

in fact, Python has nearly won this one 6 straight years, from
2006-2011, except bash won in 2009. is it the same people who are
voting (practically) every year? :-)

cheers,
--wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python", Prentice Hall, (c)2007,2001
"Python Fundamentals", Prentice Hall, (c)2009
    http://corepython.com

wesley.chun : wescpy-gmail.com : @wescpy
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [OT] Book authoring

2012-01-03 Thread wesley chun
fwiw, i've given a related talk a couple of times on this subject, the
most recent of which was at EuroPython this summer:
http://ep2011.europython.eu/conference/talks/writing-books-using-python-open-source-software

the content includes a couple of the tools mentioned in this thread as
well as some author case studies. slide deck's available there too.

cheers,
--wesley


On Dec 9 2011, 7:43 am, Nick Dokos  wrote:
> Grant Edwards  wrote:
> > On 2011-12-09, Miki Tebeka  wrote:
> > > Greetings,
>
> > > Any recommendations for abook authoringsystem that supports the following:
> > > 1. Code examples (with syntax highlighting and line numbers)
> > > 2. Output HTML, PDF, ePub ...
> > > 3. Automatic TOC and index
> > > 4. Search (in HTML) - this is a "nice to have"
>
> >http://en.wikipedia.org/wiki/Lightweight_markup_language
>
> > I've used asciidoc extensively and reStructuredText a little. Asciidoc
> > will produce all the formats you mentioned (though I've only refularly
> > used HTML and PDF). reStructuredText is what's used for Python docs
> > isn't it?
>
> > > Can I somehow use Sphinx?
>
> > Don't know what Sphinx is.
>
> I think Sphinx is used for the python docs: it sits atop rST and does
> all the transformations/processing to produce the desired output
> (http://sphinx.pocoo.org)
>
> > And there's always the old stand-by LaTeX, but it's a bit more
> > heavyweight with more of a learning curve.  OTOH, it does produce
> > text-book quality output.
>
> There is also orgmode, which has been used for a few books
> (http://orgmode.org). I know it does HTML and PDF (the latter through
> latex), but I'm not sure about ePub: ISTR somebody actually did ePub for
> his book but I don't remember details. The indexing is manual:
> add #+index: foo entries as required.  But in general, imo, automatic
> indexing for books sucks raw eggs (it works much better for highly
> regular source code like the python source base).
>
> Nick


-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python", Prentice Hall, (c)2007,2001
"Python Fundamentals", Prentice Hall, (c)2009
    http://corepython.com

wesley.chun : wescpy-gmail.com : @wescpy/+wescpy
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


stderr, stdout, and errno 24

2006-07-12 Thread Wesley Henwood
To capture output from python scripts run from a C++ app I've added the
following code at the beggening of the C++ app:

PyRun_SimpleString("import grabber");
PyRun_SimpleString("import sys");
PyRun_SimpleString("class a:\n\tdef
write(self,s):\n\t\tograbber.grab(s)\n");
PyRun_SimpleString("import sys\nsys.stderr=a()\nsys.stdout=a()");

Its hard to read that way, here's what it expands to:
import grabber
import sys
class a:
def write(self, s)
grabber.grab(s)

grabber is a C++ extension, the grab function prints displays the
captured text in a Windows app.  After running about 450+ scripts in a
row, I get "IOError Errno 24 Too many open files."

I've searched this group and the net and determined that stderr and
stdout may open files, is that correct?  If so would each running of a
script be opening new files related to stderr and stdout and not
closing them?  I'm just guessing.

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


Re: stderr, stdout, and errno 24

2006-07-13 Thread Wesley Henwood
I've checked and double checked my code and I am closing all files
explicitly after opening them.  The only possibliy I can think of is
Python opening files each time I run a script, or each time imput to
stderr or stdout is redirected.

Here's a link that is perhaps related to my
problem:

Here is a thread in this group, see post by
alisonken1:

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


Re: function v. method

2006-07-25 Thread Wesley Brooks
(Apollogies to fuzzylollipop for replying to them rather than the list!) Python does have ALREADY have an OFFICAL mechanism for private members,
prefix your names with _ or __. Both are ommited from autogenerateddocuementation and both are OFFICALLY not supposed to be used.Could you elaborate on that a little or point me in the right
direction to read up on it? I'm currently re-writing a large lump of my
coding and trying to use best practice. I thought it was considered
good practice to make stuff private (in this case using __ ) that
wasn't intened to be accessed from outside the function/class?
Cheers for your help.Wesley Brooks.
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: first book about python

2006-08-01 Thread wesley chun
gene tani wrote:
> IOANNIS MANOLOUDIS wrote:
> > I want to learn python.
> > I plan to buy a book. I always find printed material more convenient than
> > reading on-line tutorials.
> > I don't know PERL or any other scripting language. I only know some BASH
> > programming. I am looking for a book which will help me get started and
> > should contain the foundations. I am not looking for the Python bible.
> > Any recommendations?
> > Ioannis
>
> Printed: Magnus Hetland's latest book, the Wrox book and OReilly
> Learning Python are all good.  Chun's "Core Python" will be updated and
> released soon, that will be good too.


thanks for the plug.  the book has indeed been fully updated plus a
few brand new chapters as well... release date's about the 1st-2nd
week of Sep 2006.

"Core Python" target audience is comprised of those who know how to
program in any other high-level language, i.e., C/C++, Java, Perl,
Tcl/Tk, PHP, etc., who want to learn Python as quickly and as
comprehensively as possible, then be introduced to a variety of
specialized topics with which to continue to develop your Python
skills with.  it is not the bible, as that would be the docs that
already come with Python.

i'd say it's about 40% beginner, 40% intermediate/advanced, and 20%
reference. if you're looking for a pure reference, check out Beazley's
PER or Martelli's Nutshell. if you're absolutely new to programming,
check out Dawson's Absolute Beginner or Downey/Eklner's How to Think
like a Computer Scientist.  if you want a large case study (tons of
examples, i.e., everything *plus* the kitchen sink), look for Lutz'
massive Programming Python.

if you only know shell scripting, you should still be able to pick up
much of the material in Core Python, esp. if you have done looping
and/or conditionals in the shell language.  it is a large book and is
pretty comprehensive though, so if you're looking for a lighter intro,
the books gene's suggested should work -- i would also add Dive into
Python to that group.  if possible, try to find sample chapters from
any book you're interested in before buying to make sure that it will
suit your needs.

when you start delving into Python, come over to the Python Tutor
mailing list.  if you have a question that no book seems to be able to
answer or seems to be taking forever to look up, you'll find that you
can get just about any answer from the helpful tutors on that list.

yiassoo!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: first book about python

2006-08-02 Thread wesley chun
(double feature)

> From: "Ray" <[EMAIL PROTECTED]>
> Date: Tues, Aug 1 2006 2:10 am
>
> Hi Wesley, which edition of Python will your latest Core Python cover?
> Will it cover 2.5?

ray: thanks for asking.  one of my goals for the book is to really cover
the *core* parts of the language, meaning that, like Python, i try to keep
it version independent.  if you write an app using 2.3, it should pretty much
run unmodified in 2.4, etc. in other words, regardless of which Python
release you use, the book will have relevant material.  it is not too often
that something about the core part of the language changes enough to
make a significant impact on the applications that people write.

with that said, i can tell you that the book has been updated to 2.5, as
well as includes some features already set for 2.6 and 2.7, and also
presumably 3.0.  in the book, we've placed markers or logos that *tag*
when an important feature was added to Python, so if you're still using
2.4 say, you can skip over stuff from newer versions, or at least read
about them so that you know what's possible if you migrate.

so far, the book has been pretty well received after speaking with some
(OSCON) conference attendees who saw the rough draft last week at
the convention bookstore.

hope this helps!
-wesley


> From: John Salerno <[EMAIL PROTECTED]>
> Date: Tues, Aug 1 2006 6:48 am
>
> wesley chun wrote:
>> if you want a large case study (tons of
>> examples, i.e., everything *plus* the kitchen sink), look for Lutz'
>> massive Programming Python.
>
> which is also coming out in a new edition soon.

i believe that mark's book will be released around the same time
as Aahz' Python for Dummies (another possible first book for
newbies), and Core Python will come around several weeks later
-- i know is that we are hitting the printers sometime this week,
followed by the binding, distribution, shipping, etc.

once the publisher or amazon has some sample text, i'll be glad
to share it with you.  there is a sample chapter from the 1st ed at
the book's website (link below) if you want to get a taste of my
writing style -- that hasn't changed between editions.  ;-)

cheers,
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How do I put % in a format sting?

2006-10-05 Thread wesley chun
as fredrik and others have mentioned, '%%' in a format string gives
you the single '%' in the string as desired.

however, in your specific application (database), it's best to avoid
using Python's string formatting unless that is the default provided
by your database adapter for the reasons that carsten mentioned,
namely the possibility of a SQL injection attack.  when dealing with
databases, it's always safest to let the adapter code format your
string for you.

good luck!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: building strings from variables

2006-10-05 Thread wesley chun
> Following a discussion with an associate at work about various ways to
build strings from variables in python, I'd like to hear your opinions
and preferred methods.


from the performance standpoint, i believe that #4 (list join) from
scott is the fastest. #1 (string formatting) is next preferred only
because #3 (string concat) is the worst [think "realloc()"].  #2 is
useful for when you have users who aren't as comfortable with #1.

however, #3 is good for real newbies or those coming from other
languages since conceptually, it's the easiest to comprehend. bottom
line is that it depends on your requirements.

i'm constantly thinking performance, so that's why i answered in the
manner above.

hope this helps!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: Advanced Python training course, Nov 8-10, San Francisco

2006-10-11 Thread wesley chun
FINAL REMINDER... we still have some seats left!

What:  Advanced Python Programming
When:  Nov 8-10 2006
Where: San Francisco (SFO/San Bruno), CA, USA

http://cyberwebconsulting.com (click on "Python Training")

This course, meant to follow our in-depth introduction class, adds new
tools to the Python programmer's toolkit. We explore advanced topics
such as: network programming with sockets, Internet clients, GUI
development, Web/CGI, databases/SQL, Extending Python with C, threads,
etc. Lectures and lab will get attendees comfortable developing
applications in these areas.

Come join us in beautiful Northern California for another rigorous
Python training event taught by software engineer, "Core Python
Programming" author, and technical instructor, Wesley Chun. This
course will take place in San Bruno right near the San Francisco
International Airport at the:

Staybridge Suites
San Francisco Airport
1350 Huntington Ave
San Bruno, CA  94066 USA
+1-650-588-0770

LOCALS: accessible from the entire Bay Area: parking + easy
101/280/380 access, across the street from San Bruno BART and up the
street from San Bruno CalTrain stations

VISITORS: free shuttle to/from the airport, lots of free food and wireless

The cost is $1295 per attendee. Discounts available. For more
information and registration, go to the website above.

2007 CALENDAR: Feb 7-9 (Intro), May 16-18 (Advanced), Aug 20-22 (Intro)

hope to see you in class!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Adding Worksheets to an Excel Workbook

2006-10-11 Thread wesley chun
> From: [EMAIL PROTECTED]
> Date: Tues, Oct 10 2006 2:08 pm
>
> I'm a Python newbie, and I'm just getting to the wonders of COM
> programming.


welcome to Python!!  i too, have (recently) been interested in COM
programming, so much so that i added some material on Microsoft Office
(Win32 COM Client) Programming to the 2nd ed of my book, "Core Python
Programming" (see link below).  it's only introductory material, but i
think you may find it useful as i have, and shows you how to create
simple applications for Excel, Word, PowerPoint, and Outlook.

in addition to greg's code snippet, here's a snippet based on one from
the book (the code is under a CC license) -- it doesn't add a new
sheet, but does let you grab the "active" one (the one that is tabbed
and facing the user):

# based on excel.pyw in Core Python Programming, 2nd ed

from time import sleep
import win32com.client as win32

def excel():
xl = win32.gencache.EnsureDispatch('Excel.Application')
ss = xl.Workbooks.Add() # add a new spreadsheet/workbook
sh = ss.ActiveSheet  # grab the active sheet of the workbook
xl.Visible = True# make Excel show up on the desktop
sleep(1)

sh.Cells(1,1).Value = 'Python-to-Excel Demo'
sleep(1)
for i in range(3, 8):
sh.Cells(i,1).Value = 'Line %d' % i
sleep(1)
sh.Cells(i+2,1).Value = "Th-th-th-that's all folks!"

sleep(5)
ss.Close(False) # close the workbook and don't save
xl.Application.Quit() # quit Excel

if __name__=='__main__':
excel()

hope this helps!
-wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Adding Worksheets to an Excel Workbook

2006-10-11 Thread wesley chun
> just a small OT question coming from a linux openoffice
> system...
>
> Does there exist something similar for powerpoint? Would be
> nice, if anybody can direct me to more examples...


fabian,

see below for a PP example.  you mentioned you were coming from a
linux OOo system... are you trying to do COM stuff with OOo?  i'm not
familiar with it, but since they do support
some level of VB-like scripting, i don't believe it's out of the question.

one thing that i did forget to mention in my earlier message is that i
use static dispatch for these apps.  if you did not go and run the
makepy utility, you would have to use dynamic dispatch, start your
apps with win32com.client.Dispatch(), or, using the same import
statement as below, win32.Dispatch().

anyway, here is pretty much the same script as i sent earlier but for
PowerPoint instead of Excel (the book has small examples for each of
Excel, Word, PowerPoint, and Outlook):

# based on ppoint.pyw in Core Python Programming, 2nd ed

from time import sleep
import win32com.client as win32

def ppoint():
ppoint = win32.gencache.EnsureDispatch('PowerPoint.Application')
pres = ppoint.Presentations.Add()
ppoint.Visible = True

s1 = pres.Slides.Add(1, win32.constants.ppLayoutText)
sleep(1)
s1a = s1.Shapes[0].TextFrame.TextRange
s1a.Text = 'Python-to-PowerPoint Demo'
sleep(1)
s1b = s1.Shapes[1].TextFrame.TextRange
for i in range(3, 8):
s1b.InsertAfter("Line %d\r\n" % i)
sleep(1)
s1b.InsertAfter("\r\nTh-th-th-that's all folks!")

sleep(5)
pres.Close()
ppoint.Quit()

if __name__=='__main__':
ppoint()

HTH!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: BayPIGgies, Oct 12, 7:30pm, Google, Mtn View

2006-10-12 Thread wesley chun
Final REMINDER:

Tonight, the Silicon Valley/San Francisco Bay Area Python users group
meets at Google in Mountain View from 7:30-9p.

the featured speaker is Alex Martelli, author of O'Reilly's Python in
a Nutshell and editor of the Python Cookbook(s).  the topic is Python
2.5.

for more info and directions, see http://baypiggies.net

for information on meeting for dinner before the meeting (6pm):
http://mail.python.org/pipermail/baypiggies/2006-October/001228.html

hope to see you there!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Adding Worksheets to an Excel Workbook

2006-10-18 Thread wesley chun
> From: Tom Plunket
> Date: Tues, Oct 17 2006 6:34 pm
>
> You've got a lot of sleep calls in there- did you find that things
> behaved erratically without them?  I haven't done any Office
> automation with Python, but my DevStudio stuff has always worked a
> treat without the sleep calls.


sorry, i forgot to explain this in my previous post. the sleep()s are
not required and are used purely for demonstration purposes, to slow
things down so that you can see things happen live in the application.
 it's no fun if Excel opens and everything is already there!

cheers,
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Observation on "Core Python Programming"

2006-10-30 Thread wesley chun
(warning: LONG reply)

thanks to those above for the kind remarks.  tackling comments
and questions, not quite in chronological order.  :-)


> Who would you say the book is aimed at? Advanced programmers?

this book is targeted towards technical professionals already
literate in another high-level language who wants to pick up
Python as quickly as possible.  it is not a topical coverage
of a programming language's features.  you know how after
learning a new language, it takes a few months to really "feel
comfortable" enough to *not* pick up a book in order to commence
writing code?  my goal is to reduce that time period while
provide the reader a comprehensive understanding of how the
standard types work, esp. in their relationship to Python's
memory model.  it is my belief that a solid foundation here
will reduce or eliminate any potential bugs you would've
written had you read a more conventional introductory text.


> What really jumped out at me is an interesting feature about how
> it sequences its topics, namely, (user-defined) functions are not
> introduced until chapter 11, fully 400 pages into the book.

i guess i found this post quite interesting because there is
such a focus on "what should be introduced when."  the purpose
of chapter 2 (getting started) is to proxy for the standard
"introduction to programming X" book.  if you read it, you
should be able to "get started in Python" immediately. you
have enough info on functions to start coding and probably
don't need var args, decorators, or any of that stuff yet. the
chapter on functions occur later because most of the time, what
we've shown you in "getting started" is enough to, ummm..., get
you started, and that all successive chapters are meant to dive
more deeply into each area.


> seems to confirm the "batteries are included" philosophy of
> Python. Perhaps there is less need to learn how to roll your
> own batteries as soon as possible.

this is definitely one of the hallmarks of the language. the
current user base already knows this... it's just more difficult
to get this out there to the general programming populus, esp.
when there are already so many languages starting with "P".  :-)


> The revenge of lambdas. Will they stay or will they go?"  ;-)

they will stay.  ;-)


> am interested in seeing the extend to which Python is genuinely
> "multi-paradigm" - able to blend the functional and imperative
> (and OO) paradigms together.

this comes from guido himself.  he "wants you to be able to see
the forest through the trees."  i see Python as a "greatest hits"
of many computer programming languages.  for our benefit, he's
given us the best stuff.


> I cant' exactly figure out why yet, but he has a way of explaining
> something, like, say, decorators, that in minimal words elucidates
> for me the intent behind why they are useful. That helps me
> understand how they work.

"Python fits your brain." (bruce eckel) i don't see why python
should have a monopoly on your brain.  i want me share too.  ;-)
the thing that makes writing a pleasurable is when the language
has so much to offer.  i use this book in teaching my python
courses, and the book mirrors my lecturing style.  i suppose that
rather than a dry college textbook, i'd rather write in a way as
if i was having a conversation with you, or if you were actually
sitting there attending one of my courses.  readers (as well as
course attendees) have remarked how questions they may come up
with as they are learning a topic are answered in the next section
or chapter (or 3-4 presentation slides) as the case may be.


> The second edition site doesn't give a sample chapter (but
> does give the complete preface)

ahhh, the secret here is that you need to look in the right place.
"prentice hall"s web page doesn't have it, but PHPTR's does, even
if they are the same publishing house.  for some reason, we've got
the featured book of the month!!  just go to http://phptr.com and
click the book's link there. you'll find:

- book's description
- table of contents
- preface
- sample chapter (getting started, chapter 2!)
- index

the last three are in PDF format.  if for some reason, october
ends and it's gone from the front page, here is a direct link:

http://phptr.com/title/0132269937

thanks to everyone for their support, esp. my excellent technical
reviewers for keeping me honest!  please send comments, suggestions,
corrections, and other feedback to me. i am happy to hear about any
issues you find in the book -- everything.  it doesn't matter if it
is the smallest grammatical edit, errors in the code, or just plain
wrong or misleading information.  don't believe everything you read!
(somet

Re: opening excel

2006-11-09 Thread wesley chun
> has anybody got any experience opening and manilpulating excel
> spreedsheets via python? it seems pythoncom allows this to happen


i posted a couple of snippets along with others in this earlier thread:

http://groups.google.com/group/comp.lang.python/browse_thread/thread/a7ed60067ca5a8d4

the XLRD package is a platform-independent non-COM way to *extract*
Excel data. you mentioned opening and manipulating spreadsheets
*using* COM, so there are more examples targeted towards what you were
asking for at that link.

i added a small section on Win32 COM client programming to the Core
Python book, and although it doesn't go extremely in-depth, it's
perfectly targeted to "newbs" coming from the Unix world, as was i.

hope this helps!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: BayPIGgies, Thu Nov 9 @ 7:30p, Air Traffic Control

2006-11-09 Thread wesley chun
the silicon valley-san francisco bay area python users group meets at
the Googleplex once a month in mountain view, CA.
more info and directions available at http://baypiggies.net


-- Forwarded message --
From: Dennis Reinhardt
Date: Nov 2, 2006 9:03 PM
To: Python <[EMAIL PROTECTED]>

Thursday Nov. 9, 2006

7:30-8:50 p.m.   Technical Program

Title  Python for Prototyping in Air Traffic Control
Presenter  Russ Paielli (NASA Ames Research)
About the talk The talk will start with a high-level overview of the US air
traffic control system, then it will focus on tactical (i.e., short range)
conflict alerting and describe the prototype software that we are
developing to replace the legacy software that currently performs that
function. Examples of actual "operational errors" will be presented, and
the alerting performance of our system will be tested and compared with the
legacy system. The rationale for using Python for the prototype and its
testing will be briefly discussed.

8:50 p.m-...Mapping and Random Access
--
Mapping Moderator  Dennis Reinhardt (DAIR Computer Systems)
Mapping is a rapid-fire audience announcement open to all of topic headings
(one speaker at a time). Random Access session (everyone breaks up into
self-organized small-group discussion) follows immediately after Mapping.
-- 
http://mail.python.org/mailman/listinfo/python-list


import chains

2006-06-27 Thread Wesley Henwood
I have a program which uses a combination of MFC multithreading, python
multithreading, and extended and embedded python.

This works:
>From the C++ app, call python script A within a MFC thread.  Script A
imports module 2 which imports module 3.  Module 3 is a c++ extension,
the code for which is within in C++ app.

This does not:
Everthing the same, only Script A imports module 1 which imports module
2 which imports module 3. I get very strange behavior - the script
thread seems to give an exit code and yet still be running.  When the
thread exists for sure I get another exit signal. In short, it is
exibiting unpredictable behavior.

It seems that it can handle the double import.  But the triple import
is too much.  However no error messages are produced.

I have scanned comp.lang.python and the net and there are many posts
about nesting/import problems.  They all deal with slighly different
cases but I think they are perhaps related.  Is this basically the same
issue?

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


Re: Colorado Python seminar in November

2006-09-14 Thread wesley chun
in parallel to Mark's week-long Python seminar (Nov 6-10), we are
offering an alternative session focusing only on advanced topics. it is
3-days long (Nov 8-10) and will be held in San Francisco.

course description:
http://roadkill.com/~wesc/cyberweb/pp2dsc.html

general information:
http://cyberwebconsulting.com (click "Python training" link)

november sure seems like "back to school" month for those in the Python
community, and these are two great ways to develop, polish, and hone
your Python skills!

cheers,
-wesley

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com

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


Re: Timeline for Python?

2006-09-23 Thread wesley chun
> In article <[EMAIL PROTECTED]>,
>> crystalattice <[EMAIL PROTECTED]> wrote:
>>
>>> From: "Sebastian Bassi" <[EMAIL PROTECTED]>
>>> Date: Thurs, Aug 31 2006 7:51 am
>>> Subject: Re: Timeline for Python?
>>> Groups: comp.lang.python
>>>
>>> I am working on a Python book, since it could be completed in about a
>>> year (writing time + edition + publishing) or more, I would like to
>>> know what version to target since I don't want to release a book that
>>> will be outdated just after is printed.
>>>   :
>>> So, if the book is published in October 2007, should feature Python 3
>>> or Python 2.5?
> >
> >I'd write for 2.4, even though 2.5 should be coming out "shortly".
> >There aren't many significant changes to the whole language between 2.4
> >and 2.5.  Probably the best thing is write for 2.4 and have a sidenote
> >stating where 2.5 operates differently.
>
> Speaking as the co-author of _Python for Dummies_:
>
> That's bad advice -- there are three Python books already out (or out
> within the next couple of weeks) that target 2.5: _Python in a Nutshell_,
> _Core Python_, and _Python for Dummies_.
>   :
> OTOH, I do agree that any book written should include diferences between
> 2.5 and earlier versions for the benefit of people needing to target
> earlier or multiple versions.


sorry to chime in 2 weeks late here, but i second aahz's opinion here,
as well as have some thoughts of my own:

1. never write against older versions of Python... you will only
obsolete your book even faster (well, "sooner")

2. with respect to 2.4 vs. 2.5, there are some significant changes
as aahz has pointed out; otherwise it would be 2.4.4.

3. personally speaking, i'm against targeting versions altogether.
i guess i am a bit biased because in "Core Python Programming",
the focus is the "core" part of the Python language, hence it
should be as generic to specific versions as possible. i've
made serious attempts to avoid being locked-in to any particular
release. yes, i cover through 2.5, but also include stuff that have
already been slated for 2.6 and 2.7.  what, if you can discuss, is
the topic of *your* book?

4. with that said, i have taken aahz's final remark above quite
seriously... i've gone to great lengths to add "tags" all over
Core Python which state things like, "2.2", "2.5-2.7", "2.0", etc.
to indicate when certain features were added, removed, or changed
in the language.  this will support readers who are users of "any"
version of Python.

and with a sigh of relief, i can happily tell everyone that Core
Python did finally hit the streets this week!  (more info at the link
below)

cheers,
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Help

2006-09-23 Thread wesley chun
> From: "Rrajal" <[EMAIL PROTECTED]>
> Date: Mon, Sep 18 2006 9:50 am
> Subject: Re: Help
> Groups: comp.lang.python
>
> Hi there, I am new in this subject so could you please tell
> me from  where I can get help (or good e-book) of python?


do you have some kind of programming background? if so,
good intro books include Hetland's "Beginning Python",
Pilgrim's "Dive into Python", and O'Reilly's "Learning Python".
there is an online version of Dive at http://diveintopython.org
if you're looking for something more comprehensive, i wrote
"Core Python Programming", but it is much longer than the
others, so if you want a quick intro, it would not be for you.

here's a nice list and description of most Python books:
http://wiki.python.org/moin/PythonBooks

for those are are new to programming altogether, you can
try Dawson's "Absolute Beginner" or the "Learn to Program"
by Gauld, but since it's dated, it's best to check out Alan's
tutorial at:http://www.freenetpages.co.uk/hp/alan.gauld/

cheers!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Timeline for Python?

2006-09-25 Thread wesley chun
> From: Fredrik Lundh <[EMAIL PROTECTED]>
> Date: Sat, Sep 23 2006 12:03 pm
>
>> i cover through 2.5, but also include stuff that have
>> already been slated for 2.6 and 2.7.
>
> and what would that be?  target versions in the PEP:s are usually just
> wild guesses...


true, and it's obviously a *bad* idea to be wrong.
i don't have easy access to where in the manuscript
i've made such annotations, however, there are some
minor things which i'm reasonably sure will be in 2.6:

- 'as' becomes a keyword
- catching of string exceptions generates a warning (in 2.5, raising
of string exceptions generates a warning)
- the 'with' statement, introduced under __future__ in 2.5, becomes standard
- intra-package imports not using the relative import syntax will
generate a warning

i'm sure all you dev folks will let me know where
i've hung myself.  i can always make an errata
correction on the book's website as with any other
problems that people find.

however, the main point of my reply is really that
i've tried hard to make the book to be as version-
independent as much as possible.  the added bonus
is for those who *are* locked into specific (pre-
sumably older) versions to know about features that
were added to, altered in, or removed from Python
and for which releases those updates were first
introduced to the public.

cheers,
-wesley

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: does anybody earn a living programming in python?

2006-09-26 Thread wesley chun
since 1997, i've been pretty much working full-time in Python:
- at yahoo, we developed yahoo!mail in python (and some C++)
- at synarc, i wrote software for doctors in python (and some C)
- at ironport, most everything is in python (and some C, PyRex). we
have a million lines in python (http://www.python.org/about/quotes/)

for the forseeable future, i plan on keeping it this way. i took a
contract which led me back to C, but as i was doing this, most of the
time i felt like i was "wasting my time," e.g., char **x =
(char**)malloc(...)... *x++ = (char*)malloc(...) ... free()...
free()... (segmentation fault)... bus error... gdb... blah blah, led
to thoughts such as, "i have better things to do with my time," "when
does this contract end?", etc. it did, however, make me more
appreciative of the C code which comprises the Python interpreter. i
sense that because i had done that (C) before and realized how Python
makes me more efficient, that i've become "spoiled" by it and am more
picky about my opportunities... anyone else feel the same way? I saw
the +1 from Aahz already.  ;-)

however, i can understand the original posters inquiry... you just
don't see too many FT positions offered that list Python as the sole
or major development language. i'm sure folks on the list either get
"found" by companies that need Python skills, or, we want to keep
those jobs to ourselves and spend time hacking sites to remove those
listings. :-)

it is also worthy to note that in general, the number of job listings
which have the word "Python" in them have risen steadily over the past
few years.  i guess the "secret" is getting out. just subscribing to
dice and monster have let me see this growth on a weekly basis.  if
you're lucky, one or two of the listings in these weekly lists will
contain positions that are pretty much Python-only.

cheers,
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Surprise using the 'is' operator

2006-09-26 Thread wesley chun
as a side note, the ints that are cached (for current versions of
Python) are in range(-1, 100)... is this documented somewhere? i know
it's subject to change.  and as already mentioned, you probably
wouldn't use "is" this way in real code... i know you are just
reinforcing your learning of the difference between object *value*
comparison vs. object *identity* comparison. what you've discovered,
however, is important in learning Python... i have material in my
intro course and the book dedicated to this subject.

cheers,
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Surprise using the 'is' operator

2006-09-26 Thread wesley chun
> "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> > as a side note, the ints that are cached (for current versions of
> > Python) are in range(-1, 100)... is this documented somewhere?
> Not true for at least 2.4 and 2.5.  The cached range has expanded

oops, apologies to all... it really *is* subject to change. ;-) it's
now range(-5, 257).

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


Re: does anybody earn a living programming in python?

2006-09-27 Thread wesley chun
> From: "OKB (not okblacke)" <[EMAIL PROTECTED]>
> Date: Wed, 27 Sep 2006 04:04:02 GMT
>
>> - at yahoo, we developed yahoo!mail in python (and some C++)
>> - at synarc, i wrote software for doctors in python (and some C)
>> - at ironport, most everything is in python (and some C, PyRex)
>
>   This is interesting to me in that all these jobs also involve C.
> I'm not the original poster, but I'd be interested to hear about people
> who make a living programming Python WITHOUT knowing C.


you make a good point, however, when you have to write an extension
(performance, protect source code, library interface, etc.), you must
write it in the natively-supported language in which the
implementation of Python you're using is compiled in. for (C)Python,
it's C/C++, Java for Jython, and C#/VB.NET for IronPython.

if you have been successful at building projects completely in pure
Python, that's great, but you're limited in that you won't be able to
take advantage of the benefits of extensions or necessarily be able to
hook up to native libraries that don't already have a Python adapter
written for them. for the past employment i listed, the primary use of
C was either an extension or a library adapter. of course, i never
claimed above to have written any of that C code. ;-)

my final thought is that you cannot truly appreciate a tool like
Python until you've been in the trenches with C and done all that
stuff that is now a "waste of time."

cheers,
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python/UNO/OpenOffice?

2006-09-30 Thread wesley chun
as others have said, that project provides a working interface to OOo
(OpenOffice 2 on Ubuntu Breezy and Dapper).  i've made several posts
to this regard over the summer here on CLP.  i was mostly using it to
"mess around" with documents in StarWriter.

cheers,
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Is python memory shared between theads?

2006-12-01 Thread Wesley Henwood
So I declare a variable named A in thread1, in script1.py.  I assign
the value of 2.5 to A.  I then run script2.py in thread2.  Script2.py
assigns the value of 5.5 to a variable named A.  Now, when thread1
resums execution, I see that A = 5.5, rather than 2.5 as I expected.

Is this normal behavior?  Based on the little documentation I have been
able to find on this topic, it is normal behavior.  The only way to use
same-named variables in scripts is to have them run in a different
process, rather than different threads.

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


ANN: BayPIGgies, Thu 12/14 7:30-9p, Mtn View

2006-12-12 Thread wesley chun
reminder that we have a "lite" meeting this thursday evening at
Google.  it is a meet-n-greet event, almost a "long random access"
session where folks introduce themselves, mingle/network, discuss
common interests, and get to know one another in the community. we may
discuss any number of current topics such as Python 2.5, the upcoming
PyCon conference at Dallas at the end of Feb, the latest Python books
and reviews, future meeting coordination, etc.

more info and directions at http://baypiggies.net

pre-register here to avoid the long security lines:
http://wiki.python.org/moin/BayPiggiesGoogleMeetings

hope to see some of you there!
-wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


FYA: python cell phone is ruby-less

2006-12-21 Thread wesley chun
(mostly off-topic)

vertu makes a $310,000US cell phone which has rubies on it. i thought
it was quite interesting that they have a "cheaper" phone ($115,000)
called Python which *doesn't* have rubies:

http://money.cnn.com/popups/2006/biz2/cellphone

better order yours now since only 26 will be made.  ;-)

happy holidays everyone!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


type classobj not defined?

2007-01-03 Thread Wesley Brooks
Dear Users,

I'm in the process of adding assert statements to a large piece of
code to aid with bug hunting and came across the following issue;

Using python in a terminal window you can do the following:

>type(False) == bool
True

I would like to check that an object is a class, here's an example:

>class b:
def __init__(self):
self.c = 1
def d(self):
print self.c

>type(b)


But the following fails:

>type(b) == classobj
Traceback (most recent call last):
  File "", line 1, in ?
NameError: name 'classobj' is not defined

For the time being I'll use b.__name__ == b to ensure I'm getting the
right class. Is there a reason why the other types such as bool are
defined but classobj isn't?

I'm running the following version of python:

Python 2.4.3 (#1, Jun 13 2006, 11:46:08)
[GCC 4.1.1 20060525 (Red Hat 4.1.1-1)] on linux2

Cheers,

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


Re: Is there a way to program a robot with python (ex, an electric motor, control it's speed, etc)

2007-07-09 Thread Wesley Brooks
For a robotics project I would highly recommend the use of Phidgets,
they can supply sensors and interface kits with APIs. Not sure if
Python is fully supported yet but there certinally seems to be a
considerable effort ongoing creating an API for python. I've only used
them to date for servo control and accelorometer sencor data
collection through c++ / wxWidgets.

http://www.phidgets.com/

They offer direct motor controllers but I'll be looking to control a
7.2V motor with a 100A draw, so I'll be using the servo controller to
drive a standard Radio Control Car motor controller.

Cheers,

Wes.

On 09/07/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> En Sun, 08 Jul 2007 21:06:48 -0300, <[EMAIL PROTECTED]> escribió:
>
> > in this project, we need something that would basically function as a
> > blender. we know we'll need to buy a motor that spins, but what we're
> > having trouble with is figuring out how to program it. we want to be
> > able to control the speed of the motor. how would we accomplish this?
>
> This is mostly an electronics question. How much power? For small power
> and fine control I'd look for "stepwise motor" on any robotics book; for a
> high power "blender" I think you don't care so much about fine control. In
> any case, it's the available motor which dictates how you can control it.
>
> > i'm new to all of this, so i'm having a hard time wrapping my mind
> > around how it'd be possible to program one of those things :\
> >
> > ex: what if i want the motor to turn for 10 seconds. stop for 5. then
> > turn the other direction.
>
> You may write the GUI using python, and the high level controlling API
> too. But you may need to use a PIC or some kind of controller, listening
> for commands from the PC and acting over the motor accordingly.
>
> Picasso: a Python-controlled robot for doing paintings
> http://youtube.com/watch?v=PsbKq5Kysj0
>
> --
> Gabriel Genellina
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


[ANN] Python courses this Fall

2007-08-23 Thread wesley chun
Folks, I'd like to announce my final Python courses for 2007:

Need to get up-to-speed with Python as quickly as possible? Come join
me, Wesley Chun, author of Prentice-Hall's well-received "Core Python
Programming," for another set of courses this Fall in beautiful
Northern California! This will be the final set for 2007... if you
miss these, you'll have to wait until next year. I look forward to
meeting you!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(COMPREHENSIVE) INTRODUCTION TO PYTHON: Mon-Wed, 2007 Oct 8-10

This is course is meant for those new to Python and/or want to get
more in-depth formal training. We will immerse you in the world of
Python in only a few days.  We will show you more than just its syntax
(which you don't really need a book to learn, right?). Knowing more
about how Python works under the covers, including the relationship
between data objects and memory management, will make you a much more
effective Python programmer coming out of the gate.  3 hands-on labs
each day will help hammer the concepts home.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
INTERNET PROGRAMMING WITH PYTHON: Sat, 2007 Oct 13

This 1-day course will introduce current Python programmers to 3
distinct areas of Internet programming, each in self-contained modules
with a set of lab exercises following each lecture topic:

Network Programming using Sockets -- Underneath all of today's network
protocols, i.e., HTTP, FTP, RDBMS, IM, e-mail, etc., lies the main
communication mechanism, sockets. Here, we introduce client/server
architecture and how to program sockets using Python.

Internet Client Programming -- One level above the socket layer are
well-known Internet protocols such as FTP, NNTP, POP3, and SMTP.  In
this section, we learn how to create Internet clients of these
protocols to transfer files, send and receive e-mail, and read Usenet
newsgroup postings.

Web/CGI Programming -- Yes, pure CGI is "sooo yesterday," but before
you jump on all the web framework bandwagons, it's a good idea to
learn basics and the basis of how all web servers deliver dynamic
content back to the client browser so that you can appreciate all the
work that is done on your behalf by a more fully-featured frame- work.
Time-permitting, we will also give a high-level overview of one of the
more popular Python web frameworks, Django.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

WHERE: near the San Francisco Airport (SFO/San Bruno), CA, USA

WEB:   http://cyberwebconsulting.com (click "Python Training")

LOCALS: easy freeway (101/280/380) with lots of parking plus public
transit (BART and CalTrain) access via the San Bruno stations, easily
accessible from all parts of the Bay Area

VISITORS: free shuttle to/from the airport, free high-speed internet,
free breakfast and regular evening receptions; fully-equipped suites

See website for costs, venue info, and registration.  Discounts are
available for multiple registrations as well as for teachers/students.

Hope to see you there!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [ANN] Python courses this Fall

2007-08-23 Thread wesley chun
$1295/pp for the intro course and $495/ for the 1-day course (but $395
if you take the intro course too).

http://cyberwebconsulting.com (click "Python Training") for more details

-wesley


On 8/23/07, Jeff Pang <[EMAIL PROTECTED]> wrote:
> Sounds good.How about the costs for those lessons?thanks.
>
>> WEB:   http://cyberwebconsulting.com (click "Python Training")
>> See website for costs, venue info, and registration.  Discounts are
> available for multiple registrations as well as for teachers/students.
-- 
http://mail.python.org/mailman/listinfo/python-list


  1   2   >