Re: Problem loading a file of words

2005-07-25 Thread Peter Otten
teoryn wrote: I've been spending today learning python and as an exercise I've ported a program I wrote in java that unscrambles a word. Before describing the problem, here's the code: line = str.lower(line[:-1]) # convert to lowercase just in case have to add exceptions later).

Re: Clearing a Text Widget

2005-07-25 Thread Eric Brunel
On Fri, 22 Jul 2005 23:42:52 -0400, Kane Bonnette [EMAIL PROTECTED] wrote: Kane Bonnette wrote: Does anyone know how the clear the text from a Tkinter Text Widget? The delete(0, END) trick that works for Entry widgets doesn't work for Text I get 0 is an invalid index when i try to do so

Re: [path-PEP] Path inherits from basestring again

2005-07-25 Thread Reinhold Birkenfeld
Tony Meyer wrote: [...] Open issues: [...] What about path * 4? If you keep the current join meaning of __div__, then assigning any sort of multiplication meaning to __mul__ would not be a good idea, IMO. It's natural to expect that __div__ and __mul__ are opposites. I suppose this

Re: [path-PEP] Path inherits from basestring again

2005-07-25 Thread Reinhold Birkenfeld
Andrew Dalke wrote: Reinhold Birkenfeld wrote: Okay. While a path has its clear use cases and those don't need above methods, it may be that some brain-dead functions needs them. brain-dead? Consider this code, which I think is not atypical. Okay, convinced. Reinhold --

Re: [path-PEP] Path inherits from basestring again

2005-07-25 Thread Reinhold Birkenfeld
Reinhold Birkenfeld wrote: Hi, the arguments in the previous thread were convincing enough, so I made the Path class inherit from str/unicode again. Current change: * Add base() method for converting to str/unicode. * Allow compare against normal strings. Reinhold --

Re: Extending python - undefined symbol error on import

2005-07-25 Thread ch424
Sweet! It works! *dances* Thank you so much -- and for the explanation! For anyone searching for this, I had to change the respective lines to: module1 = Extension('gpibmodule', libraries = ['gpibapi'], sources = ['gpibmodule.c']) just as Daniel said. Thanks

Re: Web-Forms

2005-07-25 Thread Mathias Waack
Michele Simionato wrote: Use twill:http://www.idyll.org/~t/www-tools/twill.html I'll do so. Twill is great, anyway thanks for all other responses too. Mathias -- http://mail.python.org/mailman/listinfo/python-list

[ANN] XPN 0.5.0 released

2005-07-25 Thread Nemesis
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 article and search in the body, spoiler char/rot13, random taglines and

Re: [path-PEP] Path inherits from basestring again

2005-07-25 Thread Michael Hoffman
Reinhold Birkenfeld wrote: * Add base() method for converting to str/unicode. +1 -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: [path-PEP] Path inherits from basestring again

2005-07-25 Thread Michael Hoffman
Reinhold Birkenfeld wrote: Tony Meyer wrote: Do people really like using __div__ to mean join? On the python-dev discussion, Just van Rossum spoke out against it, but there weren't (IIRC) any other comments, either pro or con. I'm not too happy with it, too, but do we have alternatives? As

regarding porting to windows.

2005-07-25 Thread prakash reghate
Respected Sir / Madam , I am Prakash . I am also working onporting C PROGRAMS to windows from Linux , but i doesn't get any clue yet. I have some C - programs written on Linux i have to port it on windows . The problem starts from header files. Soif you have any help or document, link

Re: [path-PEP] Path inherits from basestring again

2005-07-25 Thread Stefan Rank
on 25.07.2005 10:44 Michael Hoffman said the following: Reinhold Birkenfeld wrote: Tony Meyer wrote: Do people really like using __div__ to mean join? Of course, one can use joinwith() if he doesn't like '/'. Personally, I'm -0 on __div__, but I suppose if anyone here claimed to have used in

Re: PEP on path module for standard library

2005-07-25 Thread Daniel Dittmar
John Roth wrote: However, a path as a sequence of characters has even less meaning - I can't think of a use, while I have an application That's true. But the arguments for path objects as strings go more in the direction of using existing functions that expect strings. where traversing a

Re: PEP on path module for standard library

2005-07-25 Thread Daniel Dittmar
Terry Reedy wrote: for dir in pathobject: if isdir(dir): cd(dir) *is*, in essence, what the OS mainly does with paths (after splitting the string representation into pieces). That's why there is rarely a need to to it in Python code. Directory walks also work with paths as sequences

Re: Retrieving and saving images from internet address

2005-07-25 Thread Paul Rubin
rock69 [EMAIL PROTECTED] writes: http://www.infomedia.it/immagini/riviste/covers/cp/cp137.jpg and I would like to download that image and save it to a local file. How do you do that in Python? See the docs for the urllib module. -- http://mail.python.org/mailman/listinfo/python-list

Re: Retrieving and saving images from internet address

2005-07-25 Thread Wolfram Kraus
rock69 wrote: Hi all :) I got this address: http://www.infomedia.it/immagini/riviste/covers/cp/cp137.jpg and I would like to download that image and save it to a local file. How do you do that in Python? Use urllib2: http://docs.python.org/lib/module-urllib2.html

Re: [path-PEP] Path inherits from basestring again

2005-07-25 Thread Reinhold Birkenfeld
Stefan Rank wrote: on 25.07.2005 10:44 Michael Hoffman said the following: Reinhold Birkenfeld wrote: Tony Meyer wrote: Do people really like using __div__ to mean join? Of course, one can use joinwith() if he doesn't like '/'. Personally, I'm -0 on __div__, but I suppose if anyone here claimed

Re: Importing User-defined Modules

2005-07-25 Thread Thomas Guettler
Am Sun, 24 Jul 2005 13:12:04 -0400 schrieb Walter Brunswick: I need to import modules with user-defined file extensions that differ from '.py', and also (if possible) redirect the bytecode output of the file to a file of a user-defined extension. I've already read PEP 302

What license to choose for Python programs? (PSF License vs. GPL/LGPL)

2005-07-25 Thread Volker Grabsch
Hi! I noticed that many packages in the PyPI are using the PSF License. Does this have a special reason? Is this the common standard license for Python libraries? I'm just asking because I'll release some bigger pieces of Python code to the Open Source Community. In my many projects before I

Re: [ANN] XPN 0.5.0 released

2005-07-25 Thread Franz Steinhaeusler
On Mon, 25 Jul 2005 08:41:03 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

Re: What license to choose for Python programs? (PSF License vs. GPL/LGPL)

2005-07-25 Thread Michael Ströder
Volker Grabsch wrote: I noticed that many packages in the PyPI are using the PSF License. Does this have a special reason? Personally I used Python style license to express that you can do with some of my modules exactly what you can do with Python itself. So if it is complicated to include

multilanguage site and user informations edition

2005-07-25 Thread Olivier
i need to create a multilinguage site and i need help : first i want to know what is the best and simple solution for a multilinguage site with plone 2? i want some tutorial, how to and if possible exemple next i need to modify the user standard information to put my personnal information like

Re: Retrieving and saving images from internet address

2005-07-25 Thread user
rock69 wrote: Hi all :) I got this address: http://www.infomedia.it/immagini/riviste/covers/cp/cp137.jpg and I would like to download that image and save it to a local file. How do you do that in Python? I'd use urllib.urlretrieve, Copy a network object denoted by a URL to a local

Re: Fire event when variable is Set/Get

2005-07-25 Thread Benji York
tharaka wrote: You are in luck because Python has Properties just like .NET. class C(object): def getx(self): return self.__x def setx(self, value): self.__x = value def delx(self): del self.__x x = property(getx, setx, delx, I'm the 'x' property.) Just for those that might

Re: regarding porting to windows.

2005-07-25 Thread Benji York
prakash reghate wrote: I am also working on *porting C PROGRAMS to windows from Linux *, but i doesn't get any clue yet. I have some C - programs written on Linux i have to port it on windows . This list is about Python, not C. If you have some C Python extensions you wish to port, I'm

Re: Problem loading a file of words

2005-07-25 Thread Steven D'Aprano
On Sun, 24 Jul 2005 20:44:08 -0700, teoryn wrote: I've been spending today learning python and as an exercise I've ported a program I wrote in java that unscrambles a word. Before describing the problem, here's the code: *--beginning of file--* #!/usr/bin/python # Filename: unscram.py

Counting processors

2005-07-25 Thread Pauldoo
Hi, Is a way in python to obtain the total number of processors present in the system? os.platform doesn't seem to contain anything useful. -- http://mail.python.org/mailman/listinfo/python-list

Re: What license to choose for Python programs? (PSF License vs. GPL/LGPL)

2005-07-25 Thread Michael Hudson
[EMAIL PROTECTED] (Volker Grabsch) writes: Hi! I noticed that many packages in the PyPI are using the PSF License. Does this have a special reason? Lots of people are misguided, maybe. Anyway, you want to be reading this: http://wiki.python.org/moin/PythonSoftwareFoundationLicenseFaq

GPRS Connection name on Python s60

2005-07-25 Thread [EMAIL PROTECTED]
Hi, I have a question for the experts of Python for series60! When I use the .connect method of the socket, a list with all connection available pop-up, and, after selecting one, the soft go on. My question is that: Can i use the .connect method passing connection name, resulting in a connection

Message (Your message dated Mon, 25 Jul 2005 14:21:50...)

2005-07-25 Thread University of Arkansas LISTSERV Server (14.3)
Your message dated Mon, 25 Jul 2005 14:21:50 +0200 with subject Status has beensubmittedtothemoderatoroftheVMESA-Llist: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-25 Thread Dean N. Williams
Jason, Dean, On Fri, Jul 22, 2005 at 05:11:45AM -0700, Dean N. Williams wrote: I downloaded your new Cygwin from http://cygwin.com and tried to build install Python/CDAT again. It appears to have built properly, but when I try to execute, it receive a sock error. How do I get around this

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-25 Thread Dean N. Williams
Jason, Is there anyway for me to get back to an older version of Cygwin? What do you mean by the above? An older Cygwin? An older Cygwin Python? An older rebase? I installed Cygwin back in February on my laptop. (Call this Cygwin A.) I have not updated it (i.e., Cygwin A) since

Re: Getting the --options of configure on installed python

2005-07-25 Thread Mark Rowe
On 25/07/2005, at 09:56 , Thanos Tsouanas wrote: Hello! Is there a way to get the --options with which python was configured on a system? Thanks in advance. Hi Thanos, Take a look at the distutils.sysconfig module (http:// docs.python.org/dist/module-distutils.sysconfig.html):

pyparsing 1.3.2 released

2005-07-25 Thread Paul McGuire
The best laid plans o' mice an' men / Gang aft a-gley So said Robert Burns (who really should do something about that speech impediment!). And so said I about 6 weeks ago, when I thought that I would leave pyparsing alone for awhile, after the 1.3.1 release. Well, here we are, and I'm

Re: Counting processors

2005-07-25 Thread [EMAIL PROTECTED]
I don't think there is direct method. On Linux you can inspect file /proc/cpuinfo to determine the installed cpus. -- http://mail.python.org/mailman/listinfo/python-list

Re: Counting processors

2005-07-25 Thread Benji York
Pauldoo wrote: Is a way in python to obtain the total number of processors present in the system? I don't know of a platform independent way. If you specify one or more platforms, I'm sure someone will be able to help. -- Benji York -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting a dictionary from an object

2005-07-25 Thread John Machin
Dark Cowherd wrote: voiceless-ly'rs What does this mean?? Just curious (googled that and ly'rs and didnt find anything relevant) The voiceless part I understand to mean that Bruno is shocked and stunned and not a little bit amazed [1] at Steven's masterstroke which came out of the blue and

Re: Problem loading a file of words

2005-07-25 Thread teoryn
Thanks to everyone for all the help! Here's the (at least for now) final script, although note I'm using 2.3.5, not 2.4, so I can't use some of the tips that were given. #!/usr/bin/python # Filename: unscram.py def sort_string(word): '''Returns word in lowercase sorted alphabetically'''

Re: Try this

2005-07-25 Thread RunLevelZero
Indeed.. I did click reply but I guess I wasn't paying attention. My bad. -- http://mail.python.org/mailman/listinfo/python-list

Vanilla python path

2005-07-25 Thread Neil Benn
Hello, I'm attempting to determine what paths I would need on a win32, Linux, OSX box to run python. This should be a vanilla python with no extra packages (including tk). The paths I have beneath are what I think I need, excluding the lib\site-packages entry. The questions

Re: Problem loading a file of words

2005-07-25 Thread Peter Otten
teoryn wrote: I'm still lost as to why my old code would only work for the small file, and another interesting note is that with the larger file, it would only write zzz for zzz (or whatever each word was) instead of Created key zzz for zzz. However, it works now, so I'm happy. Happy as long

First app, thanks people

2005-07-25 Thread Jan Danielsson
Hello all, I have written my first Python application (apart from small test programs). It's a (distibuted) white board application. I'm going to assume that there already are a thousand of them, written in Python, but just in case someone would find it useful:

Re: Getting a dictionary from an object

2005-07-25 Thread bruno modulix
John Machin wrote: Dark Cowherd wrote: voiceless-ly'rs What does this mean?? Just curious (googled that and ly'rs and didnt find anything relevant) s/ly'rs/ly y'rs/ The voiceless part I understand to mean that Bruno is shocked and stunned and not a little bit amazed [1] at Steven's

Re: PyGTK or wxPython (not a flame war) on Windows

2005-07-25 Thread Jarek Zgoda
TPJ napisał(a): PyQt works equally well on both systems. I believe you. The problem is I don't like GPL. So, buy commercial license for Qt and PyQt. -- Jarek Zgoda http://jpa.berlios.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Importing User-defined Modules

2005-07-25 Thread and-google
Walter Brunswick [EMAIL PROTECTED] wrote: I need to import modules with user-defined file extensions that differ from '.py', and also (if possible) redirect the bytecode output of the file to a file of a user-defined extension. You shouldn't really need a PEP for that; you can take control

How can I encode something in base32 preferably very fast?

2005-07-25 Thread Elmo Mäntynen
I want to encode a plaindigest or a hexdigest in base 32. Any hints? Elmo -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem loading a file of words

2005-07-25 Thread teoryn
I was just happy that it worked, but was still curious as to why it didn't before. Thanks for the idea, I'll look into it and see if this is the case. Thanks, Kevin -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem loading a file of words

2005-07-25 Thread teoryn
I changed to using line = line.strip() instead of line = line [:-1] in the original and it it worked. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I encode something in base32 preferably very fast?

2005-07-25 Thread Johannes Findeisen
On Mon, 2005-07-25 at 17:23 +0300, Elmo Mäntynen wrote: I want to encode a plaindigest or a hexdigest in base 32. Any hints? Search Google for python base32 isn't as hard... First result are the original python lib documentation: http://docs.python.org/lib/module-base64.html I think you need

Path PEP: What should Path(None) do?

2005-07-25 Thread Michael Hoffman
Currently it returns Path('None'). This means I have to do a check on input before pathifying it to make sure it is not None. Perhaps it should throw ValueError? -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: GPRS Connection name on Python s60

2005-07-25 Thread Peter Hansen
[EMAIL PROTECTED] wrote: Hi, I have a question for the experts of Python for series60! When I use the .connect method of the socket, a list with all connection available pop-up, and, after selecting one, the soft go on. My question is that: Can i use the .connect method passing connection

Re: Opinions on KYLIX 3 (Delphi 4 Linux)

2005-07-25 Thread Peter Maas
Jeff Epler schrieb: I honestly don't know why anyone would spend money for a development environment, no matter how fancy. I don't know why anyone would develop software in a language that doesn't have at least one open implementation. FreePascal is OSS. I recently developed a mixed

Re: Path PEP: What should Path(None) do?

2005-07-25 Thread Reinhold Birkenfeld
Michael Hoffman wrote: Currently it returns Path('None'). This means I have to do a check on input before pathifying it to make sure it is not None. Perhaps it should throw ValueError? The problem is that Path() currently acts like str() and will therefore accept almost anything that has a

Re: Counting processors

2005-07-25 Thread Pauldoo
Yeh well I know of /proc/cpuinfo (due to linux's hacked up non-unix /proc, *grumble*) and the NUMBER_OF_PROCESSORS environment variable on windows. I was just hoping for a slightly more platform independant way of doing it. -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem loading a file of words

2005-07-25 Thread Peter Hansen
teoryn wrote: I changed to using line = line.strip() instead of line = line [:-1] in the original and it it worked. Just to be clear, these don't do nearly the same thing in general, though in your specific case they might appear similar. The line[:-1] idiom says 'return a string which is a

Re: [path-PEP] Path inherits from basestring again

2005-07-25 Thread Peter Hansen
Michael Hoffman wrote: Reinhold Birkenfeld wrote: Tony Meyer wrote: Do people really like using __div__ to mean join? I'm not too happy with it, too, but do we have alternatives? ... Of course, one can use joinwith() if he doesn't like '/'. I've used the path module pretty extensively

Re: [path-PEP] Path inherits from basestring again

2005-07-25 Thread Peter Hansen
Reinhold Birkenfeld wrote: Current change: * Add base() method for converting to str/unicode. Would basestring() be a better name? Partly because that seems to be exactly what it's doing, but more because there are (or used to be?) other things in Path that used the word base, such as

Re: PyGTK or wxPython (not a flame war) on Windows

2005-07-25 Thread Peter Hansen
Torsten Bronger wrote: Marek Kubica [EMAIL PROTECTED] writes: I have started GUIs in Python with wx, but after a short time I was annoyed how many things were buggy. I don't know why, but I fell from one bug to the other while programming one application. I'm very suprised. wxPython is still

Re: Path PEP: What should Path(None) do?

2005-07-25 Thread Peter Hansen
Michael Hoffman wrote: Currently it returns Path('None'). This means I have to do a check on input before pathifying it to make sure it is not None. Perhaps it should throw ValueError? Without checking, I suspect it is merely doing str(x) or unicode(x) on whatever is passed to it:

Re: Opinions on KYLIX 3 (Delphi 4 Linux)

2005-07-25 Thread Vladimir Konrad
Does anyone of you have experiance with KYLIX 3 and do you think I should consider buying it? Thank You, I'll go oil my keyboard now. http://www.lazarus.freepascal.org/ Sorry if the above came out somewhere else in the thread, did not read all. Vlad --

Re: [ANN] XPN 0.5.0 released

2005-07-25 Thread Nemesis
Mentre io pensavo ad una intro simpatica Franz Steinhaeusler scriveva: 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

Re: First app, thanks people

2005-07-25 Thread Dark Cowherd
Hmm, I was looking at the code as I am also learning Python. In case you are interested in bug report. class LineTool method OnLeftUp needs self.done = True or else if you are in Line mode and you just click with out moving the mouse you get an error. DarkCowherd --

Re: PyGTK or wxPython (not a flame war) on Windows

2005-07-25 Thread Marek Kubica
Hi! On Sun, 24 Jul 2005 22:16:01 +0200 Torsten Bronger wrote: I'm very suprised. wxPython is still that buggy? I read reports from 2000 about such observations, but they tried wxPython in a non-standard way, and the project has had 5 years to become more stable after all. Well, I don't

Re: [path-PEP] Path inherits from basestring again

2005-07-25 Thread Peter Hansen
Reinhold Birkenfeld wrote: Peter Hansen wrote: Would basestring() be a better name? tobase? tostring? tobasestring? Of these choices, the latter would be preferable. Alternative is to set a class attribute Base of the Path class. Or export PathBase as a name from the module (but

Re: [path-PEP] Path inherits from basestring again

2005-07-25 Thread Reinhold Birkenfeld
Peter Hansen wrote: Reinhold Birkenfeld wrote: Peter Hansen wrote: Would basestring() be a better name? tobase? tostring? tobasestring? Of these choices, the latter would be preferable. Alternative is to set a class attribute Base of the Path class. Or export PathBase

Re: Path PEP: What should Path(None) do?

2005-07-25 Thread Reinhold Birkenfeld
Peter Hansen wrote: Michael Hoffman wrote: Currently it returns Path('None'). This means I have to do a check on input before pathifying it to make sure it is not None. Perhaps it should throw ValueError? Without checking, I suspect it is merely doing str(x) or unicode(x) on whatever

Re: First app, thanks people

2005-07-25 Thread Jan Danielsson
Dark Cowherd wrote: [---] In case you are interested in bug report. Always! class LineTool method OnLeftUp needs self.done = True or else if you are in Line mode and you just click with out moving the mouse you get an error. Many thanks; I can't believe I hadn't stumbled across

Re: First app, thanks people

2005-07-25 Thread Will McGugan
Jan Danielsson wrote: . Oh, I do have one more question though. I'm using wxPython, and when I check for keys I use the evt.GetKeyCode() call, and compare it with integers which I have found by printing what event.GetKeyCode() returns. I would prefer a more portable way, since I assume

Re: PostgreSQL Python vs PHP

2005-07-25 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I would like to thank all of you. For what I've read, I'll be using python instead of Php. Luis -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

urllib2 problem/bug: Request.add_header does() nothing?

2005-07-25 Thread kelio
I have a simple cgi-script on a server that prints all key-value pairs from a request. And it really works when i use a browser and type smth like http://server/cgi-bin/test?name=mikejohny=dummy. But when I use the following script, nothing is printed (like i type http://server/cgi-bin/test

Re: Counting processors

2005-07-25 Thread Alan Kennedy
[Pauldoo] Is a way in python to obtain the total number of processors present in the system? On windows, List Processor Information. Description: Returns information about the processors installed on a computer.

Re: [path-PEP] Path inherits from basestring again

2005-07-25 Thread skip
Reinhold Right, that was a concern of mine, too. Reinhold tobase? Reinhold tostring? Reinhold tobasestring? If we're on a filesystem that understands unicode, would somepath.tostring() return a unicode object or a string object encoded with some to-be-determined encoding? Why

Re: [path-PEP] Path inherits from basestring again

2005-07-25 Thread Reinhold Birkenfeld
[EMAIL PROTECTED] wrote: Reinhold Right, that was a concern of mine, too. Reinhold tobase? Reinhold tostring? Reinhold tobasestring? If we're on a filesystem that understands unicode, would somepath.tostring() return a unicode object or a string object encoded with some

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-25 Thread Jason Tishler
Dean, On Mon, Jul 25, 2005 at 05:55:39AM -0700, Dean N. Williams wrote: Is there anyway for me to get back to an older version of Cygwin? What do you mean by the above? An older Cygwin? An older Cygwin Python? An older rebase? See below... [snip] When installing from the internet,

Re: First app, thanks people

2005-07-25 Thread Jan Danielsson
Will McGugan wrote: [---] You should use the keycode constants. http://www.wxwidgets.org/manuals/2.6.1/wx_keycodes.html#keycodes [---] Excellent! Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: GPRS Connection name on Python s60

2005-07-25 Thread [EMAIL PROTECTED]
Yeah i have already asked it, but, i think i can set before the .connect method, a connection as default, and, when connected, resore default connection! Peter Hansen ha scritto: [EMAIL PROTECTED] wrote: Hi, I have a question for the experts of Python for series60! When I use the .connect

how to imput usernames and passwords??

2005-07-25 Thread Patrick Thorstenson
I am scripting GIS (mapping) applications at a very very basic level... One of our processes involves connecting to an Oracle database. When the connection occurs, we are prompted to enter a user name and password. That is OK when we are sitting right there but we want to be able to enter

Re: how to imput usernames and passwords??

2005-07-25 Thread skip
Patrick Is there a way I can have Python tell Oracle what the username Patrick and password is? Dunno what db adapter module is used for Oracle, but the ones I've used for Sybase, PostgreSQL and MySQL all accept username/password parameters either individually or stuffed into a DSN

Re: [path-PEP] Path inherits from basestring again

2005-07-25 Thread Andrew Dalke
Reinhold Birkenfeld wrote: Current change: * Add base() method for converting to str/unicode. Now that [:] slicing works, and returns a string, another way to convert from path.Path to str/unicode is path[:] Andrew [EMAIL

Reading binary with header

2005-07-25 Thread Einstein, Daniel R
Title: Reading binary with header Hello, I am trying to head in a binary file that has a header and different character types. The array module apparently expects the typecode to be the same throughout. Here's what the file looks like: Byte number: type: value: purpose: 1-4 char

Re: GPRS Connection name on Python s60

2005-07-25 Thread Peter Hansen
[EMAIL PROTECTED] wrote: Yeah i have already asked it, but, i think i can set before the .connect method, a connection as default, and, when connected, resore default connection! Well, more power to you. I'll simply note again that this is a non-standard thing, and not directly supported by

Re: How can I encode something in base32 preferably very fast?

2005-07-25 Thread Elmo Mäntynen
On Mon, 25 Jul 2005 16:51:05 +0200, Johannes Findeisen wrote: On Mon, 2005-07-25 at 17:23 +0300, Elmo Mäntynen wrote: I want to encode a plaindigest or a hexdigest in base 32. Any hints? Search Google for python base32 isn't as hard... First result are the original python lib

Run batch files in Windows XP

2005-07-25 Thread erniedude
Hi, I'm a newbie and I was wondering if anyone knew a (Python) script to run 4 batch files, one after the other (assuming the directories are known). It would be better if all 4 batch files could run simultaneously, but that might break Windows... ;) The problem I had was I couldn't get the

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-25 Thread Dean N. Williams
[snip] I was able to run C:/cygwin/bin/ash.exe. This is good. In the ash.exe window, I ran PATH=/bin rebaseall and received the same error: rebaseall: only ash processes are allowed .. Execute '/bin/rebaseall' from ash. -Dean If Cygwin's bin is not in your Windows PATH, then give the full

psp php integration

2005-07-25 Thread Jon Hewer
Hello, I am upgrading a PHP based site and want to use Python (using mod_python and psp file) to achieve what is required. However, I do not want to recode the navigation part of the site which is currently coded using PHP. Somehow I need to merge the outputs of the PHP file and my PSP

Re: Run batch files in Windows XP

2005-07-25 Thread Peter Hansen
[EMAIL PROTECTED] wrote: I'm a newbie and I was wondering if anyone knew a (Python) script to run 4 batch files, one after the other (assuming the directories are known). It would be better if all 4 batch files could run simultaneously, but that might break Windows... ;) The problem I had

Re: psp php integration

2005-07-25 Thread Thanos Tsouanas
On Mon, Jul 25, 2005 at 07:53:19PM +0100, Jon Hewer wrote: Hello, I am upgrading a PHP based site and want to use Python (using mod_python and psp file) to achieve what is required. However, I do not want to recode the navigation part of the site which is currently coded using PHP. Somehow

Re: How can I encode something in base32 preferably very fast?

2005-07-25 Thread Elmo Mäntynen
On Mon, 25 Jul 2005 21:15:36 +0300, Elmo Mäntynen wrote: On Mon, 25 Jul 2005 16:51:05 +0200, Johannes Findeisen wrote: On Mon, 2005-07-25 at 17:23 +0300, Elmo Mäntynen wrote: I want to encode a plaindigest or a hexdigest in base 32. Any hints? Search Google for python base32 isn't as

Re: Run batch files in Windows XP

2005-07-25 Thread Ernesto
Thanks Peter. The issue is I haven't done very much batch programming. I need to prompt the user for input and each batch file is in a different directory. How do I change directories and prompt for user input? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

how to write a line in a text file

2005-07-25 Thread nephish
Hey there, kinda newbie question here. i know how to read the lines of a txt file. i know how to write a txt file. but how do i overwrite a line value with another value ? i mean, how do go to, say, line 3 of a text file and replace what is written on line 3 with something else? thanks --

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-25 Thread Jason Tishler
Dean, On Mon, Jul 25, 2005 at 11:27:16AM -0700, Dean N. Williams wrote: I was able to run C:/cygwin/bin/ash.exe. This is good. In the ash.exe window, I ran PATH=/bin rebaseall and received the same error: rebaseall: only ash processes are allowed .. Execute '/bin/rebaseall' from ash. Did

Re: Run batch files in Windows XP

2005-07-25 Thread Peter Hansen
Ernesto wrote: The issue is I haven't done very much batch programming. I need to prompt the user for input and each batch file is in a different directory. How do I change directories and prompt for user input? Ah, now you're talking things where Python, while not strictly required, can

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-25 Thread Dean N. Williams
Right! Forgot to exit out of ALL Cygwin processes. This does work. -Dean Jason Tishler wrote: Dean, On Mon, Jul 25, 2005 at 11:27:16AM -0700, Dean N. Williams wrote: I was able to run C:/cygwin/bin/ash.exe. This is good. In the ash.exe window, I ran PATH=/bin rebaseall and received the

Re: PyGTK or wxPython (not a flame war) on Windows

2005-07-25 Thread Lonnie Princehouse
I haven't used PyGTK very much, so I can't comment on it. My last impression of GTK-on-Windows was that it wasn't very stable and didn't blend well with the Windows native look and feel, but that was a while ago and it has probably improved a great deal since then. I use wxPython, doing my

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-25 Thread Steve Holden
Jason Tishler wrote: Dean, On Mon, Jul 25, 2005 at 11:27:16AM -0700, Dean N. Williams wrote: I was able to run C:/cygwin/bin/ash.exe. This is good. In the ash.exe window, I ran PATH=/bin rebaseall and received the same error: rebaseall: only ash processes are allowed .. Execute

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-25 Thread Dean N. Williams
Hi Jason, To get import socket to work in Python2.4, I had to do something that I never recomend and that is hack the Python code. Since I need this to work for someone that is going on travel, I just modified the socketmodule.c file. REPLACE: /* Irix 6.5 fails to define this variable at

OS X py2app confusion

2005-07-25 Thread bex
Im baffled about this one... Im running OS 10.3, and Python 2.3. I installed py2app 0.17 and never used it, then installed py2app 0.2. It refuses to work. None of the samples will build. Observe: $ pwd /Developer/Python/py2app/Examples/pygame $ python setup.py py2app Traceback (most recent call

Re: Run batch files in Windows XP

2005-07-25 Thread Ernesto
Thanks. Yeah I started to write in Python. Looks like this: ** import os from os.path import join # Get input from user and make sure it is valid fileDirec = raw_input(\nEnter the path of where your STMP3XXX_SDK_FIRMWARE\nis located (i.e.

Re: how to write a line in a text file

2005-07-25 Thread Steve Holden
[EMAIL PROTECTED] wrote: Hey there, kinda newbie question here. i know how to read the lines of a txt file. i know how to write a txt file. but how do i overwrite a line value with another value ? i mean, how do go to, say, line 3 of a text file and replace what is written on line 3

Re: how to imput usernames and passwords??

2005-07-25 Thread [EMAIL PROTECTED]
Try cx_Oracle http://www.computronix.com/utilities.shtml#Oracle, it is an excellent library based on the DB API of Python -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >