Python training in Colorado, January 27-30

2009-01-05 Thread Python Training
Python author and trainer Mark Lutz will be teaching a 4-day Python class on January 27-30, in Longmont, Colorado. This is a public training session open to individual enrollments, and covers the same topics and hands-on lab work as the onsite sessions that Mark teaches. The class provides an

[Announce] PyGobject 2.16.0 (stable)

2009-01-05 Thread Gian Mario Tagliaretti
I am pleased to announce version 2.16.0 of the Python bindings for GObject. The new release is available from ftp.gnome.org as and its mirrors as soon as its synced correctly: http://download.gnome.org/sources/pygobject/2.16/ What's new since PyGObject 2.15.4? -

Open Technology Group, Inc. announces Python Training

2009-01-05 Thread Chander Ganesan
MORRISVILLE, NC - (PRWEB) January 5, 2009 -- Open Technology Group, Inc. announces Python Training The Open Technology Group (OTG), a leader in the development and delivery of training solutions centered about Open Source technologies, released the latest in its set of Open Source Python

PyMC 2.0

2009-01-05 Thread Chris Fonnesbeck
Hello everyone, It gives me great pleasure to be able to announce the long-awaited release of PyMC 2.0. Platform-specific installers have been uploaded to the Google Code page (Mac OSX) and the Python Package Index (all other platforms), along with the new user's guide (http://

Re: Code coverage to Python code

2009-01-05 Thread Kay Schluehr
On 4 Jan., 12:35, Hussein B hubaghd...@gmail.com wrote: Hey, What is the best code coverage tool available for Python? Thanks. It depends. What are your requirements? -- http://mail.python.org/mailman/listinfo/python-list

Re: AttributeError: 'tuple' object has no attribute 'lstrip'

2009-01-05 Thread John Machin
On Jan 5, 6:15 pm, Gilles Ganault nos...@nospam.com wrote: Hello         I successfully use the email package to send e-mail from Python scripts, but this script fails when I fetch addresses from an SQLite database where data is Unicode-encoded: == from email.MIMEText import MIMEText

Re: why cannot assign to function call

2009-01-05 Thread Erik Max Francis
Derek Martin wrote: On Sun, Jan 04, 2009 at 09:30:20PM -0500, Steve Holden wrote: I'm going to go out on a limb and assert that there's NO POSSIBLE WAY a student could intuit Python's variable assignment behavior, having never been exposed to that same behavior prior. It needs to be taught.

Re: why cannot assign to function call

2009-01-05 Thread Steven D'Aprano
On Sun, 04 Jan 2009 20:03:11 -0600, Derek Martin wrote: I am happily ignorant of C#. As for Java, take the following code: a = 6; a = 5; In Python, when you execute the equivalent code, it causes two different objects to spring into existence, the first of which may be cleaned up

Tkinter - problem closing window

2009-01-05 Thread Djames Suhanko
Hello! I'm sorry my terrible english (my native language is portuguese). I has a litle program that open another window. When I close de root window in quit button, I need clicking 2 times to close. is where the problem? The source: 1 #!/usr/bin/env python 2 from Tkinter import * 3 import

Re: Tkinter - problem closing window

2009-01-05 Thread Peter Otten
Djames Suhanko wrote: Hello! I'm sorry my terrible english (my native language is portuguese). I has a litle program that open another window. When I close de root window in quit button, I need clicking 2 times to close. is where the problem? The source: 1 #!/usr/bin/env python 2

Re: My last working day of 2007

2009-01-05 Thread skip
Jack It's simple, a small program running on background, logging the Jack title of foreground window. A python script parses the log file Jack and then generates chart by matplotlib. Jack I just want to get suggestions to improve it, or know the news Jack that somebody had

Python return values

2009-01-05 Thread koranthala
I have a newbie doubt about Python return values. In (say) C/C++, if we try to return a value which is stored inside the procedure stack, we will get an error when trying to access it outside of that procedure. For example: function foo(): dcl y int dcl x pointer to int pointing to y

Re: reflection as in Java: how to create an instance from a classname

2009-01-05 Thread Bruno Desthuilliers
guss a écrit : I cannot find a satisfying answer to this question on the web so let's try here. My problem is the following, I would like to instantiate some object from a configuration file that would contain class names like for example classname=org.common.resource.MyResource. Here my

Re: Tkinter - problem closing window

2009-01-05 Thread Roger
On Jan 5, 11:52 am, Collin D collin.da...@gmail.com wrote: On Jan 5, 6:25 am, Djames Suhanko djames.suha...@gmail.com wrote: Hello! I'm sorry my terrible english (my native language is portuguese). I has a litle program that open another window. When I close de root window in quit

Re: Python callback functions and static methods

2009-01-05 Thread MRAB
Joris wrote: Hello, I'm trying to implement callback functionality in a static class. I have a feeling that I'm doing something against the Python philosophy and not some programming error but any help would be appreciated. First, a piece of proof-of-concept-code: * class Data:

Re: Python callback functions and static methods

2009-01-05 Thread Chris Rebert
On Mon, Jan 5, 2009 at 9:00 AM, Joris djm...@gmail.com wrote: Hello, I'm trying to implement callback functionality in a static class. I have a feeling that I'm doing something against the Python philosophy and not some programming error but any help would be appreciated. First, a piece of

Re: reflection as in Java: how to create an instance from a classname

2009-01-05 Thread Quentin Gallet-Gilles
On Mon, Jan 5, 2009 at 5:34 PM, Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid wrote: guss a écrit : I cannot find a satisfying answer to this question on the web so let's try here. My problem is the following, I would like to instantiate some object from a configuration

My last working day of 2007

2009-01-05 Thread Jack.Chu
Hello guys: I created a simple tool to count how I wasted my time day by day ;-) http://www.flickr.com/photos/34017...@n07/3169438647/sizes/o/ It's simple, a small program running on background, logging the title of foreground window. A python script parses the log file and then generates chart

Re: How to kill orphaned threads at program exit

2009-01-05 Thread BlueBird
On Dec 28 2008, 6:33 pm, Giampaolo Rodola' gne...@gmail.com wrote: Hi, I know that it's not possible to kill threads but I'm wondering if does exist some workaround for my problem. I have a test suite which does a massive usage of threads. Sometimes happens that one test fails, the test suite

Re: socket send help

2009-01-05 Thread Gabriel Genellina
En Sat, 03 Jan 2009 21:44:34 -0200, Bryan Olson fakeaddr...@nowhere.org escribió: Gabriel Genellina wrote: greyw...@gmail.com escribió: [...] A simple server: from socket import * myHost = '' Try with myHost = '127.0.0.1' instead - a firewall might be blocking your server. Just a

Re: cx_Oracle issues

2009-01-05 Thread huw_at1
On Dec 18 2008, 10:34 am, huw_at1 huwdjo...@gmail.com wrote: On Dec 16, 12:17 pm, huw_at1 huwdjo...@gmail.com wrote: On Dec 15, 12:59 pm, ron.re...@gmail.com ron.re...@gmail.com wrote: On Dec 15, 2:44 am, huw_at1 huwdjo...@gmail.com wrote: On Dec 11, 5:34 pm, ron.re...@gmail.com

Re: Python callback functions and static methods

2009-01-05 Thread Jean-Paul Calderone
On Mon, 5 Jan 2009 18:00:37 +0100, Joris djm...@gmail.com wrote: Hello, I'm trying to implement callback functionality in a static class. I have a feeling that I'm doing something against the Python philosophy and not some programming error but any help would be appreciated. Others have

Re: Python callback functions and static methods

2009-01-05 Thread Steve Holden
Joris wrote: Hello, I'm trying to implement callback functionality in a static class. I have a feeling that I'm doing something against the Python philosophy and not some programming error but any help would be appreciated. First, a piece of proof-of-concept-code: * class Data:

Re: f.seek() unwanted output

2009-01-05 Thread Tim Chase
I'm having trouble with a script that is printing the output of f.seek () [snip] I have a file in memory. when i try f.seek(0) #or any other value in f.tell() it gives me 0 as output: the following script illustrates my 'problem' for a in range(10): f.seek(a) 0 1 2 3 4 5 6 7 8 9

Re: threading a 10 lines out of a file

2009-01-05 Thread Steve Holden
alex goretoy wrote: I've found a great example on how to do threads. It compares a ping program in regular for loop and with threaded for loop. The link is below if anyone is interested. http://www.wellho.net/solutions/python-python-threads-a-first-example.html I hope my eagerness to post

f.seek() unwanted output

2009-01-05 Thread thomasvang...@gmail.com
I'm having trouble with a script that is printing the output of f.seek () whereas in the documentation it is quoted not to have any output: file.seek(offset[, whence])¶ Set the file’s current position, like stdio‘s fseek. The whence argument is optional and defaults to os.SEEK_SET or 0

Re: why cannot assign to function call

2009-01-05 Thread Steve Holden
Derek Martin wrote: On Sun, Jan 04, 2009 at 09:56:33PM -0600, Grant Edwards wrote: On 2009-01-05, Derek Martin c...@pizzashack.org wrote: On Sat, Jan 03, 2009 at 11:38:46AM -0600, Grant Edwards wrote: One presumes that Mr. Martin finds anything different from his first computer language to be

Python callback functions and static methods

2009-01-05 Thread Joris
Hello, I'm trying to implement callback functionality in a static class. I have a feeling that I'm doing something against the Python philosophy and not some programming error but any help would be appreciated. First, a piece of proof-of-concept-code: * class Data: callfunc = None

Re: Tkinter - problem closing window

2009-01-05 Thread Collin D
On Jan 5, 6:25 am, Djames Suhanko djames.suha...@gmail.com wrote: Hello! I'm sorry my terrible english (my native language is portuguese). I has a litle program that open another window. When I close de root window in quit button, I need clicking 2 times to close. is where the problem? The

Re: why cannot assign to function call

2009-01-05 Thread Steve Holden
Steven D'Aprano wrote: On Sun, 04 Jan 2009 20:03:11 -0600, Derek Martin wrote: [...] And for that matter, it's pretty unintuitive generally. Names and objects are quite natural IMHO. There are many real world objects which we attach one or more names to, or refer to in sequences like please

Re: Python training in Colorado, January 27-30

2009-01-05 Thread lutz
Yes, my public classes are held only in Colorado today. Most students travel from out-of-town to attend. Per my web page, my classes may be available in a different location later this year (Florida is a strong possibility), but not in Tulsa, unfortunately. Thanks, --Mark Lutz -Original

Re: Python training in Colorado, January 27-30

2009-01-05 Thread skip
lutz Per my web page, my classes may be available in a different lutz location later this year (Florida is a strong possibility), but lutz not in Tulsa, unfortunately. Maybe if Tulsa had more appealing geography or weather??? ;-) Skip --

Re: fetch image

2009-01-05 Thread Diez B. Roggisch
asit wrote: import httplib class Server: #server class def __init__(self, host): self.host = host def fetch(self, path): http = httplib.HTTPConnection(self.host) http.request(GET, path) r = http.getresponse() print str(r.status) +

Re: About PyOpenGL

2009-01-05 Thread Rob Williscroft
trueli...@gmail.com wrote in news:f8099226-a953-4598-bfe2-61ee5772ce26 @l33g2000pri.googlegroups.com in comp.lang.python: Traceback (most recent call last): File test.py, line 36, in module main() File test.py, line 26, in main glutInit(sys.argv) File

Re: why cannot assign to function call

2009-01-05 Thread Marc 'BlackJack' Rintsch
On Sun, 04 Jan 2009 20:03:11 -0600, Derek Martin wrote: On Sat, Jan 03, 2009 at 10:15:51AM +, Marc 'BlackJack' Rintsch wrote: On Fri, 02 Jan 2009 04:39:15 -0600, Derek Martin wrote: What's the difference between Python and Java or C# here!? Or are they also BIZARRE!? I am happily

Re: why cannot assign to function call

2009-01-05 Thread Marc 'BlackJack' Rintsch
On Sun, 04 Jan 2009 22:55:09 -0600, Derek Martin wrote: On Sun, Jan 04, 2009 at 09:30:20PM -0500, Steve Holden wrote: I'm going to go out on a limb and assert that there's NO POSSIBLE WAY a student could intuit Python's variable assignment behavior, having never been exposed to that same

Re: About PyOpenGL

2009-01-05 Thread Cousin Stanley
OpenGL.error.NullFunctionError: Attempt to call an undefined function __glutInitWithExit, check for bool(__glutInitWithExit) before calling Can anyone please tell me why? Your opengl program runs exactly as coded without error under Debian 5.0 Linux Lenny Perhaps a

reflection as in Java: how to create an instance from a classname

2009-01-05 Thread guss
I cannot find a satisfying answer to this question on the web so let's try here. My problem is the following, I would like to instantiate some object from a configuration file that would contain class names like for example classname=org.common.resource.MyResource. Here my resource is the class

Re: Why not Ruby?

2009-01-05 Thread r
On Jan 5, 7:31 am, Tim Rowe digi...@gmail.com wrote: 2009/1/1 r rt8...@gmail.com: I am beginning to think the perfect high level language would take the best for Ruby and Python. The ultimate language with speed in mind, pythons clear syntax, but with shortcuts for gurus. I spent quite

Re: why cannot assign to function call

2009-01-05 Thread Derek Martin
On Mon, Jan 05, 2009 at 01:23:04PM -0500, Steve Holden wrote: Even if they really are small-minded or stupid I agree this wouldn't be helpful behavior. But neither would your characterization of Python's assignment model as bizarre (even ignoring that you SHOUTED IT AT US), and I have yet to

Re: structuring a package?

2009-01-05 Thread Bruno Desthuilliers
Torsten Mohr a écrit : Hi, i have a question on how to structure a package best, would be great if anybody could give me some hint on this: Assuming i have a base class GraphicObject and derived from that some classes like Square, Circle, ... It looks natural to me to write in a code that

Re: mod_python: delay in files changing after alteration

2009-01-05 Thread Stephen Chapman
I have never noticed any such delay. After making a change I just hit F5 on my browser and its fine. Maybe its a browser issue On 1/5/09, psaff...@googlemail.com psaff...@googlemail.com wrote: Maybe this is an apache question, in which case apologies. I am running mod_python 3.3.1-3 on

__init__.py and package help

2009-01-05 Thread TechieInsights
Ok I have read all of the tutorials and documents I could find. I am running Python 2.6 on windows. The problem I am having with packages is that they don't show up! Simple example of what isn't working... Structure- pytest/ Root directory of package __init__.py- code: __all__ =

Python stack and heap

2009-01-05 Thread vedrandekovic
Hello, Does anybody know how can I get usage of stack or/heap memory in Python on Windows XP? Regards, Vedran -- http://mail.python.org/mailman/listinfo/python-list

Re: Switching user in a SSH connection

2009-01-05 Thread Shah Alam
On Jan 2, 2:22 pm, Tino Wildenhain t...@wildenhain.de wrote: Shah Sultan Alam wrote: Hi Group,  I am trying to connect to a Linux maching using paramiko.  and able to run a command like ls -l  Now I want to switch user being in the connection ( eg running something like su - ) Will

Re: __init__.py and package help

2009-01-05 Thread TechieInsights
Ok... I figured it out... you can only import packages via the __all__ = ['subpackage/folder']... if you include a module such as hello.py, it will fail. Go figures I'd find this right after posting here... Greg TechieInsights wrote: Ok I have read all of the tutorials and documents I could

Re: __init__.py and package help

2009-01-05 Thread J. Cliff Dyer
On Mon, 2009-01-05 at 11:49 -0800, TechieInsights wrote: Ok I have read all of the tutorials and documents I could find. I am running Python 2.6 on windows. The problem I am having with packages is that they don't show up! Simple example of what isn't working... Structure- pytest/

Re: Why not Ruby?

2009-01-05 Thread Tim Rowe
2009/1/1 r rt8...@gmail.com: I am beginning to think the perfect high level language would take the best for Ruby and Python. The ultimate language with speed in mind, pythons clear syntax, but with shortcuts for gurus. I spent quite a few evenings looking at Ruby, and didn't find a single

replacement for __file__ in compiled exe

2009-01-05 Thread TechieInsights
__file__ command does not work when compiled to exe. It makes since because the file is now in a compressed library. Is there a replacement or something else you can do? The real problem is that when you create an exe of your program with python embedded, you can't always guarantee that your

Re: f.seek() unwanted output

2009-01-05 Thread pruebauno
On Jan 5, 8:52 am, thomasvang...@gmail.com thomasvang...@gmail.com wrote: I'm having trouble with a script that is printing the output of f.seek () whereas in the documentation it is quoted not to have any output: file.seek(offset[, whence])¶     Set the file’s current position, like

Re: __init__.py and package help

2009-01-05 Thread TechieInsights
Thanks J. Cliff Dyer wrote: On Mon, 2009-01-05 at 11:49 -0800, TechieInsights wrote: Ok I have read all of the tutorials and documents I could find. I am running Python 2.6 on windows. The problem I am having with packages is that they don't show up! Simple example of what isn't

Re: My last working day of 2007

2009-01-05 Thread Ant
On Jan 5, 9:47 am, Jack.Chu working...@gmail.com wrote: Hello guys: I created a simple tool to count how I wasted my time day by day ;-)http://www.flickr.com/photos/34017...@n07/3169438647/sizes/o/ Looks interesting - did you have some sort of time machine to be spending that much time in

fetch image

2009-01-05 Thread asit
import httplib class Server: #server class def __init__(self, host): self.host = host def fetch(self, path): http = httplib.HTTPConnection(self.host) http.request(GET, path) r = http.getresponse() print str(r.status) + : + r.reason server =

Extending Python with C or C++

2009-01-05 Thread Ryan
I've been using Python for many years now. It's a wonderful language that I enjoy using everyday. I'm now interested in getting to know more about the guts (C/C++) and extending it. But, extending python still seems like a black art to me. Is there anymore docs or info on extending it besides the

Re: Extending Python with C or C++

2009-01-05 Thread Ralf Schoenian
Ryan wrote: I've been using Python for many years now. It's a wonderful language that I enjoy using everyday. I'm now interested in getting to know more about the guts (C/C++) and extending it. But, extending python still seems like a black art to me. Is there anymore docs or info on extending

Re: structuring a package?

2009-01-05 Thread Torsten Mohr
Hello James, That way i'd have to structure the code like this: graphic/ __init__,py (GraphicObject) square.py (Square) circle.py (Circle) Does that make sense like this? This seems perfectly acceptable. Thanks for that hint. Do you see a way that i could write in circle.py:

Re: Python training in Colorado, January 27-30

2009-01-05 Thread alex goretoy
lutz Per my web page, my classes may be available in a different lutz location later this year (Florida is a strong possibility), but lutz not in Tulsa, unfortunately. Maybe if Tulsa had more appealing geography or weather??? ;-) Skip Yes, that makes sense to me. Thank you.

Re: replacement for __file__ in compiled exe

2009-01-05 Thread John Machin
On Jan 6, 7:03 am, TechieInsights gdoerm...@gmail.com wrote: __file__ command does not work when compiled to exe.  It makes since because the file is now in a compressed library.  Is there a replacement or something else you can do?  The real problem is that when you create an exe of your

mod_python: delay in files changing after alteration

2009-01-05 Thread psaff...@googlemail.com
Maybe this is an apache question, in which case apologies. I am running mod_python 3.3.1-3 on apache 2.2.9-7. It works fine, but I find that when I alter a source file during development, it sometimes takes 5 seconds or so for the changes to be seen. This might sound trivial, but when debugging

Re: math module for Decimals

2009-01-05 Thread alex goretoy
Hmm. Maybe we shouldn't be using this syntax in from_float, if it's the only thing that prevents the trunk version of decimal.py from being used with Python 2.4. On the other hand, from_float isn't going to work until 2.7 anyway, since it uses a whole bunch of new stuff: as_integer_ratio

About PyOpenGL

2009-01-05 Thread trueli...@gmail.com
I follow the OpenGL Programming Guide, write a small test: #!/usr/bin/env python # encoding=utf-8 import sys from OpenGL.GL import * from OpenGL.GLUT import * def display(): glClear(GL_COLOR_BUFFER_BIT) glColor(1.0, 1.0, 1.0) glBegin(GL_POLYGON) glVertex(0.25, 0.25, 0.0)

Re: Python return values

2009-01-05 Thread Mel
koranth...@gmail.com wrote: I have a newbie doubt about Python return values. In (say) C/C++, if we try to return a value which is stored inside the procedure stack, we will get an error when trying to access it outside of that procedure. For example: function foo(): dcl y int dcl

Re: threading a 10 lines out of a file

2009-01-05 Thread alex goretoy
Steve, Are you referring to the endless GIL debate? I googled about what you said. I'll look into it here shortly. I just know one thing, is that I need a comparison for regular code and something about how GIL and threading fit in the picture. It makes it easier for me to understand what is

Re: threading a 10 lines out of a file

2009-01-05 Thread Steve Holden
alex goretoy wrote: Steve, Are you referring to the endless GIL debate? I googled about what you said. I'll look into it here shortly. I just know one thing, is that I need a comparison for regular code and something about how GIL and threading fit in the picture. It makes it easier for me

Re: threading a 10 lines out of a file

2009-01-05 Thread alex goretoy
Se we need to know a bit more about your 4.5-hour program before we can determine whether threads can help. There is light at the end of the tunnel, however, since even if threads don't work it's possible that the multiprocessing module will (assuming you have multi-processor hardware at

Re: My last working day of 2007

2009-01-05 Thread News123
s...@pobox.com wrote: Jack It's simple, a small program running on background, logging the Jack title of foreground window. A python script parses the log file Jack and then generates chart by matplotlib. Jack I just want to get suggestions to improve it, or know the news

Measuring bytes of packet sent from python application

2009-01-05 Thread Kangkook Jee
Hi, all I'd like to measure number of bytes sent(or recv'd) from my python application. Does anyone have any idea how can I achieve this? I tried to do this by tracing some socket calls (send, sendto, sendAll) using 'metaclass' but I could find exactly place that I can put this in. My

Re: why cannot assign to function call

2009-01-05 Thread Steven D'Aprano
On Mon, 05 Jan 2009 13:21:09 -0600, Derek Martin wrote: Some of the comments from people include the idea that the assignment model is nothing special, if you've encountered any one of a dozen other languages. I didn't realize programming in any of those languages was a prerequisite for

Re: greenlets and how they can be used

2009-01-05 Thread James Mills
On Tue, Jan 6, 2009 at 4:39 AM, Benjamin Walkenhorst kry...@gmx.net wrote: James Mills wrote: On Sun, Jan 4, 2009 at 4:52 AM, Benjamin Walkenhorst kry...@gmx.net wrote: POE was one of the nicest software frameworks I have ever used, and I've been continuously frustrated by the lack of

Re: Extending Python with C or C++

2009-01-05 Thread Terry Reedy
Ryan wrote: I've been using Python for many years now. It's a wonderful language that I enjoy using everyday. I'm now interested in getting to know more about the guts The 'guts' of Python the language include the object model, namespaces (including modules), and the statement and

Re: Tkinter - problem closing window

2009-01-05 Thread Collin D
On Jan 5, 9:21 am, Roger rdcol...@gmail.com wrote: On Jan 5, 11:52 am, Collin D collin.da...@gmail.com wrote: On Jan 5, 6:25 am, Djames Suhanko djames.suha...@gmail.com wrote: Hello! I'm sorry my terrible english (my native language is portuguese). I has a litle program that open

Re: [email/quoprimime.py] AttributeError: 'tuple' object has no attribute 'lstrip'

2009-01-05 Thread Terry Reedy
Gilles Ganault wrote: Hello I successfully use the email package to send e-mail from Python scripts, but this script fails when I fetch addresses from an SQLite database where data is Unicode-encoded: == from email.MIMEText import MIMEText import smtplib,sys import apsw

Re: Measuring bytes of packet sent from python application

2009-01-05 Thread Jonathan Gardner
On Jan 5, 2:26 pm, Kangkook Jee aixe...@gmail.com wrote: I'd like to measure number of bytes sent(or recv'd) from my python application. Does anyone have any idea how can I achieve this? I tried to do this by tracing some socket calls (send, sendto, sendAll)   using 'metaclass' but I could

Re: replacement for __file__ in compiled exe

2009-01-05 Thread TechieInsights
Yes, that is my exact question. How do you get the file path of your script/program. Normally in python you can use __file__ and it will return the file path of the script you are in, however, when you compile the script to exe py2exe (or whatever util you are using) compresses them into a zip

Re: why cannot assign to function call

2009-01-05 Thread Rhodri James
On Mon, 05 Jan 2009 22:28:59 -, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: * That only languages substantially taught in undergraduate CS courses matter. As an aside, I use only one of the languages I was taught in my Computer Science course, and that only for poking my

Re: Measuring bytes of packet sent from python application

2009-01-05 Thread Kangkook Jee
Jonathan Gardner wrote: On Jan 5, 2:26 pm, Kangkook Jee aixe...@gmail.com wrote: I'd like to measure number of bytes sent(or recv'd) from my python application. Does anyone have any idea how can I achieve this? I tried to do this by tracing some socket calls (send, sendto, sendAll) using

Re: multiprocessing vs thread performance

2009-01-05 Thread alex goretoy
There doesn't seem to be any good examples on POSH or it's not clear to me. For when using with a for loop like mk is doing who started this thread. How would somethings like this be possible to do with POSH? The example show how to share variables between processes/threads but nothing about How

Re: Measuring bytes of packet sent from python application

2009-01-05 Thread Jonathan Gardner
On Jan 5, 3:23 pm, Kangkook Jee aixe...@gmail.com wrote: Jonathan Gardner wrote: A good universal tool on the Linux platform is tcpdump. It takes some learning, but is very useful for this kind of task. You can use a tool like ethereal to visualize the data that tcpdump gathers. That

Is there a best linux distro for a python hobbyist?

2009-01-05 Thread member thudfoo
One with all the major python GUIs: pyQT, pyGtk, pyKde, wxPython, And so on. -- http://mail.python.org/mailman/listinfo/python-list

Re: Measuring bytes of packet sent from python application

2009-01-05 Thread James Mills
On Tue, Jan 6, 2009 at 8:26 AM, Kangkook Jee aixe...@gmail.com wrote: I'd like to measure number of bytes sent(or recv'd) from my python application. Does anyone have any idea how can I achieve this? I tried to do this by tracing some socket calls (send, sendto, sendAll) using 'metaclass'

Re: Measuring bytes of packet sent from python application

2009-01-05 Thread alex goretoy
Have you looked into scapy? www.secdev.org/projects/*scapy*/ There's another one, it comes with python I think. Can't seem to remember the name. I may be mistaken though. -Alex Goretoy http://www.alexgoretoy.com somebodywhoca...@gmail.com On Mon, Jan 5, 2009 at 11:23 PM, Kangkook Jee

Regex Generator From Multiple Files

2009-01-05 Thread James Pruitt
I am looking for a way given a number of files, say 3, that represent technical support tickets in the same format to generate regular expressions for the different fields automatically. An example from of one line from each file: Date: 12/30/2008 Room: 457 Building: Main Date: 12/31/2008 Room:

Re: Extending Python with C or C++

2009-01-05 Thread Ryan
On Jan 5, 2:37 pm, Terry Reedy tjre...@udel.edu wrote: Ryan wrote: I've been using Python for many years now. It's a wonderful language that I enjoy using everyday. I'm now interested in getting to know more about the guts The 'guts' of Python the language include the object model,

Re: Regex Generator From Multiple Files

2009-01-05 Thread MRAB
James Pruitt wrote: I am looking for a way given a number of files, say 3, that represent technical support tickets in the same format to generate regular expressions for the different fields automatically. An example from of one line from each file: Date: 12/30/2008 Room: 457 Building: Main

Re: socket send help

2009-01-05 Thread Bryan Olson
Gabriel Genellina wrote: Bryan Olson escribió: Gabriel Genellina wrote: greyw...@gmail.com escribió: [...] A simple server: from socket import * myHost = '' Try with myHost = '127.0.0.1' instead - a firewall might be blocking your server. Just a nit: I'd say the reason to use

Re: socket send help

2009-01-05 Thread James Mills
On Tue, Jan 6, 2009 at 10:49 AM, Bryan Olson fakeaddr...@nowhere.org wrote: I thought a firewall would block an attempt to bind to any routeable address, but not to localhost. So using INADDR_ANY would be rejected. No. My understanding is that firewalls block network traffic, not system

Re: socket send help

2009-01-05 Thread James Mills
On Wed, Dec 24, 2008 at 3:59 PM, greyw...@gmail.com greyw...@gmail.com wrote: (snip) If I run testserver.py via the cmd prompt in Windows XP and then the testclient.py program, I get the following error: Traceback (most recent call last): File C:\Python30\testclient.py, line 12, in module

cPickle vs pickle discrepancy

2009-01-05 Thread Zac Burns
Greetings, I have a module that attempts to pickle classes defined in that module. I get an error of the form: PicklingError: Can't pickle class 'Module.SubModule.Class': import of module Module.SubModule failed when using cPickle (protocol -1, python version 2.5.1). The module has already been

Re: Rich Comparisons Gotcha

2009-01-05 Thread Mark Wooding
Steven D'Aprano st...@remove-this-cybersource.com.au wrote: There is nothing to blame them for. This is the correct behaviour. NaNs should *not* compare equal to themselves, that's mathematically incoherent. Indeed. The problem is a paucity of equality predicates. This is hardly

Re: Is there a best linux distro for a python hobbyist?

2009-01-05 Thread david.lyon
Hi, I would have to put in a vote for Ubuntu. There seems to be a working ubuntu package for most of the things that I have tried. Instead of having to use a pythonic package - just get one from the os. As for the things you mention.. give it a go On Mon, 5 Jan 2009 15:42:00 -0800, member

Re: Is there a best linux distro for a python hobbyist?

2009-01-05 Thread alex goretoy
+1 for ubuntu -Alex Goretoy http://www.alexgoretoy.com somebodywhoca...@gmail.com On Tue, Jan 6, 2009 at 12:39 AM, david.l...@preisshare.net wrote: Hi, I would have to put in a vote for Ubuntu. There seems to be a working ubuntu package for most of the things that I have tried. Instead

Re: Is there a best linux distro for a python hobbyist?

2009-01-05 Thread James Mills
On Tue, Jan 6, 2009 at 11:11 AM, alex goretoy aleksandr.gore...@gmail.com wrote: +1 for ubuntu +1 for Ubuntu also (for the novice and ex-windows user(s)) +2 for CRUX (1) cheers James 1. http://crux.nu/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a best linux distro for a python hobbyist?

2009-01-05 Thread Lex Hider
Probably not a big difference in most cases between debian, ubuntu, fedora. The latter two may be more likely to have more recent versions. I'm pretty sure ubuntu is the only one which currently has python 3.0 in it's archives [no, it's not the default version]. On 06/01/2009, member thudfoo

Re: Rich Comparisons Gotcha

2009-01-05 Thread Mark Wooding
Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: I've already mentioned NaNs. Sentinel values also sometimes need to compare not equal with themselves. Forcing them to compare equal will cause breakage. There's a conflict between such domain-specific considerations (NaNs, strange

Re: Measuring bytes of packet sent from python application

2009-01-05 Thread Steven D'Aprano
On Mon, 05 Jan 2009 18:23:10 -0500, Kangkook Jee wrote: Jonathan Gardner wrote: On Jan 5, 2:26 pm, Kangkook Jee aixe...@gmail.com wrote: I'd like to measure number of bytes sent(or recv'd) from my python application. Does anyone have any idea how can I achieve this? I tried to do this by

Re: why cannot assign to function call

2009-01-05 Thread Aaron Brady
On Jan 4, 1:28 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: I'm answering both John and Aaron's comments in the following. Mostly John at the start, Aaron toward the end. On Sat, 03 Jan 2009 15:42:47 -0800, Aaron Brady wrote: On Jan 3, 11:25 am, John O'Hagan

Re: Measuring bytes of packet sent from python application

2009-01-05 Thread Grant Edwards
On 2009-01-05, Jonathan Gardner jgard...@jonathangardner.net wrote: On Jan 5, 2:26 pm, Kangkook Jee aixe...@gmail.com wrote: I'd like to measure number of bytes sent(or recv'd) from my python application. Does anyone have any idea how can I achieve this? I tried to do this by tracing some

Re: Measuring bytes of packet sent from python application

2009-01-05 Thread Grant Edwards
On 2009-01-05, Kangkook Jee aixe...@gmail.com wrote: Jonathan Gardner wrote: On Jan 5, 2:26 pm, Kangkook Jee aixe...@gmail.com wrote: I'd like to measure number of bytes sent(or recv'd) from my python application. Does anyone have any idea how can I achieve this? I tried to do this by

Re: Measuring bytes of packet sent from python application

2009-01-05 Thread Grant Edwards
On 2009-01-05, Kangkook Jee aixe...@gmail.com wrote: I'd like to measure number of bytes sent(or recv'd) from my python application. Does anyone have any idea how can I achieve this? Aside from tcpdump/wireshark, you can set up iptables rules to enable accounting for traffic based on IP

Re: Rich Comparisons Gotcha

2009-01-05 Thread Steven D'Aprano
On Tue, 06 Jan 2009 01:24:58 +, Mark Wooding wrote: Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: I've already mentioned NaNs. Sentinel values also sometimes need to compare not equal with themselves. Forcing them to compare equal will cause breakage. There's a

  1   2   3   >