Re: very strange problem in 2.4

2006-04-07 Thread Fredrik Lundh
John Zenger wrote: > Your list probably contains several references to the same object, > instead of several different objects. This happens often when you use a > technique like: > > list = [ object ] * 100 > > ..because although this does make copies when "object" is an integer, it > just makes

Re: unicode wrap unicode object?

2006-04-07 Thread Fredrik Lundh
"ygao" <[EMAIL PROTECTED]> wrote: > >>> import sys > >>> sys.setdefaultencoding("utf-8") hmm. what kind of bootleg python is that ? >>> import sys >>> sys.setdefaultencoding("utf-8") Traceback (most recent call last): File "", line 1, in ? AttributeError: 'module' object has no attribute 'set

Re: minidom + wxPython woes

2006-04-07 Thread Frank Millman
Lonnie Princehouse wrote: > Hi all, > > I'm getting a seg fault when I try to use minidom to parse some XML > inside a wxPython app. > > I was wondering if someone else could run the simple code below on > Linux and, if it doesn't crash horribly, post which versions of > (Python, wxPython) they ar

Re: Screen placement based on screen resolution

2006-04-07 Thread Fredrik Lundh
Lonnie Princehouse wrote: > Tkinter takes strings as its arguments; it's TCL's legacy. geometry strings are an X windows thing... > You can use string formatting for this: > > x = width/2-40 > y = height/2-30 > > root.geometry('%ldx%ld+%ld+%ld' % (width, height, x, y)) note that "+%ld" (why bot

Re: Screen placement based on screen resolution

2006-04-07 Thread Fredrik Lundh
"Pat" <[EMAIL PROTECTED]> wrote: > I am trying to place a dialog in the center of the screen based on a users > screen resolution. I can get the width and height of the screen, but I can't > seem to use the following: > > root.geometry('WxH+X+Y') > > It appears the values for X and Y need to be i

freeze.py builds, but binary doesn't even run locally (shared GTK problem?)

2006-04-07 Thread kristian . hermansen
[EMAIL PROTECTED]:/tmp$ cat helloworld.py #!/usr/bin/env python import pygtk pygtk.require('2.0') import gtk class HelloWorld: def __init__(self): self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window.show() def main(self): gtk.main() if __na

Re: very strange problem in 2.4

2006-04-07 Thread Ben Cartwright
John Zenger wrote: > Your list probably contains several references to the same object, > instead of several different objects. This happens often when you use a > technique like: > > list = [ object ] * 100 This is most likely what's going on. To the OP: please post the relevant code, including

Re: output formatting for user-defined types

2006-04-07 Thread Russ
Let me just revise earlier my reply slightly. >But in any case, I suspect you do automatically convert units. What do you >do in this case: Yes, I do automatically convert units, but I only do correct conversions. Conversion from any unit other than radian to a dimensionless float is incorrect, s

Re: output formatting for user-defined types

2006-04-07 Thread Russ
> dist = 4 * ft > print >> out, dist/ft >> 4 >> Note, however, that this requires the user to explicity ask for the >> conversion. >How is this any more explicit and any less safe than: >dist = 4 * ft >print float(dist) Because the former specifies the actual units and the latter does n

Re: how you know you're a programming nerd

2006-04-07 Thread John Salerno
Ron Adam wrote: > When you are working on your programming project on Friday night instead > of going out. Ok, you win. :) Oh wait, it's Friday night and I'm typing this message...dang it! -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming Tutorial for absolute beginners

2006-04-07 Thread John Salerno
Clodoaldo Pinto wrote: > John Salerno wrote: >> Also, is the section called "pretty printing" mistitled? Doesn't that >> name refer to the pprint module? >> > I didn't think about pprint. I used pretty in the sense of "Pleasing or > attractive in a graceful or delicate way." (dictionary) > > If yo

Re: Python equivalent of Perl-ISAPI?

2006-04-07 Thread Atanas Banov
it is your loss as well (so, 2 losses and 1 win). you comparing perl-ex with python-cgi is unfair, to say the least. let's count: 1. you ditched python ASP, because you dont know how it may port on linux (even if it's supported on apache and you probably never, ever, will have to do the said port

Weekly Python Patch/Bug Summary

2006-04-07 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 391 open ( +2) / 3142 closed (+25) / 3533 total (+27) Bugs: 898 open ( -3) / 5731 closed (+44) / 6629 total (+41) RFE : 215 open ( +1) / 207 closed ( +1) / 422 total ( +2) New / Reopened Patches __ give roun

Re: Characters contain themselves?

2006-04-07 Thread Atanas Banov
congratulations for (ostensibly) discovering the Barber's paradox (if the village barber shaves all and only those who don't shave tehmselves, who shaves the barber? http://en.wikipedia.org/wiki/Barber_paradox) in python ! :-D as far as i see it, you complaint is not just that any string X contai

Re: how you know you're a programming nerd

2006-04-07 Thread Ron Adam
When you are working on your programming project on Friday night instead of going out. When you do go out, you look forward to getting home so you can work on your programming project some more. -- http://mail.python.org/mailman/listinfo/python-list

Re: very strange problem in 2.4

2006-04-07 Thread Steven D'Aprano
On Fri, 07 Apr 2006 21:18:12 -0400, John Zenger wrote: > Your list probably contains several references to the same object, > instead of several different objects. This happens often when you use a > technique like: > > list = [ object ] * 100 > > ..because although this does make copies when

ANN: pyISBNdb 0.1

2006-04-07 Thread Daniel Bickett
Package: pyISBNdb Version: 0.1 Pre-Alpha Author: Daniel Bickett <[EMAIL PROTECTED]> Website: http://heureusement.org/programming/pyISBNdb/ ABOUT: pyISBNdb is a library that serves as a pythonic interface with the ISBNdb.com API, a service that provides a vast database of book information f

Re: How to call functions in Advapi32.dll using ctypes

2006-04-07 Thread Serge Orlov
Podi wrote: > I have ctypes version 0.9.6 and Python 2.4.2 running on Windows XP > Professional. > > When I tried to use some functions in the Advapi32.dll, some functions > are available and some are not. Is this a bug or feature by design? Most likely feature by design. What you see in documenta

Appending Elements in Element Tree

2006-04-07 Thread Ron Adam
In my program I have a lot of statements that append elements, but sometimes I don't want to append the element so it requres an if statement to check it, and that requires assigning the returned element from a function to a name or calling the funtion twice. e = ET.Element('name') e

Re: very strange problem in 2.4

2006-04-07 Thread John Zenger
Your list probably contains several references to the same object, instead of several different objects. This happens often when you use a technique like: list = [ object ] * 100 ..because although this does make copies when "object" is an integer, it just makes references in other cases. [E

Re: Characters contain themselves?

2006-04-07 Thread Steven D'Aprano
On Fri, 07 Apr 2006 15:50:53 +0200, WENDUM Denis 47.76.11 (agent) wrote: > But let's go back to more earthly matters. I couldn't find any clue in a > python FAQ after having googled with the following "Python strings FAQ" > about why this design choice and how to avoid falling in this trap > wi

Re: Characters contain themselves?

2006-04-07 Thread Steven D'Aprano
On Fri, 07 Apr 2006 15:50:53 +0200, WENDUM Denis 47.76.11 (agent) wrote: > While testing recursive algoritms dealing with generic lists I stumbled > on infinite loops which were triggered by the fact that (at least for my > version of Pyton) characters contain themselves. A "character" is just

Re: Programming Tutorial for absolute beginners

2006-04-07 Thread Podi
For tutorial in Windows, I think it is better to use the more user-friendly interpreter from http://activestate.com/store/languages/register.plex?id=ActivePython. Advise the user to just click on the "Next" button without submitting the optional contact information. My $0.02 -- http://mail.pytho

Re: Why did someone write this?

2006-04-07 Thread Donn Cave
In article <[EMAIL PROTECTED]>, "Sandra-24" <[EMAIL PROTECTED]> wrote: > I can't believe I missed it in the documentation. Maybe it wasn't in > the offline version I was using, but more likely it was just one of > those things. > > So the trouble seems to be that the traceback holds a reference

Re: enviroment for Python similar to Visual C++

2006-04-07 Thread Brian Beck
Tomás Rodriguez Orta wrote: > I am new programator in python, and I am looking for an enviroment > graphics similar to visual c++, or delphi, where Can I create application > and forms, but over python? > sombody have any idea? Tomás, PythonCard is a good place to start: http://pythoncard.sourc

very strange problem in 2.4

2006-04-07 Thread conor . robinson
The Problem (very basic, but strange): I have a list holding a population of objects, each object has 5 vars and appropriate funtions to get or modify the vars. When objects in the list have identical vars (like all = 5 for var "a" and all = 10 for var "b" across all vars and objects) and i chang

How to call functions in Advapi32.dll using ctypes

2006-04-07 Thread Podi
I have ctypes version 0.9.6 and Python 2.4.2 running on Windows XP Professional. When I tried to use some functions in the Advapi32.dll, some functions are available and some are not. Is this a bug or feature by design? In the example below, I am trying to examine the 'InitiateSystemShutdown' fun

Re: minidom + wxPython woes

2006-04-07 Thread Peter Hansen
Lonnie Princehouse wrote: > Oops, I missed a bracket... that should read: > > testxml = '' > > But it still crashes ;-) Maybe missing a question mark still too? (It's like a processing instruction, not an element.) -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: output formatting for user-defined types

2006-04-07 Thread Steven D'Aprano
On Thu, 06 Apr 2006 17:14:22 -0700, Russ wrote: >>I suggest another approach: play nice with the rest of Python by allowing >>people to convert your units into strings and floats. Once they have >>explicitly done so, it isn't your problem if they want to add 35 metres to >>18 kilograms and convert

Re: calculating system clock resolution

2006-04-07 Thread jUrner
Maybe it was not too clear what I was trying to point out. I have to calculate the time time.time() requires to return the next tick of the clock. Should be about 0.01ms but this may differ from os to os. BTW (I'm new to linux) cat /proc/cpuinfo is nice but I have 2457.60 bogomips. Is this somet

Re: calculating system clock resolution

2006-04-07 Thread Serge Orlov
[EMAIL PROTECTED] wrote: > Hello all > > I have the problem of how to calculate the resolution of the system > clock. > Its now two days of head sratching and still there is nothing more than > these few lines on my huge white sheet of paper stiring at me. Lame I > know. > > import time > > t1 = ti

unicode wrap unicode object?

2006-04-07 Thread ygao
>>> import sys >>> sys.setdefaultencoding("utf-8") >>> s='\xe9\xab\x98' #this uff-8 string >>> ss=U'\xe9\xab\x98' >>> s '\xe9\xab\x98' >>> ss u'\xe9\xab\x98' >>> how do I get ss from s? Can there be a way do this? thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie wxPython questions.

2006-04-07 Thread John Ladasky
[EMAIL PROTECTED] wrote: > I am also a newbie and learning like you are. I was wondering if do you > know any wxPython forum just for GUIs ? > Good luck with your project and hope that some guru helps us out. If you are reading this via Usenet, you can subscribe to the newsgroup comp.soft-sys.wxw

Re: What does 'repair Python 2.5a1' do?

2006-04-07 Thread Martin v. Löwis
Thomas Heller wrote: > What does the repair command in the 2.5a1 msi installer do? > > Apparently it does not replace changed files, although it seems > to replace deleted files. MSI's repair procedure is somewhat complicated. Invoking repair just sets the REINSTALL property to ALL: http://msdn.

enviroment for Python similar to Visual C++

2006-04-07 Thread Tomás Rodriguez Orta
Hello friends I am new programator in python, and I am looking for an enviroment graphics similar to visual c++, or delphi, where Can I create application and forms, but over python? sombody have any idea? thanks for you help. TOMAS

Re: mod_python + apache + winxp => nogo

2006-04-07 Thread Jim Gallacher
Fuzzyman wrote: > cyberco wrote: > >>And I thought this would be trivial...getting mod_python to run within >>apache on windows XP. >> >>= >>mod_python 3.2.8 >>apache 2.0.55 >>python2.4 >>winxp >>= >> >>After adding: >>"LoadModule python_module modules/mod_python.so" >> >

Re: minidom + wxPython woes

2006-04-07 Thread Lonnie Princehouse
Oops, I missed a bracket... that should read: testxml = '' But it still crashes ;-) -- http://mail.python.org/mailman/listinfo/python-list

minidom + wxPython woes

2006-04-07 Thread Lonnie Princehouse
Hi all, I'm getting a seg fault when I try to use minidom to parse some XML inside a wxPython app. I was wondering if someone else could run the simple code below on Linux and, if it doesn't crash horribly, post which versions of (Python, wxPython) they are using? I can't find other messages rel

Re: mod_python + apache + winxp => nogo

2006-04-07 Thread Jim Gallacher
cyberco wrote: > And I thought this would be trivial...getting mod_python to run within > apache on windows XP. > > = > mod_python 3.2.8 > apache 2.0.55 > python2.4 > winxp > = > > After adding: > "LoadModule python_module modules/mod_python.so" > > to apache's httpd.conf

Re: mod_python + apache + winxp => nogo

2006-04-07 Thread Fuzzyman
cyberco wrote: > And I thought this would be trivial...getting mod_python to run within > apache on windows XP. > > = > mod_python 3.2.8 > apache 2.0.55 > python2.4 > winxp > = > > After adding: > "LoadModule python_module modules/mod_python.so" > I'm no expert - having ne

ANN: ConfigObj 4.3.0

2006-04-07 Thread Fuzzyman
`ConfigObj 4.3.0 `_ is now released. This has several bugfixes, as well as *several* major feature enhancements. You can download it from : `ConfigObj-4.3.0.zip 244Kb

Re: mod_python + apache + winxp => nogo

2006-04-07 Thread Rune Strand
I've set up that combo several times. I haven't had any problems. I just looked at apach.conf, it's the same line. Did you run the mod_python-3.2.8.win32-py2.4.exe installer? -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming Tutorial for absolute beginners

2006-04-07 Thread Clodoaldo Pinto
John Salerno wrote: > > Also, is the section called "pretty printing" mistitled? Doesn't that > name refer to the pprint module? > I didn't think about pprint. I used pretty in the sense of "Pleasing or attractive in a graceful or delicate way." (dictionary) If you have any suggestions for that pa

Re: Why did someone write this?

2006-04-07 Thread Sandra-24
I can't believe I missed it in the documentation. Maybe it wasn't in the offline version I was using, but more likely it was just one of those things. So the trouble seems to be that the traceback holds a reference to the frame where the exception occurred, and as a result a local variable that re

Re: Programming Tutorial for absolute beginners

2006-04-07 Thread Clodoaldo Pinto
bill pursell wrote: > 1) in the section on the interactive interpreter you have the sentence: > "In Linux open a shell and type python (must be lower case)". It > would be nice if the word 'python' were in a different font, or perhaps > in quotes, or something. You're targetting the "absolute beg

mod_python + apache + winxp => nogo

2006-04-07 Thread cyberco
And I thought this would be trivial...getting mod_python to run within apache on windows XP. = mod_python 3.2.8 apache 2.0.55 python2.4 winxp = After adding: "LoadModule python_module modules/mod_python.so" to apache's httpd.conf, apache refuses to start, saying: "cannot

Object Tracking Library

2006-04-07 Thread Joseph Chase
Does anyone know of any python libraries or examples for tracking objects across a series of images? Any help is greatly appreciated. Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming Tutorial for absolute beginners

2006-04-07 Thread John Salerno
bill pursell wrote: > 1) in the section on the interactive interpreter you have the sentence: > "In Linux open a shell and type python (must be lower case)". It > would be nice if the word 'python' were in a different font, or perhaps python would be good there. > 2) In the section on installin

Re: Programming Tutorial for absolute beginners

2006-04-07 Thread bill pursell
Clodoaldo Pinto wrote: > I'm starting a programming tutorial for absolute beginners using Python > and I would like your opinions. > > http://programming-crash-course.com Very nicely laid out. Overall, a really nice presentation. 2 minor points: 1) in the section on the interactive interpreter

Re: calculating system clock resolution

2006-04-07 Thread MrJean1
Depends iff you are using Linux, print cat /proc/cpuinfo and look for the line "cpu ...Hz: ...". Parsing that would be straightforward. Keep in mind, the time.time() function reports the "wall clock" time, which usually has up to a millisecond resolution, regardless of the CPU speed.

Re: socket.socket.settimeout implementation

2006-04-07 Thread Lawrence D'Oliveiro
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: >Now my observation on FC4 ( kernel version 2.6.11-1.1369_FC4) >"select()" can return before timeout with a >"Interrupted system call" (EINTR) error, Nothing Red-Hat-specific, or even Linux-specific, about this. It's a standard *nix thin

Re: how you know you're a programming nerd

2006-04-07 Thread John Salerno
Levi Campbell wrote: > You know you're addicted to a programming language when you have dreams > about it. Me? Addicted? No! Now back to the Python Challenge.. -- http://mail.python.org/mailman/listinfo/python-list

Re: GUI Treeview

2006-04-07 Thread Arne
If possible for the Tkinter frameworkt. Thanks Arne "Peter Hansen" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Arne wrote: >> Hello ! >> >> I am looking for a widget with the following properties: >> - showing the tree file structure/ directory structure >> - next to each

Re: wxPython and SuSE 10.0

2006-04-07 Thread Jorge Godoy
Steve <[EMAIL PROTECTED]> writes: > I was wondering if there is a wxPython RPM for SuSE 10.0 available. I > Googled for it with no luck, but I'm hopeful that there is one out > there. There are RPMs within SuSE's DVD / CDs, IIRC. Anyway, you can get it with Apt, smart and even YaST. --

Re: python on Mac

2006-04-07 Thread Lawrence D'Oliveiro
In article <[EMAIL PROTECTED]>, "pierreth" <[EMAIL PROTECTED]> wrote: >You removed /usr/bin/python! This is a really bad idea Is there any way to put it back, short of a full system reinstall? -- http://mail.python.org/mailman/listinfo/python-list

Re: win32com

2006-04-07 Thread floris . vannee
Thanks :) For people who are also having this problem. The VB .NET code to import that COM object is: dim com_object as object com_object = CreateObject("Python.TestServer") 'Python.TestServer in this case, but for different programs, different names of course. And in order to get it work you ne

Re: how you know you're a programming nerd

2006-04-07 Thread Levi Campbell
John Salerno wrote: > So last night I had a dream that me and two other guys needed to get a > simple task done in Java. We were staring at the problem in confusion > and I kept saying "First we have to create a class, then instantiate it, > then..." etc. etc. They didn't agree with me so we kept a

Re: GUI Treeview

2006-04-07 Thread Peter Hansen
Arne wrote: > Hello ! > > I am looking for a widget with the following properties: > - showing the tree file structure/ directory structure > - next to each file should be a checkbox > - the tree should only show certain files (i. e. only for the looked in > user) For which GUI framework? (e.g.

Re: Newbie wxPython questions.

2006-04-07 Thread chris
Oh, by the way... in your frame's constructor (the Frame1.__init__), you'll have to make "parent" a member variable of the class so that OnCloseMe has access to it. I.e., in the __init__ add self.FrameParent = parent Then in OnCloseMe do: self.FrameParent.Close() -- http://mail.python.org/mailm

Re: Newbie wxPython questions.

2006-04-07 Thread callmebill
Instead of self.Close(), try parent.Close() The self.Close() is closing self, which is a panel. The panel's parent is the frame. This will let you keep the button on the frame, which eliminates the spacing problem. I'm not gonna test it, cuz the darn lines wrap and make it difficult to copy you

Programming Tutorial for absolute beginners

2006-04-07 Thread Clodoaldo Pinto
I'm starting a programming tutorial for absolute beginners using Python and I would like your opinions. http://programming-crash-course.com Regards, Clodoaldo Pinto -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie wxPython questions.

2006-04-07 Thread diffuser78
I am also a newbie and learning like you are. I was wondering if do you know any wxPython forum just for GUIs ? Good luck with your project and hope that some guru helps us out. -- http://mail.python.org/mailman/listinfo/python-list

calling the java jar utility from python

2006-04-07 Thread Jonathan Crowell
Hi.  I want to invoke the java jar utility from my python script and pass it a couple of arguments.  Can anyone tell me how to do this? Thanks, Jon -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error

Re: Screen placement based on screen resolution

2006-04-07 Thread Pat
Thanks. S "Lonnie Princehouse" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Tkinter takes strings as its arguments; it's TCL's legacy. You can use > string formatting for this: > > x = width/2-40 > y = height/2-30 > > root.geometry('%ldx%ld+%ld+%ld' % (width, height, x, y)) >

Re: Characters contain themselves?

2006-04-07 Thread Bruno Desthuilliers
WENDUM Denis 47.76.11 (agent) a écrit : > > While testing recursive algoritms dealing with generic lists I stumbled > on infinite loops which were triggered by the fact that (at least for my > version of Pyton) characters contain themselves. There is *no* character type in Python. 'a' is a stri

Re: Screen placement based on screen resolution

2006-04-07 Thread Lonnie Princehouse
Tkinter takes strings as its arguments; it's TCL's legacy. You can use string formatting for this: x = width/2-40 y = height/2-30 root.geometry('%ldx%ld+%ld+%ld' % (width, height, x, y)) -- http://mail.python.org/mailman/listinfo/python-list

Re: win32com

2006-04-07 Thread M�ta-MCI
Hi! Answer in the mailing-list. @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: best way to install python modules on linux

2006-04-07 Thread Paul Boddie
Fabian Braennstroem wrote: > > I am pretty new to python and will use it mainly in > combination with scientific packages. I am running ubuntu > breezy right now and see that some packages are out of date. You can quite often backport some of the newer packages from packages.ubuntu.com, although t

Re: best way to install python modules on linux

2006-04-07 Thread flamesrock
You should consider gentoo as it big on python with all the latest packages. And no, installing doesn't take much effort. -- http://mail.python.org/mailman/listinfo/python-list

Re: how you know you're a programming nerd

2006-04-07 Thread jUrner
Keep on coding. It'll just go away.. -- http://mail.python.org/mailman/listinfo/python-list

Re: best way to install python modules on linux

2006-04-07 Thread Robert Kern
Fabian Braennstroem wrote: > Hi, > > I am pretty new to python and will use it mainly in > combination with scientific packages. I am running ubuntu > breezy right now and see that some packages are out of date. > Do you have any suggestion, how I can get/keep the latest > python modules (e.g. sci

Re: wxPython Question

2006-04-07 Thread diffuser78
Thanks, I use Ubuntu Linux and there is tool called xchm which lets you do that. RunLevelZero wrote: > Well you will need to download the " docs demos and tools " and that > contains a windows help file that is easily searchable. If you run > Linux there is a Gnome tool to run the help file in L

calculating system clock resolution

2006-04-07 Thread jUrner
Hello all I have the problem of how to calculate the resolution of the system clock. Its now two days of head sratching and still there is nothing more than these few lines on my huge white sheet of paper stiring at me. Lame I know. import time t1 = time.time() while True: t2 = time.time()

What does 'repair Python 2.5a1' do?

2006-04-07 Thread Thomas Heller
What does the repair command in the 2.5a1 msi installer do? Apparently it does not replace changed files, although it seems to replace deleted files. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Why did someone write this?

2006-04-07 Thread Benjamin Niemann
Sandra-24 wrote: > try: >exc_type, exc_value, exc_traceback = sys.exc_info() ># Do something > finally: >exc_traceback = None > > Why the try/finally with setting exc_traceback to None? The python docs > didn't give me any clue, and I'm wondering what this person knows that > I don't.

Screen placement based on screen resolution

2006-04-07 Thread Pat
I am trying to place a dialog in the center of the screen based on a users screen resolution. I can get the width and height of the screen, but I can't seem to use the following: root.geometry('WxH+X+Y') It appears the values for X and Y need to be integers and not a variable like width/2-40 S

how to use urllib2 to get a page with a socks 5 proxy?

2006-04-07 Thread Ju Hui
example, the proxy server is :123.123.123.123 and the port is :1080 and the username/password is : user/pass I want to open http://www.google.com how to write this script? thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: glob and curly brackets

2006-04-07 Thread gry
This would indeed be a nice feature. The glob module is only 75 lines of pure python. Perhaps you would like to enhance it? Take a look. -- http://mail.python.org/mailman/listinfo/python-list

os.execvp() is giving me trouble

2006-04-07 Thread Jonathan Crowell
Hi All, Sorry if this is a newbie question.  I promise I have RTFMed, though. Here goes: I'm trying to invoke an external program from python.  The program is jar.exe, which is part of java.  The following is the command I want to send: jar -xvf file1.jar jile2.jar file3.jar os.execvp(file, a

best way to install python modules on linux

2006-04-07 Thread Fabian Braennstroem
Hi, I am pretty new to python and will use it mainly in combination with scientific packages. I am running ubuntu breezy right now and see that some packages are out of date. Do you have any suggestion, how I can get/keep the latest python modules (e.g. scipy, numpy,...) on my ubuntu system? I.e.

Re: wxPython Question

2006-04-07 Thread RunLevelZero
Well you will need to download the " docs demos and tools " and that contains a windows help file that is easily searchable. If you run Linux there is a Gnome tool to run the help file in Linux if you so wish. -- http://mail.python.org/mailman/listinfo/python-list

Python+GNU/Linux+Oracle 10 g Express Edition+cx_Oracle

2006-04-07 Thread [EMAIL PROTECTED]
Hi!! I'd like to install Oracle 10 g express edition over Ubuntu to use with Python 2.4. I have installed Ubuntu, Python 2.4 and Oracle database. I think that I have installed correctly cx_Oracle because I have cx_Oracle.so in /usr/share/python2.4/site-packages/ directory. My environment variables

Re: how you know you're a programming nerd

2006-04-07 Thread John Salerno
[EMAIL PROTECTED] wrote: > John Salerno wrote: >> So last night I had a dream that me and two other guys needed to get a >> simple task done in Java. We were staring at the problem in confusion >> and I kept saying "First we have to create a class, then instantiate it, >> then..." etc. etc. They di

Newbie wxPython questions.

2006-04-07 Thread nuffnough
I am running through the wxPython guide and docs and extrapolating enough to get confused. BAsed on the tute in the getting started wiki I created a panel that has most of the elements I want; some check boxes and a couple of buttons. The button I have is a simple thing that is supposed to just

Re: Jpype on RHEL v3

2006-04-07 Thread benchline
I found the problem. So if anyone else has it here is the fix. In the documentation distributed with JPype 0.5.1 in the examples/linux directory, there is a file that describes a problem with loading the jvm on linux. So one needs to modify the LD_LIBRARY_PATH environment variable to fix it. I

Re: UnicodeDecodeError help please?

2006-04-07 Thread Ben C
On 2006-04-07, Robin Haswell <[EMAIL PROTECTED]> wrote: > Okay I'm getting really frustrated with Python's Unicode handling, I'm > trying everything I can think of an I can't escape Unicode(En|De)codeError > no matter what I try. > > Could someone explain to me what I'm doing wrong here, so I can h

Re: how you know you're a programming nerd

2006-04-07 Thread [EMAIL PROTECTED]
John Salerno wrote: > So last night I had a dream that me and two other guys needed to get a > simple task done in Java. We were staring at the problem in confusion > and I kept saying "First we have to create a class, then instantiate it, > then..." etc. etc. They didn't agree with me so we kept

Re: updated pre-PEP: The create statement

2006-04-07 Thread Steven Bethard
Carl Banks wrote: > Steven Bethard wrote: >> I've updated the PEP based on a number of comments on comp.lang.python. >> The most updated versions are still at: >> >> http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt >> http://ucsu.colorado.edu/~bethard/py/pep_create_statement.

Re: Calling Web Services from Python

2006-04-07 Thread John Salerno
Ivan Zuzak wrote: > I need a package/tool that generates web service proxies that will do > all the low-level HTTP work. (Someting like the WSDL.EXE tool in .NET > Framework) The ZSI and SOAPy packages [1] that i found (should) have > those functionalities but either have a bug (SOAPy) or eithe

Re: UnicodeDecodeError help please?

2006-04-07 Thread Paul Boddie
Robin Haswell wrote: > Okay I'm getting really frustrated with Python's Unicode handling, I'm > trying everything I can think of an I can't escape Unicode(En|De)codeError > no matter what I try. If you follow a few relatively simple rules, the days of Unicode errors will be over. Let's take a look

Calling Web Services from Python

2006-04-07 Thread Ivan Zuzak
Hello, My Python application calls web services available on the Internet. The web service being called is defined through application user input. The Python built-in library allows access to web services using HTTP protocol, which is not acceptible - generating SOAP messages for arbitrary web

Re: Why did someone write this?

2006-04-07 Thread skip
Sandra> try: Sandra>exc_type, exc_value, exc_traceback = sys.exc_info() Sandra># Do something Sandra> finally: Sandra>exc_traceback = None Sandra> Why the try/finally with setting exc_traceback to None? The intent is to decrement the reference count to any obj

win32com

2006-04-07 Thread floris . vannee
Hi, Is it possible to create a com server in python and then access that server using VB .NET, for example using the following code. A very basic com server i found in a tutorial about win32com: class HelloWorld: _reg_clsid_ = "{7CC9F362-486D-11D1-BB48-E838A65F}" _reg_desc_ = "Python

Re: "The World's Most Maintainable Programming Language"

2006-04-07 Thread bruno at modulix
Peter Hansen wrote: > Mirco Wahab wrote: > >> Hi Ralf >> >>> So we should rename Python into Cottonmouth to get more attention. >> >> >> No, always take some word that relates to >> something more or less 'feminine', its about >> 96% of young males who sit hours on programming >> over their belove

Jpype on RHEL v3

2006-04-07 Thread benchline
I have been trying out jpype for python to java work and love it. It works great on my gentoo box with the java 1.4.2 blackdown sdk. I am now trying it on Red Hat Enterprise Linux 3 for access to business intelligence tools (JasperReports, Mondrian, Pentaho, etc) for which we don't have analogous

Re: FTP

2006-04-07 Thread Fredrik Lundh
"Arne" <[EMAIL PROTECTED]> wrote: > I want to connecto to a ftp server. There I woult like to read the > directiroy and getting the filename, file owner and the file size. > > How can I do this in python and if possible please post the code for it. there's an example in the library reference that

Re: FTP

2006-04-07 Thread Rene Pijlman
Arne: >I want to connecto to a ftp server. There I woult like to read the >directiroy and getting the filename, file owner and the file size. > >How can I do this in python http://docs.python.org/lib/module-ftplib.html -- René Pijlman -- http://mail.python.org/mailman/listinfo/python-list

Why did someone write this?

2006-04-07 Thread Sandra-24
try: exc_type, exc_value, exc_traceback = sys.exc_info() # Do something finally: exc_traceback = None Why the try/finally with setting exc_traceback to None? The python docs didn't give me any clue, and I'm wondering what this person knows that I don't. Thanks, -Sandra -- http://mail.p

Re: UnicodeDecodeError help please?

2006-04-07 Thread Fredrik Lundh
Robin Haswell wrote: > Could someone explain to me what I'm doing wrong here, so I can hope to > throw light on the myriad of similar problems I'm having? Thanks :-) > > Python 2.4.1 (#2, May 6 2005, 11:22:24) > [GCC 3.3.6 (Debian 1:3.3.6-2)] on linux2 > Type "help", "copyright", "credits" or "li

Re: UnicodeDecodeError help please?

2006-04-07 Thread Robert Kern
Robin Haswell wrote: > Okay I'm getting really frustrated with Python's Unicode handling, I'm > trying everything I can think of an I can't escape Unicode(En|De)codeError > no matter what I try. Have you read any of the documentation about Python's Unicode support? E.g., http://effbot.org/zone/

  1   2   >