Re: sending emails using python

2006-09-14 Thread sridhar
Tim Williams wrote: > On 07/09/06, Sybren Stuvel <[EMAIL PROTECTED]> wrote: > > sridhar enlightened us with: > > > iam having user account on an exchangeserver. > > > with that can i send an email using python? > > > > > > if iam using the following code iam getting error > > > > > > Traceback (mo

Re: best small database?

2006-09-14 Thread Fredrik Lundh
Blair P. Houghton wrote: > Mmmm, no. > > I'm saying that the change from Oracle 9 to Oracle 10 is like changing > from ffs to fat32. well, I'm quite sure that the people I know who's spending a lot of their time moving stuff from Oracle N to Oracle N+1 (and sometimes getting stuck, due to inco

Re: sending emails using python

2006-09-14 Thread sridhar
Brendon Towle wrote: > On Sep 7, 2006, at 3:50 AM, "sridhar" > <[EMAIL PROTECTED]>wrote: > > > > iam having user account on an exchangeserver. > > with that can i send an email using python? > > > > if iam using the following code iam getting error > > > > > > fromAddress = '[EMAIL PROTECTED]' > >

Re: How do I converted a null (0) terminated string to a Python string?

2006-09-14 Thread Fredrik Lundh
Michael wrote: > Thanks for your reply. Just wondering... how are Python strings > formatted? Evidently they're not 0 terminated. have you tried *printing* the thing you got via UDP? to get a programmer-friendly representation of an arbitrary object, use print repr(obj) (where obj is your

Re: When is it a pointer (aka reference) - when is it a copy?

2006-09-14 Thread Fredrik Lundh
Dennis Lee Bieber wrote: > References to lists, dictionaries, and class instances (which are, > in a way, just an expanded dictionary) are "mutable" careful: it's not the *reference* that's mutable, it's the object. the *only* difference between mutable and immutable objects is that the la

Re: stock quotes

2006-09-14 Thread Fredrik Lundh
Larry Bates wrote: > If the HTML on the page(s) you want to process is clean and well formed it > can be pretty easy. Download elementree from: > > http://effbot.org/zone/element-index.htm and if it turns out to be messy, but you still want to use the same API, see: http://effbot.org/zon

Re: Newbie - ? get IDLE going on cygwin

2006-09-14 Thread Fredrik Lundh
David J. Braden wrote: > Worked great. This "exercise" has also raised my comfort level with the > whole endeavor. To get rebaseall going, I was told to install the > *entire* cygwin package. Good time to paint a couple of rooms, clean the > gutters, ... or get a more convenient distribution.

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-14 Thread Fredrik Lundh
Cliff Wells wrote: >> patch here: >> >> http://mail.python.org/pipermail/python-list/2001-June/047996.html > > Did you happen to remember this post or is Google *really* your friend? Have you taken The Oath? If not, I'm afraid I cannot tell you. -- http://mail.python.org/mailman/listinfo/pyt

Re: Linear regression in 3 dimensions

2006-09-14 Thread [EMAIL PROTECTED]
Hi Dave! > <> > > Hi Bernhard, > I am just starting to learn Python; could you plz tell me specifically > the introduction(s) you have in mind? > > TIA, > DaveB Take a look at the documenation section on www.scipy.org. Especially the old NumPy documentation (follow link to NumPy tutorial) and th

Re: [ANN] XPN 0.6.5 released

2006-09-14 Thread Franz Steinhaeusler
On Tue, 12 Sep 2006 20:15:58 GMT, Nemesis <[EMAIL PROTECTED]> wrote: >XPN (X Python Newsreader) is a multi-platform newsreader with Unicode >support. It is written with Python+GTK. It has features like >scoring/actions, X-Face and Face decoding, muting of quoted text, >newsrc import/export, find a

Re: time-based point system

2006-09-14 Thread Peter Otten
Jay wrote: > That function is absolutely no good for this situation. > > 1. Take a small number. > 5.4348809719085693 > > 2. Put it in the function. > f(5.4348809719085693) = 1/5.4348809719085693 > > 3. Get a large number??? > 0.18399666987533483 > > That number is even smaller.  I want a larg

lxml Windows binaries

2006-09-14 Thread Jan Dries
I'm trying to find Windows binaries for lxml. The cheeseshop is supposed to have such binaries, but I can't find them. Does anyone know where I might find such binaries? Thanks, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: How to build extensions on Windows?

2006-09-14 Thread Fuzzyman
Martin v. Löwis wrote: > Fuzzyman schrieb: > > More interestingly, someone reported on Python-dev recently a speed > > improvement of around 30% (from memory) by compiling with VC 8. I know > > the grumble (almost certainly correctly) about Microsoft's 'odd' > > interpretation of the C standards i

Why not event-driven packages in other than the main thread?

2006-09-14 Thread Tor Erik
Hi, I've developed an application were I've used Tkinter for the GUI. When I ran the GUI in another thread than the main, it kept locking up. I experienced similar problems with Twisted. Both of these tools are event-based, so I guess that is the root of the problem... But could anyone tell me

Re: [ANN] IronPython Community Edition 1.0r1

2006-09-14 Thread Richard Jones
Sanghyeon Seo wrote: > I am happy to announce IronPython Community Edition (IPCE for short) > 1.0 revision 1, based on IronPython 1.0, to the world. Is there any word on ctypes for IronPython? The last I can find out on the "tubes" is a promising message dated back in June: http://lists.ironpytho

Re: How do I converted a null (0) terminated string to a Python string?

2006-09-14 Thread John Machin
Fredrik Lundh wrote: > Michael wrote: > > > Thanks for your reply. Just wondering... how are Python strings > > formatted? Evidently they're not 0 terminated. > > have you tried *printing* the thing you got via UDP? > > to get a programmer-friendly representation of an arbitrary object, use > >

Re: Looking for the Perfect Editor

2006-09-14 Thread Wildemar Wildenburger
> Hi Stu und "Willie", > "Willie"? Thats new. ;) > I will be running it under (sigh) Windows. So? Apart from Microsoft being evil and spying on you all the time, I find much satisfaction in the fact that Windows Just Works(tm). Linux on the other hand Just Barely Works(tm). Hello flamewar :).

descriptor problems

2006-09-14 Thread Gary Stephenson
I want to define a class-level attribute that will be shared by all subclasses. That is, I want this class, every subclass of this class, every instance of this class and every instance of every subclass to be able to read and write to the _same_ slot/variable. But I can't figure out how to d

Re: lxml Windows binaries

2006-09-14 Thread Fuzzyman
Jan Dries wrote: > I'm trying to find Windows binaries for lxml. The cheeseshop is supposed > to have such binaries, but I can't find them. > Does anyone know where I might find such binaries? > The lxml install docs point to the following link for Windows binaries : http://www.zlatkovic.com/

Re: lxml Windows binaries

2006-09-14 Thread Jan Dries
Fuzzyman wrote: > Jan Dries wrote: >> I'm trying to find Windows binaries for lxml. The cheeseshop is supposed >> to have such binaries, but I can't find them. >> Does anyone know where I might find such binaries? >> > > The lxml install docs point to the following link for Windows binaries > : >

Re: Are Python's reserved words reserved in places they dont need tobe?

2006-09-14 Thread Steven D'Aprano
On Wed, 13 Sep 2006 07:45:02 +, Antoon Pardon wrote: >>> This is just an idea of mine, nothing I expect python to adapt. >>> But just suppose the language allowed for words in bold. A word >>> in bold would be considered a reserved word, a word in non bold >>> would be an identifier. [snip]

Re: Looking for the Perfect Editor

2006-09-14 Thread gnewsg
What about IDLE? I really apreciate it but a big broblem is that it doesn't support tabs: for every source you edit you have to open a new IDLE window. :-\ -- http://mail.python.org/mailman/listinfo/python-list

Re: Why not event-driven packages in other than the main thread?

2006-09-14 Thread Bjoern Schliessmann
Tor Erik wrote: > But could anyone tell me why running these in a thread other than > the main one doesn't work? Just for personal interest: Why would you want to run the GUI in another thread? It's common to leave the GUI in the main thread and let worker threads handle heavy time-consuming stuf

Re: descriptor problems

2006-09-14 Thread Peter Otten
Gary Stephenson wrote: > I want to define a class-level attribute that will be shared by all > subclasses. That is, I want this class, every subclass of this class, > every instance of this class and every instance of every subclass to be > able to > read and write to the _same_ slot/variable. B

Re: descriptor problems

2006-09-14 Thread Michele Simionato
Gary Stephenson wrote: > # but I need to be able to update the value through the class > # how do I do it? > A.cls2 = 4 # whoops - we just overwrote the descriptor with an integer > > A.cls2.__set__(None,4) # AttributeError: 'int' object has no attribute > '__set__' You need to define the

Re: sending emails using python

2006-09-14 Thread Tim Williams
On 14 Sep 2006 00:11:05 -0700, sridhar <[EMAIL PROTECTED]> wrote: > > Tim Williams wrote: > > Have you verified that you are allowed to use SMTP on this server ? > > Can you send email via it using outlook express or a similar POP3/IMAP > > mail client? > > > > :) > > > yes , because iam having acc

Re: Python blogging software

2006-09-14 Thread Cliff Wells
On Wed, 2006-09-13 at 19:28 +0200, Irmen de Jong wrote: > Cliff Wells wrote: > > I'm currently using Frog, and it's decent, but lacks some fundamental > > features (tags for one). Since Irmen is probably going to scrap it > > anyway, I'm kind of fishing about for something new. > > That is not re

Re: Why not event-driven packages in other than the main thread?

2006-09-14 Thread Cliff Wells
On Thu, 2006-09-14 at 11:13 +0200, Tor Erik wrote: > Hi, > > I've developed an application were I've used Tkinter for the GUI. > When I ran the GUI in another thread than the main, it kept locking > up. > I experienced similar problems with Twisted. > > Both of these tools are event-based, so I g

Re: Why not event-driven packages in other than the main thread?

2006-09-14 Thread Cliff Wells
On Thu, 2006-09-14 at 03:22 -0700, Cliff Wells wrote: > They probably use signals (Twisted I'm sure does) and it's documented > that signals don't work with threads: > > http://docs.python.org/lib/module-signal.html Er, specifically, they only work with the main thread. Cliff -- -- http://m

Re: How can I get the function's caller?

2006-09-14 Thread David
Il Wed, 13 Sep 2006 07:34:45 +0100, Steve Holden ha scritto: > What do you need this name for, just as a materr of interest? There are > ways of manipulating the stack frames, but they'll be slow and possibly > unreliable. I am writing a big (for me) program and it would be helpful to have a dum

Re: How can I get the function's caller?

2006-09-14 Thread David
Il 13 Sep 2006 00:31:47 -0700, John Machin ha scritto: > David wrote: >> Inside a function I need to get the function's caller's name. How can I get >> it? >> > > Check out the thread "__LINE__ and __FILE__ functionality in Python?" > (messages posted 2006-0813). I'll check thankyou! Traffic in

Re: Why not event-driven packages in other than the main thread?

2006-09-14 Thread Lawrence Oluyede
Tor Erik <[EMAIL PROTECTED]> wrote: > I've developed an application were I've used Tkinter for the GUI. > When I ran the GUI in another thread than the main, it kept locking > up. That's because Tkinter is not thread safe AFAIK. > I experienced similar problems with Twisted. Neither Twisted is t

Re: Why not event-driven packages in other than the main thread?

2006-09-14 Thread Tor Erik
Bjoern Schliessmann wrote: > Tor Erik wrote: > >> But could anyone tell me why running these in a thread other than >> the main one doesn't work? > > Just for personal interest: Why would you want to run the GUI in > another thread? It's common to leave the GUI in the main thread and > let worker

Re: Why not event-driven packages in other than the main thread?

2006-09-14 Thread Lawrence Oluyede
Tor Erik <[EMAIL PROTECTED]> wrote: > If you have two event-based frameworks, both needing to run in the main > thread, such as Tkinter and Twisted, you have a problem Twisted supports Tkinter: http://twistedmatrix.com/projects/core/documentation/howto/choosing-reac tor.html#auto14 It's better to

Re: how are dictionary literals handled by the interpreter?

2006-09-14 Thread Bruno Desthuilliers
[EMAIL PROTECTED] wrote: > I wrote up a quick little set of tests, I was acutally comparing ways > of doing "case" behavior just to get some performance information. Now > two of my test cases had almost identical results which was not at all > what I expected. Ultimately I realized I don't reall

Force sleep to ignore interrupts

2006-09-14 Thread andychambers2002
I've written a simple Timer class that allows you to extend it and then implement onMinuteChange, onHourChange etc methods which will be executed on each new minute/hour respectively. It works as I want when used in the main application thread. That is, when you hit Ctr + C, it stops running. How

Re: Force sleep to ignore interrupts

2006-09-14 Thread Jeremy Sanders
[EMAIL PROTECTED] wrote: > It works as I want when used in the main application thread. > That is, when you hit Ctr + C, it stops running. However, if > the class that subclasses it, also subclasses Thread, it breaks > in that hitting Ctrl + C interrupts the call to sleep which puts > the event l

Re: How can I get the function's caller?

2006-09-14 Thread Michele Simionato
David wrote: > Il Wed, 13 Sep 2006 07:34:45 +0100, Steve Holden ha scritto: > > > What do you need this name for, just as a materr of interest? There are > > ways of manipulating the stack frames, but they'll be slow and possibly > > unreliable. > I am writing a big (for me) program and it would be

Re: Is it just me, or is Sqlite3 goofy?

2006-09-14 Thread Magnus Lycka
Paul Boddie wrote: > Well, if the client is free not to bother signalling anything about > erroneous value types, one has to wonder why there's so much of a > specification. If you read it, I think you'll notice that the committee has managed to produce a lot of text without spending too much ink

Re: lxml Windows binaries

2006-09-14 Thread olive
http://puggy.symonds.net/~ashish/downloads/ HTH -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for the Perfect Editor

2006-09-14 Thread Steve Holden
Wildemar Wildenburger wrote: >>Hi Stu und "Willie", [...] > >>Which plugins give me a good start for scientific stuff? > > Er ... I don't know. What do you mean by 'scientific stuff'? You know, stitching body parts together from different corpses and trying to animate them with lightning, inven

Re: How can I get the function's caller?

2006-09-14 Thread Steve Holden
David wrote: > Il Wed, 13 Sep 2006 07:34:45 +0100, Steve Holden ha scritto: > > >>What do you need this name for, just as a materr of interest? There are >>ways of manipulating the stack frames, but they'll be slow and possibly >>unreliable. > > I am writing a big (for me) program and it would

Re: Force sleep to ignore interrupts

2006-09-14 Thread andychambers2002
Jeremy Sanders wrote: > [EMAIL PROTECTED] wrote: > > > It works as I want when used in the main application thread. > > That is, when you hit Ctr + C, it stops running. However, if > > the class that subclasses it, also subclasses Thread, it breaks > > in that hitting Ctrl + C interrupts the call

Re: How can I get the function's caller?

2006-09-14 Thread Fredrik Lundh
"David" wrote: > I am writing a big (for me) program and it would be helpful to have a dummy > function like this: > > def function_A_subfunction_B(self, ) > dummy() > > that display a standard message like this: > > "Dummy: 'function_A_subfunction_B' in module 'module' is not defined yet"

Re: stock quotes

2006-09-14 Thread Frederic Rentsch
Donlingerfelt wrote: > I would like to download stock quotes from the web, store them, do > calculations and sort the results. However I am fairly new and don't have a > clue how to parse the results of a web page download. I can get to the > site, but do not know how to request the certain data

BIOS Changes (enable WOL)

2006-09-14 Thread Feiock, Dennis
I was wondering if it is possible to access the BIOS settings on a system using Python.  I would like to be able to write a script that would enable WOL on a specified system.  For the most part, it would be Win32 systems, but could be just about any flavor of UNIX as well.   Thanks for a

socket and threading ... bad file descriptor

2006-09-14 Thread hg
Hi, I have two classes, one listens and accepts connections, gets the socket, reads the first byte from the opened socket then launches a thread (threading) and gives it the socket identifier. The first time the thread attempts to read from the given socket, socket.py raises a bad file descriptor

Re: When is it a pointer (aka reference) - when is it a copy?

2006-09-14 Thread Christophe
John Henry a écrit : > Hi list, > > Just to make sure I understand this. > > Since there is no "pointer" type in Python, I like to know how I do > that. > > For instance, if I do: > >...some_huge_list is a huge list... >some_huge_list[0]=1 >aref = some_huge_list >aref[0]=0 >

Limitate speed of a socket-based data transferring

2006-09-14 Thread billie
Hi all. I'm writing a TCP-based application that I will use to trasfer binary files through the network. This piece of code represents how do I get a file from a remote peer and save it on my local hard drive: file_obj = open('downloaded.ext', 'wb') while 1: buf = sock.recv(2048) if len(bu

Re: Looking for the Perfect Editor

2006-09-14 Thread Ant
Jay wrote: > I, too, am a hardcore fan of jEdit. It's nice to finally see some user > support on this forum. :-) I quite often throw in jEdits name in these discussions. It's the most powerful and extensible editor I know of outside of the emacs/vi world (and far more accessible than those). -

Re: best small database?

2006-09-14 Thread Magnus Lycka
David Isaac wrote: > I have no experience with database applications. > This database will likely hold only a few hundred items, > including both textfiles and binary files. > > I would like a pure Python solution to the extent reasonable. > > Suggestions? You haven't provided enough requirement

Re: question about including something like sqlite in python

2006-09-14 Thread Magnus Lycka
John Salerno wrote: > I was just thinking, since Python 3.0 is supposed to clean up a lot of > the unnecessary or redundant features of Python and make other things > more streamlined, does it seem to anyone that including SQLite goes > against this goal? Not to me. I don't see the redundancy.

Re: Help me use my Dual Core CPU!

2006-09-14 Thread mystilleef
I use D-Bus (Python). I recommend it. I don't know how cross platform it is. However, it supports message passing of most built-in (strings, ints, lists, dictionaries etc) Python objects accross processes. You can mimick clean Erlang-like concurrency with it. It is the future of IPC on Desktop Unix

Re: How can I get the function's caller?

2006-09-14 Thread John Machin
David wrote: > Il 13 Sep 2006 00:31:47 -0700, John Machin ha scritto: > > > David wrote: > >> Inside a function I need to get the function's caller's name. How can I get > >> it? > >> > > > > Check out the thread "__LINE__ and __FILE__ functionality in Python?" > > (messages posted 2006-0813). > >

Invitation: Kamaelia Open Space, Brussels, Sept 22 2006

2006-09-14 Thread Michael Sparks
Hello, I'd like to invite you to our first Kamaelia Open Space event. Our theme is "Making Software like Lego through intuitive useful concurrency". Perhaps you want to learn to use Kamaelia, or you're already using it, or you're simply interested in code reuse or concurrency being actually use

Re: Limitate speed of a socket-based data transferring

2006-09-14 Thread Diez B. Roggisch
billie schrieb: > Hi all. I'm writing a TCP-based application that I will use to trasfer > binary files through the network. This piece of code represents how do > I get a file from a remote peer and save it on my local hard drive: > > file_obj = open('downloaded.ext', 'wb') > while 1: > buf =

Re: Are Python's reserved words reserved in places they dont need?tobe?

2006-09-14 Thread Roberto Bonvallet
"Delaney, Timothy (Tim)" wrote: > Antoon Pardon wrote: > >> This is just an idea of mine, nothing I expect python to adapt. >> But just suppose the language allowed for words in bold. A word >> in bold would be considered a reserved word, a word in non bold >> would be an identifier. > > Exactly

Re: socket and threading ... bad file descriptor

2006-09-14 Thread hg
hg wrote: > Hi, > > I have two classes, one listens and accepts connections, gets the > socket, reads the first byte from the opened socket then launches a > thread (threading) and gives it the socket identifier. > > The first time the thread attempts to read from the given socket, > socket.py ra

Outbound port on sockets

2006-09-14 Thread bmearns
Is it possible to specify which port to use as the outbound port on a connection? I have the IP address and port number for the computer I'm trying to connect to (not listening for), but it's expecting my connection on a certain port. Specifically, I'm trying to write an FTP host, and I'm trying t

memory

2006-09-14 Thread km
Hi all,Is there any module to limit the memory usage of the python program ?regards,KM -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for the Perfect Editor

2006-09-14 Thread Franz Steinhaeusler
On 7 Sep 2006 13:18:22 -0700, "Omar" <[EMAIL PROTECTED]> wrote: >I'd love the perfect editor that would be: > >a) free DrPython and spe; both written in Python and wxPython using SciTe's control scintilla) and SciTE. DrPython on: http://sourceforge.net/projects/drpython/ (Projectpage) http://drp

Re: memory

2006-09-14 Thread Fredrik Lundh
"km" <[EMAIL PROTECTED]> wrote: > Is there any module to limit the memory usage of the python program ? http://docs.python.org/lib/module-resource.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Why not event-driven packages in other than the main thread?

2006-09-14 Thread Jean-Paul Calderone
On Thu, 14 Sep 2006 11:13:59 +0200, Tor Erik <[EMAIL PROTECTED]> wrote: >Hi, > >I've developed an application were I've used Tkinter for the GUI. >When I ran the GUI in another thread than the main, it kept locking >up. >I experienced similar problems with Twisted. > >Both of these tools are event-

Re: When is it a pointer (aka reference) - when is it a copy?

2006-09-14 Thread Bruno Desthuilliers
John Henry wrote: > Hi list, > > Just to make sure I understand this. > > Since there is no "pointer" type in Python, I like to know how I do > that. > > For instance, if I do: > >...some_huge_list is a huge list... >some_huge_list[0]=1 >aref = some_huge_list >aref[0]=0 >pri

Re: Outbound port on sockets

2006-09-14 Thread Fredrik Lundh
"bmearns" wrote: > Specifically, I'm trying to write an FTP host, and I'm trying to > implement the PORT command. From everything I've read, the client > supplies the IP address and port number for where I'm supposed to > connect to send it data (like a LISTing), and it's expecting me to > connect

Re: Looking for the Perfect Editor

2006-09-14 Thread limodou
On 9/14/06, Franz Steinhaeusler <[EMAIL PROTECTED]> wrote: > On 7 Sep 2006 13:18:22 -0700, "Omar" <[EMAIL PROTECTED]> > wrote: > > >I'd love the perfect editor that would be: > > > >a) free > > DrPython and spe; both written in Python and wxPython using SciTe's > control scintilla) and SciTE. > > D

Re: Outbound port on sockets

2006-09-14 Thread Diez B. Roggisch
bmearns schrieb: > Is it possible to specify which port to use as the outbound port on a > connection? I have the IP address and port number for the computer I'm > trying to connect to (not listening for), but it's expecting my > connection on a certain port. > > Specifically, I'm trying to write

Re: Outbound port on sockets

2006-09-14 Thread billie
bmearns wrote > Is it possible to specify which port to use as the outbound port on a > connection? I have the IP address and port number for the computer I'm > trying to connect to (not listening for), but it's expecting my > connection on a certain port. > > Specifically, I'm trying to write an

Re: Outbound port on sockets

2006-09-14 Thread billie
> The right format of a FTP PORT command is: > > PORT x,x,x,x,y,z > > ...where x(s) represents your IP address in dotted form and (x * y) the > TCP port you bind. Sorry, I wanted to say: (y * z) -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for the Perfect Editor

2006-09-14 Thread Franz Steinhaeusler
On Thu, 14 Sep 2006 20:45:11 +0800, limodou <[EMAIL PROTECTED]> wrote: >> >These things UliPad also can do. And it also support html, javascript, >css, java, etc syntax highlight. UliPad also support Input Assistant, >even include custom calltips and auto-complete, and many features, you >can find

Re: Why not event-driven packages in other than the main thread?

2006-09-14 Thread Tor Erik
Jean-Paul Calderone wrote: > On Thu, 14 Sep 2006 11:13:59 +0200, Tor Erik <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I've developed an application were I've used Tkinter for the GUI. >> When I ran the GUI in another thread than the main, it kept locking >> up. >> I experienced similar problems with Tw

Re: Outbound port on sockets

2006-09-14 Thread bmearns
Thanks for all the responses. I understood what the PORT command was for, but I've been seeing alot of doc online that only mentions going outbound on port 20 for data connections, so I thought maybe that was my problem. Sorry if this is the wrong spot to follow up on this not-so-much-python matte

Re: Outbound port on sockets

2006-09-14 Thread bmearns
Quick follow up, I'm able to connect to other external FTP sites behind my firewall and router, no problem. -Brian bmearns wrote: > Thanks for all the responses. I understood what the PORT command was > for, but I've been seeing alot of doc online that only mentions going > outbound on port 20 f

Re: Unit balancing

2006-09-14 Thread AbrahamLincolnIllinois
Thanks, all. We will investigate Unum. Abraham -- http://mail.python.org/mailman/listinfo/python-list

Re: Outbound port on sockets

2006-09-14 Thread Sergei Organov
"bmearns" <[EMAIL PROTECTED]> writes: > Quick follow up, I'm able to connect to other external FTP sites behind > my firewall and router, no problem. You've been told already to implement PASV command in your server (then client will be able to use so called passive mode). -- Sergei. -- http:/

Re: Limitate speed of a socket-based data transferring

2006-09-14 Thread Tim Williams
On 14/09/06, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > billie schrieb: > > Hi all. I'm writing a TCP-based application that I will use to trasfer > > binary files through the network. This piece of code represents how do > > I get a file from a remote peer and save it on my local hard drive: >

Re: xinclude and pathnames

2006-09-14 Thread Tim Arnold
"Tim Arnold" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm using ElementTree to access some xml configuration files, and using > the module's xinclude capability. I've got lines like this in the parent > xml file (which lives in the same directory as the included xml file): >

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-14 Thread [EMAIL PROTECTED]
> One place where I would use such a feature is in a unittest > package. I think being able to write self.assert or self.raise > looks better than having to append an underscore. Maybe that is a good argumment for Py.Test ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: Outbound port on sockets

2006-09-14 Thread bmearns
Passive mode is implemented, the client isn't trying to use it. Besides, that doesn't really help me anyway, all it means is that I have to resolve port forwarding for the server, instead of for the client. I think what this basically comes down to is that either with PASV or PORT, there's a relat

Re: Looking for the Perfect Editor

2006-09-14 Thread Dick Moores
At 08:54 PM 9/13/2006, Jay wrote: >I, too, am a hardcore fan of jEdit. It's nice to finally see some user >support on this forum. :-) I'm trying out jEdit and UliPad. I got UliPad going right away and I'm very pleased with it, but could I jump in here with a basic jEdit question? How do you ru

Re: Outbound port on sockets

2006-09-14 Thread bmearns
It's actually 256*y + z billie wrote: > > The right format of a FTP PORT command is: > > > > PORT x,x,x,x,y,z > > > > ...where x(s) represents your IP address in dotted form and (x * y) the > > TCP port you bind. > > Sorry, I wanted to say: (y * z) -- http://mail.python.org/mailman/listinfo/pyth

Re: Outbound port on sockets

2006-09-14 Thread Steve Holden
billie wrote: [...] > The right format of a FTP PORT command is: > > PORT x,x,x,x,y,z > > where x(s) represents your IP address in dotted form and (x * y) the > TCP port you bind. That's actually x*256 + y - tou're makling a 16-bit unsigned integer from two bytes. > For further informations

Re: Help me use my Dual Core CPU!

2006-09-14 Thread Wolfgang Keller
> Are there any other concurrency options I've not discovered yet? PyMPI? Ironpython? Sincerely, Wolfgang Keller -- My email-address is correct. Do NOT remove ".nospam" to reply. -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I get the function's caller?

2006-09-14 Thread David
Il Thu, 14 Sep 2006 13:37:24 +0200, Fredrik Lundh ha scritto: [...] > in Python. Thanks to all of you! David -- http://mail.python.org/mailman/listinfo/python-list

Re: Are Python's reserved words reserved in places they dont need tobe?

2006-09-14 Thread Antoon Pardon
On 2006-09-14, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Wed, 13 Sep 2006 07:45:02 +, Antoon Pardon wrote: > This is just an idea of mine, nothing I expect python to adapt. But just suppose the language allowed for words in bold. A word in bold would be considered a reserve

Re: how are dictionary literals handled by the interpreter?

2006-09-14 Thread [EMAIL PROTECTED]
Bruno Desthuilliers wrote: > [EMAIL PROTECTED] wrote: > > I wrote up a quick little set of tests, I was acutally comparing ways > > of doing "case" behavior just to get some performance information. Now > > two of my test cases had almost identical results which was not at all > > what I expected

Re: xinclude and pathnames

2006-09-14 Thread Rob Williscroft
Tim Arnold wrote in news:[EMAIL PROTECTED] in comp.lang.python: > "Tim Arnold" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> I'm using ElementTree to access some xml configuration files, and >> using the module's xinclude capability. I've got lines like this in >> the parent x

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-14 Thread Kay Schluehr
Carl Banks wrote: > metaperl wrote: > > --> python -i > > >>> class = "algebra" > > File "", line 1 > > class = "algebra" > > ^ > > SyntaxError: invalid syntax > > >>> > > > > > > Why isn' t the parser smart enough to see that class followed by an > > identifier is used for class

Re: How do I converted a null (0) terminated string to a Python string?

2006-09-14 Thread Michael
John, Since I'm new to Python, I'm having trouble understanding what this means (see below). Would appreciate any help. if strg[-1] == "\0": strg = strg[:-1] Thanks, MDM John Machin wrote: > Fredrik Lundh wrote: > > Michael wrote: > > > > > Thanks for your reply. Just wondering... how are P

Re: Tkinter on Python 2.4 on Mac OS X?

2006-09-14 Thread Ben Kovitz
Bill Williams wrote: > "Ben Kovitz" <[EMAIL PROTECTED]> wrote: > >...I finally got the > > "Hello World" program at http://docs.python.org/lib/node718.html to > > work, but only under Python 2.3. > > > > Has anyone gotten Tkinter running with Python 2.4 on a Mac? > > > The Hello World example wor

Re: How do I converted a null (0) terminated string to a Python string?

2006-09-14 Thread John Machin
Michael wrote: > John, > > Since I'm new to Python, I'm having trouble understanding what this > means (see below). Would appreciate any help. > > if strg[-1] == "\0": If the last (i.e index -1) byte in the string equals ASCII NUL: > strg = strg[:-1] then take a slice of the string from the

Re: How do I converted a null (0) terminated string to a Python string?

2006-09-14 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, John Machin wrote: > In other words, if the last byte of strg is NUL, throw it away. > > The truly paranoid would code that as > if strg and strg[-1] etc etc > so that it wouldn't blow up if strg is empty -- strange things can > happen when you are reading other people

Re: Python to JavaScript Compiler? Anyone written such a beast?

2006-09-14 Thread fijal
Helpfull link to JS specific docs in pypy: http://codespeak.net/pypy/dist/pypy/doc/js/using.html -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I converted a null (0) terminated string to a Python string?

2006-09-14 Thread Richard Brodie
"Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I would spell it: > > if strg.endswith('\0'): >strg = strg[:-1] I would just go with: strg = strg.rstrip('\0') -- http://mail.python.org/mailman/listinfo/python-list

Re: Outbound port on sockets

2006-09-14 Thread Diez B. Roggisch
bmearns schrieb: > Passive mode is implemented, the client isn't trying to use it. > Besides, that doesn't really help me anyway, all it means is that I > have to resolve port forwarding for the server, instead of for the > client. > > I think what this basically comes down to is that either with

Re: How do I converted a null (0) terminated string to a Python string?

2006-09-14 Thread Michael
I guess, I still don't see how this will work. I'm receiving a C zero-terminated string in my Python program as a 1K byte block (UDP datagram). If the string sent was "abc", then what I receive in Python is <0> How is Python going to know where in this 1K byte block the end of the string is? It

Re: Looking for the Perfect Editor

2006-09-14 Thread stu
Dick Moores wrote: > I'm trying out jEdit and UliPad. I got UliPad going right away and > I'm very pleased with it, but could I jump in here with a basic jEdit > question? How do you run a script? > > And one more. On the menus, the font is clear and large, but the > equivalent key combinations ar

Re: How do I converted a null (0) terminated string to a Python string?

2006-09-14 Thread Robert Kern
Michael wrote: > I guess, I still don't see how this will work. I'm receiving a C > zero-terminated string in my Python program as a 1K byte block (UDP > datagram). If the string sent was "abc", then what I receive in Python > is <0> How is Python > going to know where in this 1K byte block the

Re: Outbound port on sockets

2006-09-14 Thread bmearns
> But you can restrict the numbers of ports the server will use to a > certain range! It's common for ftp to allow only for so many connections > at the same time, so reserve a port-range of 20 or so for your server > and configure the router to forward them. Thanks, I think that'll have to be my

Re: Are Python's reserved words reserved in places they dont need tobe?

2006-09-14 Thread Jason
Antoon Pardon wrote: > On 2006-09-14, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > > On Wed, 13 Sep 2006 07:45:02 +, Antoon Pardon wrote: > > > This is just an idea of mine, nothing I expect python to adapt. > But just suppose the language allowed for words in bold. A word > in b

  1   2   >