Michael B. Trausch wrote:
> Hello,
>
> Every programming example that I have seen thus far shows simple
> server code and how to bind to a socket--however, every example binds
> to the localhost address. What I am wondering is this: Is there a
> clean way to get the networked IP address of the
Replying via Steve's not to (I think) a comment from Michael Hobbs
(apologies to Steve):
>> The FAQ says that the colon increases readability, but I'm
>> skeptical. The indentation seems to provide more than enough of a
>> visual clue as to where the if conditional ends.
I use four-sp
Ron Adam wrote:
> The faq also pointed out a technical reason for requiring the colon. It
> makes
> the underlying parser much easier to write and maintain. This shouldn't be
> taken to lightly in my opinion, because a simpler easer to maintain and more
> reliable python parser means developm
"ronrsr" <[EMAIL PROTECTED]> wrote:
> the exact code that is triggering the error message is:
>
> zc = zsql.connect()
individual statements don't "trigger" syntax errors; they're compiler
errors, and only
appear when do something that causes code to be compiled.
> exact error message: SyntaxEr
I am looking for a PDF to text script. I am working with multibyte
language PDFs on Windows Xp. I need to batch convert them to text and
feed into an encoding converter program
Thanks for any help in this regard
--
http://mail.python.org/mailman/listinfo/python-list
Yes the browser suggests a file name, but I did a little research using
http://web-sniffer.net/. The Response Header contains roughly this:
HTTP Status Code: HTTP/1.1 302 Found
Location: http://page.com/filename.zip
Content-Length: 0
Connection: close
Content-Type: text/html
The status code 302 t
On 2006-11-10, Steve Holden <[EMAIL PROTECTED]> wrote:
>>> But I don't insist on my PEP. The example just shows just
>>> another pitfall with Unicode and why I'll advise to any
>>> beginner: Never write text constants that contain non-ascii
>>> chars as simple strings, always make them Unicode stri
[EMAIL PROTECTED] schrieb:
> Thanks again for making time to comment - insights into the perspective
> of the author are invaluable. But if by chance you have time to
> continue:
>
>> > > http://effbot.org/pyfaq/suggest.htm
>> > http://docs.python.org/dev/lib/ctypes-return-types.html
>> A note co
ronrsr wrote:
> the syntax error comes in the main program, in any line that follows
> the import statement.
>
in which case, don't you think it might be the "import" statement that's
causing the problem. What is stopping you from showing us the whole
source? Or at least the import statement as
[EMAIL PROTECTED] schrieb:
>> > > > http://effbot.org/pyfaq/suggest.htm
>> > > FAQ: How do I say returns void in ctypes?
>> > That's in the ctypes documentation, where it belongs.
>>
>> Thank you, before I never had found "Use None for void a function not
>> returning anything" at:
>> http://starsh
ronrsr wrote:
> the exact code that is triggering the error message is:
>
> zc = zsql.connect()
Don't give us one line; give us the whole of the imported module plus
the calling script (at least up to the place where it gets the error).
That way we can see what is really going on, and someone wit
Marc 'BlackJack' Rintsch wrote:
> No it doesn't -- look again at the example given above. It's
> legal syntax in Python but doesn't have the semantics implied by
> the example.
Sorry, I don't understand -- what is the difference between the
example as it is and the implied semantics of it?
Rega
I think I'm still missing something in how python is handling packages
and it's mixing me up. I have a package with three files (modules?)
like so:
OPS:\
__init__.py
model.py
search.py
To hide more details of the package structure, I import model and
search inside of __init__. It also seeme
Danny Scalenotti wrote:
> I'm not able to get out of this ...
>
>
> from xml.dom.minidom import getDOMImplementation
>
> impl = getDOMImplementation() // default UTF-8
> doc = impl.createDocument(None, "test",None)
> root = doc.documentElement
Here, you're actually getting a reference to the
On 2006-11-10 15:24:50 -0500, Bjoern Schliessmann
<[EMAIL PROTECTED]> said:
> Marc 'BlackJack' Rintsch wrote:
>
>> No it doesn't -- look again at the example given above. It's
>> legal syntax in Python but doesn't have the semantics implied by
>> the example.
>
> Sorry, I don't understand -- w
John Salerno wrote:
>> Anyway, the FAQ answer seems to be a
>> weak argument to me.
>
> I agree. I was expecting something more technical to justify the colon,
> not just that it looks better.
yeah, the whole idea of treating programming languages as an interface
between people and computers
Jorge Vargas wrote:
> On 9 Nov 2006 18:09:37 -0800, John Machin <[EMAIL PROTECTED]> wrote:
> >
> > Jorge Vargas wrote:
> > > On 9 Nov 2006 16:44:40 -0800, gavino <[EMAIL PROTECTED]> wrote:
> > > > both are interpreted oo langauges..
> > > >
> > > that is not correct java is compiled and the VM
[EMAIL PROTECTED] wrote:
> from model import *
> from search import *
>
> def create_connection():
> # details are unimportant for this example
>
>
> When I try to use the create_connection function in model, I get errors
> when I use it as a global function ( just create_connection()).
impo
[EMAIL PROTECTED] wrote:
> I think I'm still missing something in how python is handling packages
> and it's mixing me up. I have a package with three files (modules?)
> like so:
>
> OPS:\
> __init__.py
> model.py
> search.py
>
> To hide more details of the package structure, I import model
Bjoern Schliessmann wrote:
> Marc 'BlackJack' Rintsch wrote:
>
>> No it doesn't -- look again at the example given above. It's
>> legal syntax in Python but doesn't have the semantics implied by
>> the example.
>
> Sorry, I don't understand -- what is the difference between the
> example as it
>>> color='orange'
>>> if color=='red' or 'blue' or 'green':
print "Works?"
Works?
>>>
--
http://mail.python.org/mailman/listinfo/python-list
On 2006-11-10 15:47:42 -0500, Max Erickson <[EMAIL PROTECTED]> said:
color='orange'
if color=='red' or 'blue' or 'green':
> print "Works?"
>
>
> Works?
No! No no no. I won't hear of it.
Don't you know that with insufficient test cases, everything is right? Sheesh.
Best,
Michael Hobbs wrote:
> Ron Adam wrote:
>> The faq also pointed out a technical reason for requiring the colon. It
>> makes
>> the underlying parser much easier to write and maintain. This shouldn't be
>> taken to lightly in my opinion, because a simpler easer to maintain and more
>> reliable
James Cunningham wrote:
> On 2006-11-10 15:24:50 -0500, Bjoern Schliessmann
> <[EMAIL PROTECTED]> said:
>
>> Marc 'BlackJack' Rintsch wrote:
>>
>>> No it doesn't -- look again at the example given above. It's
>>> legal syntax in Python but doesn't have the semantics implied by
>>> the example.
>
I think I know now where my problems come from. I spare you boring
implementation code.
The case look like this: I parse xml file something a like
1 <\a>
2 <\a>
3 <\a>
4<\b>
<\X>
<\a>
<\a>
<\a>
<\b>
<\X>
I suc
Ron Adam wrote:
> It is also an outline form that frequently used in written languages.
> Something
> python tries to do, is to be readable as if it were written in plain language
> where it is practical to do so. So the colon/outline form makes a certain
> sense
> in that case as well.
>
Fredrik Lundh wrote:
> >>> color = "blue"
> >>> if color == "red" or "green" or "yellow":
> ... print color, "is red or green or yellow"
> ...
> blue is red or green or yellow
Whoops. Okay.
Regards,
Björn
--
BOFH excuse #303:
fractal radiation jamming the backbone
--
http://mail.pyt
Hi. I'm new to Python. :)
I've modified grappy.py,
http://www.stacken.kth.se/~mattiasa/projects/grappy/, a postfix policy
daemon for greylisting. to use LDAP as a backend instead of SQL (with
python-ldap.) The daemon runs fine when testing but when I put it under
load it core dumps quickly.
At Friday 10/11/2006 08:15, DarkPearl wrote:
>apres avoir créer un service windows avec py2exe,
>j'ai ce probleme quand je lance le service :
>
>voici ce que je trouve dans le journal d'evenement :
>
>The instance's SvcRun() method failed
>: (-2147221020, 'Syntaxe incorrecte',
>None, None)
Try wi
At Friday 10/11/2006 18:05, consternation wrote:
def __init__
self.mem={}
I googled a way how to add elements to dict, I have read the code not the
description below
self.mem[key] = value
I strongly suggest you read some introductory Python docs, like
http://docs.python.org/tut/tut.html o
Neil Cerutti wrote:
> On 2006-11-10, Steve Holden <[EMAIL PROTECTED]> wrote:
> >>> But I don't insist on my PEP. The example just shows just
> >>> another pitfall with Unicode and why I'll advise to any
> >>> beginner: Never write text constants that contain non-ascii
> >>> chars as simple strings,
At Friday 10/11/2006 14:11, Alan G Isaac wrote:
My class MyClass reuses many default parameters
with a small number of changes in each instance.
For various reasons I decided to put all the
parameters in a separate Params class, instances
of which reset the default values based on keyword
argume
I am trying to change the width of a widget based on pixel size and not
on characters. I can't figure out how to do this.
Normally to change to the size of a widget it looks like:
widget.configure(width = x)
However that is in characters, not in pixels. To retrieve the actual
size of a widget, I
"Jorge Vargas" <[EMAIL PROTECTED]> writes:
> code. In python noone runs the pyc files, the interpreter takes care
> of this for you.
This is not true. It is one way to avoid having your source lying around.
The same can be done with .pyo...
--
Jorge Godoy <[EMAIL PROTECTED]>
--
http://m
At Friday 10/11/2006 16:58, Sven wrote:
Yes the browser suggests a file name, but I did a little research using
http://web-sniffer.net/. The Response Header contains roughly this:
HTTP Status Code: HTTP/1.1 302 Found
Location: http://page.com/filename.zip
Content-Length: 0
Connection: close
Con
Melissa Evans schrieb:
> I've modified grappy.py,
> http://www.stacken.kth.se/~mattiasa/projects/grappy/, a postfix policy
> daemon for greylisting. to use LDAP as a backend instead of SQL (with
> python-ldap.) The daemon runs fine when testing but when I put it under
> load it core dumps quickly.
You can get educated in java through manpower for free just apply for a
job(through thier online learning thing) but you can't add python to
your plan. :( They have pearl, c, basic, cobol also but no
python.
https://sourceforge.net/project/showfiles.php?group_id=156455
gavino wrote:
> both
In article <[EMAIL PROTECTED]>,
Vyz <[EMAIL PROTECTED]> wrote:
>I am looking for a PDF to text script. I am working with multibyte
>language PDFs on Windows Xp. I need to batch convert them to text and
>feed into an encoding converter program
>
>Thanks for any help in this regard
>
http://phaseit.
I've got an inheritance question and was hoping brighter minds could
guide me. I am in the strange situation where some of the methods in a
subclass are actually more general than methods in a superclass. What
is the preferred way to handle such situations. My original thought was
to do somethin
Michael Hobbs wrote:
> Ron Adam wrote:
>> It is also an outline form that frequently used in written languages.
>> Something
>> python tries to do, is to be readable as if it were written in plain
>> language
>> where it is practical to do so. So the colon/outline form makes a certain
>> sen
Steven Bethard wrote:
> Here's the recipe I use::
>
> [...]
>
> There may be some special cases where this fails, but I haven't run into
> them yet.
Wow, that's a really nice recipe; I didn't even know about the copy_reg
module. I'll have to start using that.
I did notice one failure mode,
Robin Becker wrote:
> Robin Becker wrote:
>> Andrew MacIntyre wrote:
>>> Robin Becker wrote:
>>>
I think it uses sysv semaphores and although freeBSD 6 has them
perhaps there's something I need to do to allow them to work.
>>> IIRC, you need to explicitly configure loading the kernel mod
On Fri, 10 Nov 2006 21:24:50 +0100, Bjoern Schliessmann wrote:
> Marc 'BlackJack' Rintsch wrote:
>
>> No it doesn't -- look again at the example given above. It's
>> legal syntax in Python but doesn't have the semantics implied by
>> the example.
>
> Sorry, I don't understand -- what is the dif
On Fri, 10 Nov 2006 10:37:08 -0600, Michael Hobbs wrote:
> The FAQ says that the colon increases
> readability, but I'm skeptical. The indentation seems to provide more
> than enough of a visual clue as to where the if conditional ends.
and then in a later post:
> Like I said in that paragraph,
On Fri, 10 Nov 2006 15:18:55 -0600, Michael Hobbs wrote:
> Ron Adam wrote:
>> It is also an outline form that frequently used in written languages.
>> Something
>> python tries to do, is to be readable as if it were written in plain
>> language
>> where it is practical to do so. So the colon
On 2006-11-09 14:06:06 -0500, "Dan Lenski" <[EMAIL PROTECTED]> said:
> [snip]
>
> My understanding is that wx wraps Windows, OSX, Qt, and GTK+... I guess
> some of the wrappers fit the native apps better than others?
>
> Dan
WxWidgets does wrap Windows, OS X (Carbon), and GTK; it does not wrap
On 5 Nov 2006 04:34:32 -0800, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi,
> I have a string '((1,2), (3,4))' and I want to convert this into a
> python tuple of numbers. But I do not want to use eval() because I do
> not want to execute any code in that string and limit it to list of
> num
hi,
Can anyone tell me how to create a soap web service and generate it's
WSDL file??
I've tried so har to do so but no results.
cheers
OnemoverX
--
http://mail.python.org/mailman/listinfo/python-list
At Friday 10/11/2006 21:13, Jackson wrote:
I've got an inheritance question and was hoping brighter minds could
guide me. I am in the strange situation where some of the methods in a
subclass are actually more general than methods in a superclass. What
is the preferred way to handle such situa
Ron Adam wrote:
>
> PS. Rather than shav of on character her and ther in pythons programing
> languag, Lets remov all the silent leters from the english languag. That will
> sav thousands mor kestroks over a few yers.
How about changing Python to support keywords and identifiers employing
the Ini
On Fri, 10 Nov 2006 13:16:32 -0600, Michael Hobbs wrote:
> Yeah, okay, I didn't read through the details of the PEP. I picked a bad
> example to illustrate a point that is still true. The FAQ also tries to
> argue that it's a Good Thing that join() is a string method, not a list
> method. It al
Steven D'Aprano wrote:
> And just for the avoidance of doubt, Python "x == blue or red or
> yellow" is semantically equivalent to:
>
> (x == blue) or bool(red) or bool(yellow)
Yep, got it. Shame on me, it's so obvious now :)
Regards,
Björn
--
BOFH excuse #317:
Internet exceeded Luser level
Gabriel Genellina wrote:
> If walking in general, have some common structure, you can put the
> "sketch" on Legs and let the derived classes "fill the gaps". This is
> known as "Template Method Pattern" - look for it.
Or if you'd rather see a concrete example, here's how your toy example
would lo
Vyz wrote:
> I am looking for a PDF to text script. I am working with multibyte
> language PDFs on Windows Xp. I need to batch convert them to text and
> feed into an encoding converter program
>
> Thanks for any help in this regard
Multibyte languages are not easy. I do text extraction from PDF
On 9 Nov 2006 22:48:10 -0800, "John Henry" <[EMAIL PROTECTED]>
wrote:
>Upon closer look, the walkthrough did say:
>
>***
>from PythonCard import model
>
>Change that so it says:
>
>from PythonCard import dialog, model
>
>Save the code.
>***
>
>So, it
On 9 Nov 2006 09:13:00 -0800, Dan Lenski <[EMAIL PROTECTED]> wrote:
> Nick and John S., thank you for the tip on wxPython! I'll look into it
> for my next project. I too would avoid Qt, not because of the GPL but
> simply because I don't use KDE under Linux and because Qt is not well
> supported
Steven> The world seems to be flat, the sun appears to rotate around the
Steven> Earth, and mushrooms look like they are more closely related to
Steven> plants than to animals, but none of these things are actually
Steven> the case.
Where can I read about mushrooms as animals?
Sk
For various reasons, I've found myself in the position of needing to
automate the operation of a small VB6 application from an external
process. After a bit of searching, I found watsup, and it has fit the
bill nicely, except for one problem.
Roughly, I have a script that fills in a field, sets
Thank you all so much for all the replies:)
But sorry I'm so dumb I can't say I really understand,
what do I actually do when I define a function with its name "number"?
why does a name of a function has something to do with a variable?
Oh wait can I do this in Python?:
def a():
def b()
so
On Fri, 10 Nov 2006 22:41:53 -0600, skip wrote:
>
> Steven> The world seems to be flat, the sun appears to rotate around the
> Steven> Earth, and mushrooms look like they are more closely related to
> Steven> plants than to animals, but none of these things are actually
> Steven>
Jackson wrote:
> I've got an inheritance question and was hoping brighter minds could
> guide me. I am in the strange situation where some of the methods in a
> subclass are actually more general than methods in a superclass. What
> is the preferred way to handle such situations. My original th
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
8<---
> >>> color = "blue"
> >>> if color == "red" or "green" or "yellow":
> ... print color, "is red or green or yellow"
> ...
> blue is red or green or yellow
*grin* - this can be construed as a wea
Steven D'Aprano wrote:
> On Fri, 10 Nov 2006 21:24:50 +0100, Bjoern Schliessmann wrote:
>
>> Marc 'BlackJack' Rintsch wrote:
>>
>>> No it doesn't -- look again at the example given above. It's
>>> legal syntax in Python but doesn't have the semantics implied by
>>> the example.
>> Sorry, I don't
At Saturday 11/11/2006 02:35, Camellia wrote:
But sorry I'm so dumb I can't say I really understand,
what do I actually do when I define a function with its name "number"?
Don't apologize, Python is a lot more dumb than you. It obeys very
simple rules (a good thing, so we can clearly understa
Paul Boddie wrote:
> Ron Adam wrote:
>> PS. Rather than shav of on character her and ther in pythons programing
>> languag, Lets remov all the silent leters from the english languag. That will
>> sav thousands mor kestroks over a few yers.
>
> How about changing Python to support keywords and ide
At Saturday 11/11/2006 03:31, Frank Millman wrote:
Continuing your analogy of animals, assume a class A with a 'walk'
method and an 'eat' method.
Most animals walk the same way, but a few don't, so I create a subclass
AW and override the walk method.
Most animals eat the same way, but a few do
Michael Hobbs wrote:
> Yeah, okay, I didn't read through the details of the PEP. I picked a bad
> example to illustrate a point that is still true. The FAQ also tries to
> argue that it's a Good Thing that join() is a string method, not a list
> method. It also tries to argue that there's a goo
Hendrik van Rooyen wrote:
>> blue is red or green or yellow
>
> *grin* - this can be construed as a weakness in Python -
it's boolean logic, and it's incompatible with human use of the same
terms in all contexts, not just Python.
--
http://mail.python.org/mailman/listinfo/python-list
101 - 168 of 168 matches
Mail list logo