Re: CSV Issues

2007-07-18 Thread Lutz Horn
Hi, On Thu, 19 Jul 2007 06:59:24 +0200, Rohan <[EMAIL PROTECTED]> wrote: > When I run the script for the second time after a certain period of > time the results should appear next to the results of the last run, > I'm unable to make a new column when the script is run after the first > time. > Id

Python related activities at OSCon 2007 next week

2007-07-18 Thread Michael Pittaro
I've been getting ready for OSCon 2007 next week, and theres quite a bit of Python related activity there. Based on a suggestion from Jeff Rush, (who can't be there), I've proposed a Python Advocacy BoF on Monday, from 6:30pm - 7:30pm. For anyone arriving early, this will be a great opportunity to

A new Classifieds Website has been Launched.

2007-07-18 Thread Anmolads
A new Classifieds Website has been Launched. Place Full page Ad for free at Anmolads.com http://www.Anmolads.com Get your desired Job from our Job Portal... www.Anmoljobs.com/forum Logon to www.anmolads.com for further details. Place Full Page For Free at www.Anmolads.com , www.earnyourcash.com

Re: Pickled objects over the network

2007-07-18 Thread Walker Lindley
I tried implementing the sending the length and then the pickle string method and that worked most of the time. The problem we ran into was if the string got split up into multiple packets and you read the first one and tried to unpickle it, you'd get an error. So a while loop that keeps calling r

Re: Embedding/Extending Python in/with C++: non-static members?

2007-07-18 Thread [EMAIL PROTECTED]
On Jul 17, 12:24 pm, dmoore <[EMAIL PROTECTED]> wrote: > (I thought I'd follow up on this post so as not to send unsuspecting > readers down a hopeless path) > > duh! > > I've obviously spent too much time with dynamic languages. The problem > with what I'm trying to do is obvious: In C++ you simpl

Re: really small values

2007-07-18 Thread [EMAIL PROTECTED]
On Jul 17, 4:13?pm, "Dee Asbury" <[EMAIL PROTECTED]> wrote: > In multiplying a value of xe^-325 with ye^-4, Python is returning zero. How > do I get it to give me back my tiny value? Use the right tool for the right job. >>> import gmpy >>> help(gmpy.mpf) Help on built-in function mpf in module g

Re: how to implementation latent semantic indexing in python..

2007-07-18 Thread Steven Bethard
78ncp wrote: > how to implementation algorithm latent semantic indexing in python > programming...?? malkarouri wrote: > IIRC, there was some explanation of Latent Semantic Analysis (with > Python code) in an IEEE ReadyNotes document called "Introduction to > Python for Artificial Intelligence". I

CSV Issues

2007-07-18 Thread Rohan
Hello, I'm working on a script which collects some data and puts into a csv file which could be exported to excel. so far so good, I'm able to do what I described. When I run the script for the second time after a certain period of time the results should appear next to the results of the last run,

idiom for RE matching

2007-07-18 Thread Gordon Airporte
I have some code which relies on running each line of a file through a large number of regexes which may or may not apply. For each pattern I want to match I've been writing gotit = mypattern.findall(line) if gotit: gotit = gotit[0] ...do whatever else... This seems kind of clun

Re: Charlotte Python Group

2007-07-18 Thread Calvin Spealman
Holy crap, did I forget to mention the state and country? I could be a moron, at times. This would be Charlotte, North Carolina, the United States of America. On 7/18/07, Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > Calvin Spealman wrote: > > I am looking to start a meetup in or near Charlo

odbc module for python

2007-07-18 Thread Sean Davis
What are the alternatives for accessing an ODBC source from python (linux 64-bit, python 2.5)? It looks like mxODBC is the only one available? Thanks, Sean -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it possible to run two "while 1:" loops in two threadings respectively?

2007-07-18 Thread zxo102
On 7 17 , 3 01 , "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > zxo102 schrieb: > > > > > > > Hi, > >I would like to combine two python applications into a single one > > with two threadings. Both of them have a "while 1:" loop respectively. > > For example, one application is to monitoring

Re: Implementaion of random.shuffle

2007-07-18 Thread Steven D'Aprano
On Wed, 18 Jul 2007 19:32:35 +, George Sakkis wrote: > On Jul 16, 10:51 pm, Steven D'Aprano > <[EMAIL PROTECTED]> wrote: >> On Mon, 16 Jul 2007 16:55:53 +0200, Hrvoje Niksic wrote: >> > 2**19937 being a really huge number, it's impossible to exhaust the >> > Mersenne twister by running it in s

Re: how to implementation latent semantic indexing in python..

2007-07-18 Thread Tim Churches
Alex Martelli wrote: > Tim Churches <[EMAIL PROTECTED]> wrote: > >> malkarouri wrote: >>> On 13 Jul, 17:18, 78ncp <[EMAIL PROTECTED]> wrote: hi... how to implementation algorithm latent semantic indexing in python programming...?? >>> Of course you are aware that LSA is patented.. >

Re: type conversions for comparison operators

2007-07-18 Thread Alex Martelli
Russ <[EMAIL PROTECTED]> wrote: > I recently discovered a bug in one of my programs that surprised me > because I thought Python's dynamic type checking would have > caught it. > > Suppose I have a function that returns an integer, such as > > def numItems: return len(self.items) Syntax errors

Interprocess communication woes

2007-07-18 Thread Murali
Hi Python Gurus, I am writing a GUI app (on linux) using pygtk which would launch some external applications and display their stdout and stderr inside the output window of my application synchronously. I am using the subprocess module's Popen to launch the external programs and to capture their s

Re: how to implementation latent semantic indexing in python..

2007-07-18 Thread Alex Martelli
Tim Churches <[EMAIL PROTECTED]> wrote: > malkarouri wrote: > > On 13 Jul, 17:18, 78ncp <[EMAIL PROTECTED]> wrote: > >> hi... > >> how to implementation algorithm latent semantic indexing in python > >> programming...?? > > > > Of course you are aware that LSA is patented.. > > There is a US pat

Re: how to implementation latent semantic indexing in python..

2007-07-18 Thread Tim Churches
malkarouri wrote: > On 13 Jul, 17:18, 78ncp <[EMAIL PROTECTED]> wrote: >> hi... >> how to implementation algorithm latent semantic indexing in python >> programming...?? > > Of course you are aware that LSA is patented.. There is a US patent on it, sealed in 1989, but is it patented in any other

Re: Interpreting os.lstat()

2007-07-18 Thread Will Maier
On Wed, Jul 18, 2007 at 05:55:59PM -0700, Adrian Petrescu wrote: > I can see some correspondence between the "stat" call and os.lstat > (for example, I'm guessing os.lstat(path)[6] represents the filesize), > but I can't see the correspondence between some of the other fields. > What does os.lstat(

Interpreting os.lstat()

2007-07-18 Thread Adrian Petrescu
I'm playing with FUSE's python bindings, and I'm expected to return a list that matches the structure of a python os.lstat() call. So, for example: >>> import os >>> os.lstat("/home/adrian/fuse_test") (16877, 1036L, 2050L, 4, 1000, 1000, 4096L, 1184803155, 1184170289, 1184170289) The problem

Re: Break up list into groups

2007-07-18 Thread George Sakkis
On Jul 17, 1:48 pm, Matimus <[EMAIL PROTECTED]> wrote: > I did some more experimenting and came up with the code below. It > shows several methods. When run, the script tests the robustness of > each method (roughly), and profiles it using timeit. The results from > running on my laptop are shown b

Re: Newbie: freebsd admin scripting

2007-07-18 Thread Will Maier
On Wed, Jul 18, 2007 at 04:31:35PM -0700, Evan Klitzke wrote: > > I found a built in mod for parseconfig but it deal with .ini > > file styles (windows) that include a [section] header as well as > > uses someiteam=somevalue format. I believe it requires the > > header though. > > I think you're r

Issue with CSV

2007-07-18 Thread Rohan
Hello, I'm working on a script which collects some data and puts into a csv file which could be exported to excel. so far so good, I'm able to do what I described. When I run the script for the second time after a certain period of time the results should appear next to the results of the last run,

Re: how to implementation latent semantic indexing in python..

2007-07-18 Thread malkarouri
On 13 Jul, 17:18, 78ncp <[EMAIL PROTECTED]> wrote: > hi... > how to implementation algorithm latent semantic indexing in python > programming...?? > > thank's for daniel who answered my question before.. > > -- > View this message in > context:http://www.nabble.com/how-to-implementation-latent-sem

Re: Exiting from python shell

2007-07-18 Thread James Matthews
try raise SystemExit On 7/18/07, Mark Elston <[EMAIL PROTECTED]> wrote: * James Stroud wrote (on 7/18/2007 4:27 PM): > Tobiah wrote: >> For years now, I've been exiting the shell by typing 'exit\n', >> being chid by the shell, and then typing ^D. I can't >> remember a time that I typed the ^D

Interprocess communication

2007-07-18 Thread Murali
Hi Python Gurus, I am writing a GUI app (on linux) using pygtk which would launch some external applications and display their stdout and stderr inside the output window of my application synchronously. I am using the subprocess module's Popen to launch the external programs and to capture their s

Running Python with XAMPP

2007-07-18 Thread Mathias K.
Hello everyone! I just installed Python 2.5 and i want to use Python to build websites. I could load mod_python successfully with Apache but i fail to let the .py-files to be executed! In /htdocs/python i got my test file: [code=python.py] from mod_python import apache def index(req):

Re: Python-URL! - weekly Python news and links (Jul 16)

2007-07-18 Thread David Boddie
On Wed Jul 18 23:20:51 CEST 2007, Cameron Laird wrote: > Kay Schluehr wrote: > > >Not sure if it's important enough to be mentioned in weekly Python > >news but Europython 2007 actually happened and took place in Vilnius. > > *I* sure think it's important; is there a summary or narrative > fro

Re: Exiting from python shell

2007-07-18 Thread Mark Elston
* James Stroud wrote (on 7/18/2007 4:27 PM): > Tobiah wrote: >> For years now, I've been exiting the shell by typing 'exit\n', >> being chid by the shell, and then typing ^D. I can't >> remember a time that I typed the ^D the first time. Call >> me an idiot if you must, but since someone took the

Re: Newbie: freebsd admin scripting

2007-07-18 Thread Evan Klitzke
On 7/17/07, Muffin <[EMAIL PROTECTED]> wrote: > I am using python for the first time on Unix and on FBSD. I need a few > pointer, tips or tricks on scripting on config files. Mostly admin type > configs like the rc.conf file usually setup like: > > someiteam=somevalue#sometype of descriptio

Re: Exiting from python shell

2007-07-18 Thread James Stroud
Tobiah wrote: > For years now, I've been exiting the shell by typing 'exit\n', > being chid by the shell, and then typing ^D. I can't > remember a time that I typed the ^D the first time. Call > me an idiot if you must, but since someone took the trouble > to catch the command 'exit' in a special

problem with psqlite2 return types

2007-07-18 Thread Danny
Howdy, I'm having troubles with psqlite2 and the return types from a query. The problem is that my data which is numeric, is being returned as a string. I'm aware of the detect_types=sqlite.PARSE_DECLTYPES argument to the connect function. Here's my connection code: self.conne

Newbie: freebsd admin scripting

2007-07-18 Thread Muffin
I am using python for the first time on Unix and on FBSD. I need a few pointer, tips or tricks on scripting on config files. Mostly admin type configs like the rc.conf file usually setup like: someiteam=somevalue#sometype of description Where I would like to toggle the somevalue in an e

Re: Python-URL! - weekly Python news and links (Jul 16)

2007-07-18 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Kay Schluehr <[EMAIL PROTECTED]> wrote: > >Gabriel Genellina schrieb: >> QOTW: "That's a property of open source projects. Features nobody really >> needs are not implemented." - Gregor Horvath > >It's a good QOTW but social romantic nonsense nevertheless. > >Not s

Question about how to use cog as a preprocessor :-(

2007-07-18 Thread Steven W. Orr
I have the following module: #! /usr/bin/python COG_DEBUG=1 def wrapper( dd ): if dd == 1: def dfunc( *args ): print "print ", for ii in args: print repr(ii) print "compd dfunc" return dfunc else: def nfunc( *

Exiting from python shell

2007-07-18 Thread Tobiah
For years now, I've been exiting the shell by typing 'exit\n', being chid by the shell, and then typing ^D. I can't remember a time that I typed the ^D the first time. Call me an idiot if you must, but since someone took the trouble to catch the command 'exit' in a special way, would it have been

type conversions for comparison operators

2007-07-18 Thread Russ
I recently discovered a bug in one of my programs that surprised me because I thought Python's dynamic type checking would have caught it. Suppose I have a function that returns an integer, such as def numItems: return len(self.items) Now I want to do a test like this: if object.numItems() > 2:

Re: Real-time Update

2007-07-18 Thread Aahz
In article <[EMAIL PROTECTED]>, ReTrY <[EMAIL PROTECTED]> wrote: > >I'm writing a program with Tkinter GUI, When the program is running it >need to be updated every five seconds (data comes from internet). How >should I do that ? How to make a function in main loop ? See the Tkinter example from

Re: How do you debug when a unittest.TestCase fails?

2007-07-18 Thread Emin.shopper Martinian.shopper
Thanks for the reply, but neither of those work for me. I don't seem to have the "trial" program installed. Where do you get it? Also, when I use the try/catch block, I get the following error: Traceback (most recent call last): File "_test.py", line 10, in pdb.pm() File "c:\python25\lib\p

Re: merge two ranges

2007-07-18 Thread George Sakkis
On Jul 17, 1:29 pm, anoweb <[EMAIL PROTECTED]> wrote: > I have two ranges of numbers and I need to determine if they overlap > or adjacent and if so return a new range containing the values. The > values are low and high for each pair, such that the first value of > the tuple is always less than o

Re: How do you debug when a unittest.TestCase fails?

2007-07-18 Thread Jean-Paul Calderone
On Wed, 18 Jul 2007 16:40:46 -0400, "Emin.shopper Martinian.shopper" <[EMAIL PROTECTED]> wrote: >Dear Experts, > >How do you use pdb to debug when a TestCase object from the unittest module >fails? Basically, I'd like to run my unit tests and invoke pdb.pm when >something fails. > >I tried the fol

Re: Property Descriptor - Public Getter, Private Setter

2007-07-18 Thread James Stroud
gamehack wrote: > Hi all, > > I was looking around the net to figure out how I can use the > property() descriptor to make a property readable by everyone and only > settable by the class or any derived classes. Thanks. > > Regards, > gh > Congratulations, you have discovered a principal use of

How do you debug when a unittest.TestCase fails?

2007-07-18 Thread Emin.shopper Martinian.shopper
Dear Experts, How do you use pdb to debug when a TestCase object from the unittest module fails? Basically, I'd like to run my unit tests and invoke pdb.pm when something fails. I tried the following with now success: Imagine that I have a module _test.py that looks like the following: ---

wxPython, searching, and threads

2007-07-18 Thread Benjamin
Hello! I am writing a search engine with wxPython as the GUI. As the search thread returns items, it adds them to a Queue which is picked up by the main GUI thread calling itself recursively with wx.CallAfter. These are then added to a ListCtrl. This works fine for small searches, but with larger a

Deleting files and folders used by other processes on Windows

2007-07-18 Thread tkondal
Hi, I have been looking into making my file cleaning script more intelligent. The goal of the script is to delete everything on a drive except for a couple of folders which are skipped by the script. Recently, I noticed that some files where not being deleted because a process was using them. Is

Re: Deleting files and folders used by other processes on Windows

2007-07-18 Thread brad
[EMAIL PROTECTED] wrote: > Hi, > > I have been looking into making my file cleaning script more > intelligent. The goal of the script is to delete everything on a > drive except for a couple of folders which are skipped by the script. > Recently, I noticed that some files where not being deleted

Re: Open HTML file in IE

2007-07-18 Thread brad
gravey wrote: > Hello. > > Apologies if this is a basic question, but I want to open a HTML > file from my local drive (is generated by another Python script) > in Internet Explorer. I've had a look at the webbrowser module and > this doesn't seem to be what I need. Any help much appreciated. You

Re: Tibco Rendezvous

2007-07-18 Thread rdahlstrom
Sent you an email - have you found anything else on this? I'm not all that familiar with ctypes, and am having a little trouble getting started with this. Anything I could use just to get started would be fantastic - I can go from there. Thanks! On Jul 13, 1:43 pm, "Kip Lehman" <[EMAIL PROTECTE

Re: Pickled objects over the network

2007-07-18 Thread Eduardo \"EdCrypt\" O. Padoan
On 7/18/07, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Tue, 17 Jul 2007 14:57:16 -0700, Walker Lindley <[EMAIL PROTECTED]> wrote: [...] > The obvious thing you're doing wrong is using pickle over a network. ;) > > http://jcalderone.livejournal.com/15864.html Ok, maybe not the best tools

Re: Implementaion of random.shuffle

2007-07-18 Thread George Sakkis
On Jul 16, 10:51 pm, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Mon, 16 Jul 2007 16:55:53 +0200, Hrvoje Niksic wrote: > > 2**19937 being a really huge number, it's impossible to exhaust the > > Mersenne twister by running it in sequence. > > "Impossible"? > > Surely this will do it: > > for n

Re: Fast powerset function

2007-07-18 Thread Arash Arfaee
Hi All With your help I found lots of good method and algorithm. Also I found out if I exchange all for loop with while loop it make the program much faster and also it consumes less memory (almost half!) Just wanna thank you all. Cheers, Arash On 7/13/07, Mark Dickinson <[EMAIL PROTECTED]> wrot

"The basics" difficulties

2007-07-18 Thread MooMooBunnyLips
I'm trying to get this basic sample to work: http://docs.python.org/ext/dnt-basics.html When I get to the last step: $ python setup.py build I get this error: error: Python was build with Visual Studio version 8.0 and extensions need to be built with the same version of the compiler, but it isn't

Threading XL [was: Re: The Modernization of Emacs: exists already]

2007-07-18 Thread Wildemar Wildenburger
Rustom Mody wrote: > Eh? Me? you?? Who??? > Did I say something offensive? Sorry if I did... but I dont understand... > > No no, it's cool. Maybe I was a little too terse. Xah Lee likes to crosspost his pseudo-philosophical tech-musings to several discussion groups at regular intervalls. He's

Re: help with create menu in wxpython

2007-07-18 Thread Stef Mientki
better ask in the wx discussion group: [EMAIL PROTECTED] cheers, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

help with create menu in wxpython

2007-07-18 Thread franciscodg
hi group: I have the following code: .. .. #MENU menuFile = wx.Menu() menuFile.Append(14, "E&xit","Sale del programa") menuHelp = wx.Menu() menuHelp.Append(41, "&about Mutamatic","Informacion de Mutamatic") menuBar = wx.MenuBar() menu

Re: Pickled objects over the network

2007-07-18 Thread Rustom Mody
Sure pyro may be the solution but it may also be overkill Why not use safe_load from the yaml module? -- http://mail.python.org/mailman/listinfo/python-list

Re: New guy question - user form

2007-07-18 Thread Diez B. Roggisch
meg99 schrieb: > I am using a scheduling sw package that uses Python as its scripting > language much like Excel uses Visual Basic. I am fluent in VB but I > am just beginning in Python. > > What I need to do is this: I need to create a user form that will > contain some predefined data (capture

wxPython, searching, and threads

2007-07-18 Thread Benjamin
Hello! I am writing a search engine with wxPython as the GUI. As the search thread returns items, it adds them to a Queue which is picked up by the main GUI thread calling itself recursively with wx.CallAfter. These are then added to a ListCtrl. This works fine for small searches, but with larger a

Re: Mouse/keyboard watcher?

2007-07-18 Thread Skip Montanaro
> Someone, I thought from this list or maybe python-dev, told me about > a newer open source application in the same space which is more > portable and actively maintained/developed. Alas, I can't recall > the name... Found it: workrave (http://www.workrave.org/). Sorry for the noise. Skip --

Re: Property Descriptor - Public Getter, Private Setter

2007-07-18 Thread Diez B. Roggisch
gamehack wrote: > Hi all, > > I was looking around the net to figure out how I can use the > property() descriptor to make a property readable by everyone and only > settable by the class or any derived classes. Thanks. Forget it. You can try and come up with an implementation that will check th

Re: Open HTML file in IE

2007-07-18 Thread Larry Bates
gravey wrote: > Hello. > > Apologies if this is a basic question, but I want to open a HTML > file from my local drive (is generated by another Python script) > in Internet Explorer. I've had a look at the webbrowser module and > this doesn't seem to be what I need. Any help much appreciated. >

Pydev 1.3.8 Released

2007-07-18 Thread Fabio Zadrozny
Hi All, Pydev and Pydev Extensions 1.3.8 have been released Details on Pydev Extensions: http://www.fabioz.com/pydev Details on Pydev: http://pydev.sf.net Details on its development: http://pydev.blogspot.com Release Highlights in Pydev Extensions: --

Re: wxPython and threads

2007-07-18 Thread James Matthews
Sounds like a race condition. is List Ctrl waiting for the gui to return? Maybe make the processing more then one thread! On 7/17/07, Stef Mientki <[EMAIL PROTECTED]> wrote: Benjamin wrote: > I'm writing a search engine in Python with wxPython as the GUI. I have > the actual searching preformed

Re: shutil.copyfile problem for GIS data

2007-07-18 Thread Larry Bates
Ahmed, Shakir wrote: > Need help to copy a personal geodatabase from one location to another: > > > Trying to copy a personal geodatabase from one location to another > location where all the users are retrieving data from the second > location: > > 1.I can copy over the updated personal geo

Re: Pickled objects over the network

2007-07-18 Thread Walker Lindley
Thanks for all the help, I tried sending the length and then the string and that appears to work, so I'll take a look at Pyro, too. -Walker On 7/18/07, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Tue, 17 Jul 2007 14:57:16 -0700, Walker Lindl

Property Descriptor - Public Getter, Private Setter

2007-07-18 Thread gamehack
Hi all, I was looking around the net to figure out how I can use the property() descriptor to make a property readable by everyone and only settable by the class or any derived classes. Thanks. Regards, gh -- http://mail.python.org/mailman/listinfo/python-list

Re: Charlotte Python Group

2007-07-18 Thread Wildemar Wildenburger
Calvin Spealman wrote: > I am looking to start a meetup in or near Charlotte. I already have a > couple people interested, and I see some folks subscribing to new > python groups on meetup. If I can find a few more people, it could be > worth it. > > Is anyone in the area and interested in a group?

Re: Break up list into groups

2007-07-18 Thread Miki
Hello Dan, Yet another option (using itertools.groupby): from itertools import groupby class GrouperToggler: def __init__(self): self.group = 1 def __call__(self, value): # New packet, toggle group if value & 0x80: self.group = 1 - self.group

Mouse/keyboard watcher?

2007-07-18 Thread skip
Sorry to bomb this list with an off-topic post, however... Ages ago I wrote a mouse/keyboard watcher in Python+Tk: http://sf.net/projects/watch. It's been idle for a long while though, isn't terribly portable and doesn't work properly with tools like Synergy (http://sf.net/projects/synergy2). So

Re: The Modernization of Emacs: exists already

2007-07-18 Thread Joe Riopel
Sorry, I don't understand why this is still on the python mailing list. :wq -- http://mail.python.org/mailman/listinfo/python-list

Re: The Modernization of Emacs: exists already

2007-07-18 Thread Wolfgang Mederle
Xah Lee wrote: > In Emacs's documentation, the term Meta key should be replaced with > the Alt key, to reflect current usage, since that is the keyboard 99% > of personal computer users know. The "Meta key" name is a major point > of confusion for getting people to learn Emacs. This is utter bul

Re: The Modernization of Emacs: exists already

2007-07-18 Thread Rustom Mody
Eh? Me? you?? Who??? Did I say something offensive? Sorry if I did... but I dont understand... I must say that I found the earlier post useful to me as an old-time emacs user who's not quite upto all the latest stuff. However it was quite off topic for a python list. The flame war that followed w

Re: best SOAP module

2007-07-18 Thread Lawrence Oluyede
Sells, Fred <[EMAIL PROTECTED]> wrote: > I need to talk to a vendor side via SOAP, Googling is overwhelming and many > hits seem to point to older attempts. > > Can someone tell me which SOAP module is recommended. I'm using Python 2.4. Try soaplib: -- La

Re: Copy List

2007-07-18 Thread Lawrence Oluyede
Joe Riopel <[EMAIL PROTECTED]> wrote: > I am pretty new to python but this works: > > >>> list_one = [0,1,2,3,4,5,6,7,8,9] > >>> list_two = [i for i in list_one] > >>> print list_two > [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >> list_two = list_one[:] or >> list_two = list(list_one) are better :D --

Re: Problem with building extension in Python

2007-07-18 Thread cornpicker
I solved my problem. I had the math.h import step in the wrong location. The import step needed to be outside of the function -- I'm so embarrassed. Code: [Download] 1. 2. # 3. # Use C math functions 4. # 5. 6. # Import the native C functions we need 7. cdef extern from "ma

Re: The Modernization of Emacs: exists already

2007-07-18 Thread Wildemar Wildenburger
Rustom Mody wrote: > But how does posting an emacs related question help on a python mailing list?? > One Word: Ego. Don't reply. /W -- http://mail.python.org/mailman/listinfo/python-list

Re: The Modernization of Emacs: exists already

2007-07-18 Thread Rustom Mody
Xah Lee: I agree with what you say now and most of what you wrote a month back -- I even learnt something useful from there -- longlines mode. Emacs is important to me and (I guess) to many of the subscribers here. But how does posting an emacs related question help on a python mailing list?? --

Re: Discover instance variables

2007-07-18 Thread Bjoern Schliessmann
JonathanB wrote: > So given that example, is there a clean way to get this output: > > Data for Earth: > Name = Earth > WTN = 5.0 > Ag = 0 > Na = 0 > ... > ... > Notes = None Sure, save the __init__ parameters explicitly in a dict. self.data = {"Name": name, "WTN": WTN,

Re: The Modernization of Emacs: exists already

2007-07-18 Thread Xah Lee
About a month ago, i posted a message about modernization of emacs. I enlisted several items that i think emacs should adapt. Today I added another section to the frequestly asked questions. The new section is pasted below. The full article can be found at http://xahlee.org/emacs/modernization.htm

Charlotte Python Group

2007-07-18 Thread Calvin Spealman
I am looking to start a meetup in or near Charlotte. I already have a couple people interested, and I see some folks subscribing to new python groups on meetup. If I can find a few more people, it could be worth it. Is anyone in the area and interested in a group? Anyone who might want to do a tal

Re: accessing javascript variables within psp code

2007-07-18 Thread Carsten Haese
On Wed, 2007-07-18 at 01:29 +, BAnderton wrote: > Hello all, > > Question: Is there any way to access a javascript variable from > within psp code? > > > I'm aware of how to do the reverse of this (js_var='<%=psp_var%>'). > > > Here's a non-working example of what I'm trying to do: > >

New guy question - user form

2007-07-18 Thread meg99
I am using a scheduling sw package that uses Python as its scripting language much like Excel uses Visual Basic. I am fluent in VB but I am just beginning in Python. What I need to do is this: I need to create a user form that will contain some predefined data (captured from the scheduling sw da

best SOAP module

2007-07-18 Thread Sells, Fred
I need to talk to a vendor side via SOAP, Googling is overwhelming and many hits seem to point to older attempts. Can someone tell me which SOAP module is recommended. I'm using Python 2.4. --- The information contained in

Re: Copy List

2007-07-18 Thread Rustom Mody
The standard idiom (I guess) is to use the slice >>> a=[1,2,3,4] >>> b=a >>> b is a True >>> b [1, 2, 3, 4] >>> c=a[:] >>> c is a False >>> c [1, 2, 3, 4] This is shallow copy If you want deep copy then from copy import deepcopy -- http://mail.python.org/mailman/listinfo/python-list

Re: Copy List

2007-07-18 Thread Joe Riopel
I forgot to mention that you can go here for a little more of an explanation: http://diveintopython.org/native_data_types/mapping_lists.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Copy List

2007-07-18 Thread Joe Riopel
On 7/18/07, Robert Rawlins - Think Blue <[EMAIL PROTECTED]> wrote: > What's the best way to create a copy of a list? I am pretty new to python but this works: >>> list_one = [0,1,2,3,4,5,6,7,8,9] >>> list_two = [i for i in list_one] >>> print list_two [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> -- http:/

Re: Copy List

2007-07-18 Thread Tim Williams
On 18/07/07, Robert Rawlins - Think Blue <[EMAIL PROTECTED]> wrote: > > What's the best way to create a copy of a list? I've seen several method and > I'm not sure what to use. This will be in a class and one method creates a > list which I then want to move to the self scope, like so: > listB =

Copy List

2007-07-18 Thread Robert Rawlins - Think Blue
Hello Guys, What's the best way to create a copy of a list? I've seen several method and I'm not sure what to use. This will be in a class and one method creates a list which I then want to move to the self scope, like so: __Init__(self): Self.myList = [] regenerateList

Re: pytz giving incorrect offset and timezone

2007-07-18 Thread Sanjay
Hi Simon, localize worked perfectly. Thanks a lot for the vital help! Your elaboration on the concepts was also very nice and informative! thanks Sanjay -- http://mail.python.org/mailman/listinfo/python-list

Re: how to find available classes in a file ?

2007-07-18 Thread Alex Popescu
Alex Popescu gmail.com> writes: > > On Jul 17, 4:41 am, "Gabriel Genellina" yahoo.com.ar> > wrote: > > En Mon, 16 Jul 2007 20:13:19 -0300, Alex Popescu > > gmail.com> escribi > I apologize for posting the previous message a couple of times, but I wasn't seeing it displayed on the Google

Re: Compatibility of python2.5 with pytohn2.3

2007-07-18 Thread Gerhard Häring
VISHAL KANAUJIA wrote: > Hi all, > I am new member of this post. I have a C application which uses > Python(version 2.3) extensively with SWIG wrappers. I want to upgrade > the Python to latest version2.5. > > Is there any compatibility issue between two versions? Does latest > Python2.5 provide

Re: Pickled objects over the network

2007-07-18 Thread Nick Craig-Wood
Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Tue, 17 Jul 2007 14:57:16 -0700, Walker Lindley <[EMAIL PROTECTED]> wrote: > >I'm working on a distributed computing program and need to send Python > >objects over a TCP socket. [snip] > >Hopefully I'm doing something obviously wrong, but if any

Re: Semantics of file.close()

2007-07-18 Thread Hrvoje Niksic
"Evan Klitzke" <[EMAIL PROTECTED]> writes: >> But the writes are buffered, and close causes the buffer to be >> flushed. file.close can throw an exception just like fclose, but >> it will still ensure that the file is closed. > > Is this buffering being done by Python or the kernel? It is done i

Re: Posted messages not appearing in this group

2007-07-18 Thread Alex Popescu
Sanjay gmail.com> writes: > > Hi All, > > I tried posting in this group twice since last week, but the messages > did not appear in the forum. Don't know why. Trying this message > again... > > Sanjay > Something similar seemed to happen to me too, but when checking with gmane I've noticed t

Re: XL-RPC Recipe

2007-07-18 Thread Thomas
Ah, sorry, found the answer myself (not that I wasn't looking for it for days...): I was aware that the recipe is online at ActiveState's site (http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81549), but I didn't read all of the comments carefully: KAMOSAWA Masao wrote on 2006/04/29 that t

Re: Single-stepping through a python script

2007-07-18 Thread Diez B. Roggisch
Craig Howard wrote: > >>Craig Howard schrieb: > >> Hello All: > >> > >> Is is possible to compile a code object and single-step through its > >> execution? > > >import pdb; pdb.set_trace() > > > >Look up the pdb module documentation. > > > >Diez > > Sorry, I didn't give enough detail.

XL-RPC Recipe

2007-07-18 Thread Thomas
Hi list! I'm struggling with a recipe from the Python Cookbook (2nd ed.) concerning XML-RPC. It's recipe 15.2 "Serving XML-RPC Requests", and since I thought it's a popular book some other folks might have discovered (and probably solved) the same issue. The recipe provides server and client code

Re: how to find available classes in a file ?

2007-07-18 Thread Alex Popescu
On Jul 17, 4:41 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Mon, 16 Jul 2007 20:13:19 -0300, Alex Popescu > <[EMAIL PROTECTED]> escribió: > > > On Jul 17, 1:44 am, Stef Mientki <[EMAIL PROTECTED]> > > wrote: > >> I want to have a (dynamically) list of all classes defined in a py-file.

Re: Pickled objects over the network

2007-07-18 Thread Jean-Paul Calderone
On Tue, 17 Jul 2007 14:57:16 -0700, Walker Lindley <[EMAIL PROTECTED]> wrote: >I'm working on a distributed computing program and need to send Python >objects over a TCP socket. Specifically, the objects that I'm working with >subclass the builtin list type (I don't know whether or not that matters

Re: how to find available classes in a file ?

2007-07-18 Thread Alex Popescu
On Jul 17, 4:41 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Mon, 16 Jul 2007 20:13:19 -0300, Alex Popescu > <[EMAIL PROTECTED]> escribió: > > > On Jul 17, 1:44 am, Stef Mientki <[EMAIL PROTECTED]> > > wrote: > >> I want to have a (dynamically) list of all classes defined in a py-file.

  1   2   >