Re: Cannot install python under Win32

2008-06-10 Thread Martin v. Löwis
> Hello, I have tried to install python 2.5.1 and 2.5.2 with the same > error. The installer starts fine, but when it gets to the part that > says "Status: Copying new files" it terminates with an error code of > 2356. > > Does anyone have a clue to what to do? Run the installer with msiexec /i

Re: Cannot install python under Win32

2008-06-10 Thread Payala
On Jun 10, 8:56 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > Hello, I have tried to install python 2.5.1 and 2.5.2 with the same > > error. The installer starts fine, but when it gets to the part that > > says "Status: Copying new files" it terminates with an error code of > > 2356. > > > D

Re: Cannot install python under Win32

2008-06-10 Thread Payala
On Jun 10, 8:56 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > Hello, I have tried to install python 2.5.1 and 2.5.2 with the same > > error. The installer starts fine, but when it gets to the part that > > says "Status: Copying new files" it terminates with an error code of > > 2356. > > > D

Re: Getting current screen resolution

2008-06-10 Thread Thomas Morton
Yeh that's not such an issue - this is for some basic image analysis for a document / report. It's not HUGELY important data (it can be wrong with no real come back) but it has to be roughly accurate... The idea is I have an image and I need to work out how big it displays on the monitor of

Re: Does the python library of Google Data API is truly free?

2008-06-10 Thread Kless
On 9 jun, 22:46, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Kless schrieb: > > > On 9 jun, 21:40, Lie <[EMAIL PROTECTED]> wrote: > >> Do you notice that the terms are for the SERVICE not for the SOFTWARE. > >> The terms for the service is quite reasonable, as I see it. > >> The software itself

Re: How to kill a thread?

2008-06-10 Thread Antoon Pardon
On 2008-06-09, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > On Jun 9, 5:33 am, Antoon Pardon <[EMAIL PROTECTED]> wrote: >> On 2008-06-07, Rhamphoryncus <[EMAIL PROTECTED]> wrote: >> >> > On Jun 6, 12:44 pm, The Pythonista <[EMAIL PROTECTED]> wrote: >> >> It's always been my understanding that you can

Re: Why does python not have a mechanism for data hiding?

2008-06-10 Thread Bruno Desthuilliers
Russ P. a écrit : On Jun 9, 2:10 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: But if it takes 6 month to get the mentioned developer to release something I can use, I'm screwed up. Fine. I've lost track of how many times I've said this now, but my suggestion for a "priv" keyword allowed

eric4 wont start

2008-06-10 Thread dusans
Hi i took a look at eric4, its nice, cuz u have the script output and console in the same window, which is why i love pyscripter. Then i upgradet eric4 to newest version: eric4-4.0.4, it doesnt start, even when i installed the old version: The error massage is: Warning: translation file 'qt_en_US'

Re: Why does python not have a mechanism for data hiding?

2008-06-10 Thread Antoon Pardon
On 2008-06-09, Lie <[EMAIL PROTECTED]> wrote: >> >> That seems strange to me. The and-or simulation that was offerd in the >> FAQ allowed for about the same kind of structures as the ternary >> operator in C and was used in the standard library IIRC. >> >> So the same unreadable was already possibl

Re: help on self._dir

2008-06-10 Thread Kaushik
On Jun 9, 8:13 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Kaushik wrote: > > Hi, > > i'm new to python , and i came across a code like > > > if ("on_%s" % handler ) in self._dir: > > > i tried use the a similar method in my class it errors out like > > > AttributeError: bot instance has no

Re: Write to file and see content on screen

2008-06-10 Thread MRAB
On Jun 10, 2:01 am, [EMAIL PROTECTED] wrote: > Hello all, > > New user to python. I can write to a file, however, I would like to > do both...whatever I do on the screen, I'd like to write it to a file. > > any pointers on where I can find this info. > > thanks, Something like this, perhaps? cl

Re: Question by someone coming from C...

2008-06-10 Thread Bruno Desthuilliers
Skye a écrit : Writing this app in Python, not sure what the "best practice" would be. I want a bitfield global logging level that allows me to turn specific debugging modules on and off. If I was doing this in C, I'd just use some globals like: unsigned int debug_level = 0; #define DEBUG_GENE

Re: Separators inside a var name

2008-06-10 Thread MRAB
On Jun 10, 6:59 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Mon, 9 Jun 2008 17:53:58 -0700 (PDT), Rainy <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > > > This is actually pretty nice. I think I like this much better > > than C/Java/etc convention. I wouldn't use

Py2exe and name space package

2008-06-10 Thread Yuan HOng
Hi, I used to freeze my application into Windows executibles using py2exe. Lately I started using several zope packages in my application, like zope.interface. Now the freezed program can't run properly. Like the following example shows: My setup.py file: from distutils.core import setup import

EXE is very slow by starting (>10sec.) (build with PyInstaller)

2008-06-10 Thread Mark Delon
Hi, My Python executable created with PyInstaller is too slow by starting... It takes about 15 secs.!!! I am using PyQt4 libraries for creating my very simple GUI-application. -> How can I SPEED UP my executable ??? -> Do you know some GOOD build switches? Thank you very much for every idea...

Re: TWITTER API and urllib2

2008-06-10 Thread Mike
On Tue, Jun 10, 2008 at 10:42 PM, Mike <[EMAIL PROTECTED]> wrote: > Hello, > > I've spent the last couple of nights hacking away at a Python wrapper for > the Twitter API that I can use for various things. > > I'm having trouble with one of the methods: user_timeline. ( > http://groups.google.com/

TWITTER API and urllib2

2008-06-10 Thread Mike
Hello, I've spent the last couple of nights hacking away at a Python wrapper for the Twitter API that I can use for various things. I'm having trouble with one of the methods: user_timeline. ( http://groups.google.com/group/twitter-development-talk/web/api-documentation#HelpMethods ). This is th

DICOM library

2008-06-10 Thread ustrum
Hi everybody! I've been looking for a python library wich allows me to work with with DICOM files, for medical image processing. Finding nothing at first, evenctually i've find the gdcm library, wich is suposed to be for c developement, but they say that you can use it with python, as "It is automa

Re: Python, subprocess, dump, gzip and Cron

2008-06-10 Thread Sebastian "lunar" Wiesner
Aidan <[EMAIL PROTECTED]> at Dienstag 10 Juni 2008 07:21: > TT wrote: >> On Jun 10, 2:37 pm, Aidan <[EMAIL PROTECTED]> wrote: >>> Hi, >>> >>> I'm having a bit of trouble with a python script I wrote, though I'm not >>> sure if it's related directly to python, or one of the other software >>> pack

Re: Separators inside a var name

2008-06-10 Thread Sebastian "lunar" Wiesner
[EMAIL PROTECTED] <[EMAIL PROTECTED]> at Montag 09 Juni 2008 23:39: > On 9 juin, 20:05, "Sebastian \"lunar\" Wiesner" > <[EMAIL PROTECTED]> wrote: >> Rainy <[EMAIL PROTECTED]> at Montag 09 Juni 2008 19:29: >> > (snip) >> > From what I understand, scheme can have variables like var-name. I'm >> >

Re: Separators inside a var name

2008-06-10 Thread Sebastian "lunar" Wiesner
Rainy <[EMAIL PROTECTED]> at Dienstag 10 Juni 2008 02:53: > Well, I agree, this is terrible. If I were Guido I'd > make a very explicit rule that a certain naming > scheme is preferred and other schemes are very bad. FWIW, there is a preferred naming scheme outlined in PEP 8. -- Freedom is alw

Python for the web

2008-06-10 Thread Noorhan Abbas
Hello, I have developed a python tool that basically does two things: 1. Allow the user to search for a keyword or a group of Keywords in a specailized collection of text files.  This search option is part of a massive custom tree control that was developed using wxpython. 2. The rest of the tree

unable to import modules from other folders

2008-06-10 Thread moijes12
Hi friends I have a module "bigbee" in folder C:\MyDocs\BigBee and another module "foo" needs to import from this.however, "foo" is in D:\foo. foo.py : from bigbee import * The error i get is: ImportError: No Module bigbee. Please provide a solution. -- http://mail.python.org/mailman/listinfo

Re: unable to import modules from other folders

2008-06-10 Thread morton . thomas
C:\MyDocs needs to be in the sys.path variable for python to include it in it's search for modules Try this: import sys sys.path.append('C:\MyDocs') If you are packaging your program for reuse or later move that folder bear in mind it will *break* A better method would be to place the module in

Re: Parsing a path to components

2008-06-10 Thread Scott David Daniels
eliben wrote: ... a prety good try ... def parse_path(path): """...""" By the way, the comment is fine. I am going for brevity here. lst = [] while 1: head, tail = os.path.split(path) if tail == '': if head != '': lst.insert(0, head) break

h2py.py bug?

2008-06-10 Thread Gabriel Rossetti
Hello everyone, I wanted to use the h2py.py script (Tools/scripts/h2py.py) and it didn't like char litterals : Skipping: PC_ERROR = ord() where my *.h file contained : #define PC_ERROR '0' I searched the web and found a post with the same error : http://mail.python.org/pipermail/python-lis

Re: EXE is very slow by starting (>10sec.) (build with PyInstaller)

2008-06-10 Thread Diez B. Roggisch
Mark Delon wrote: > Hi, > > My Python executable created with PyInstaller is too slow by starting... > It takes about 15 secs.!!! > > I am using PyQt4 libraries for creating my very simple GUI-application. > > -> How can I SPEED UP my executable ??? Try profiling it. I'm not an PyInstaller-us

chm file for download?

2008-06-10 Thread John Salerno
Is the chm doc file available for download from the Python website? I can't seem to find it. It would be nice to read through while I'm at work (where I don't have Python installed). Also, is it possible to use a chm file on Linux? Thanks. -- http://mail.python.org/mailman/listinfo/python-li

Re: chm file for download?

2008-06-10 Thread Mike Driscoll
On Jun 10, 8:15 am, "John Salerno" <[EMAIL PROTECTED]> wrote: > Is the chm doc file available for download from the Python website? I can't > seem to find it. It would be nice to read through while I'm at work (where I > don't have Python installed). > > Also, is it possible to use a chm file on Li

Re: Do this as a list comprehension?

2008-06-10 Thread John Salerno
"Mensanator" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Jun 8, 9:40 pm, John Salerno <[EMAIL PROTECTED]> wrote: > Mensanator wrote: > Heh heh, don't worry. Every time I see a range function, I immediately > think "creates a list". Not sure how I got into that habit, but it > h

Re: Python, subprocess, dump, gzip and Cron

2008-06-10 Thread Aidan
Sebastian "lunar" Wiesner wrote: Aidan <[EMAIL PROTECTED]> at Dienstag 10 Juni 2008 07:21: TT wrote: On Jun 10, 2:37 pm, Aidan <[EMAIL PROTECTED]> wrote: Hi, I'm having a bit of trouble with a python script I wrote, though I'm not sure if it's related directly to python, or one of the other

Re: chm file for download?

2008-06-10 Thread John Salerno
"Mike Driscoll" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Jun 10, 8:15 am, "John Salerno" <[EMAIL PROTECTED]> wrote: --- Looks like the chm file is in the Documentation section on the main download page: http://www.python.org/download/releases/2.5.2/ --- Ah, thanks! I guess

Re: Alternative to Decimal type

2008-06-10 Thread Ethan Furman
Mel wrote: Frank Millman wrote: Hi all I have a standard requirement for a 'decimal' type, to instantiate and manipulate numeric data that is stored in a database. I came up with a solution long before the introduction of the Decimal type, which has been working well for me. I know the 'scale'

Re: Py2exe and name space package

2008-06-10 Thread Mike Driscoll
On Jun 10, 4:28 am, "Yuan HOng" <[EMAIL PROTECTED]> wrote: > Hi, > > I used to freeze my application into Windows executibles using py2exe. > Lately I started using several zope packages in my application, like > zope.interface. Now the freezed program can't run properly. Like the > following examp

Re: PEP on breaking outer loops with StopIteration

2008-06-10 Thread nwinters3000
On Jun 9, 10:50 pm, Dan Bishop <[EMAIL PROTECTED]> wrote: > On Jun 9, 8:07 pm, "Kris Kowal" <[EMAIL PROTECTED]> wrote: > > > I had a thought that might be pepworthy.  Might we be able to break > > outer loops using an iter-instance specific StopIteration type? > > > You can break out of outer loops

Determining which things in 'from package import *' are actually used

2008-06-10 Thread Patrick Bouffard
I have a fairly large library of Python code, where 'from package import *' is used rather liberally, and it's not uncommon for more than one of these to appear in any given module. What I'd like to be able to do is to clean my code up a bit and turn each of the 'from package import *' statements i

Re: DICOM library

2008-06-10 Thread mathieu
On Jun 10, 1:05 pm, [EMAIL PROTECTED] wrote: > Hi everybody! > I've been looking for a python library wich allows me to work with > with DICOM files, for medical image processing. Finding nothing at > first, evenctually i've find thegdcmlibrary, wich is suposed to be > for c developement, but they

str to float (rounded)

2008-06-10 Thread Nader
Hello, I have a list of tuple with strin elements. These elements are number, but they are save as string. Now I will change the string to number which will be rounded. An example will make it more clear. t = [('35.757', '-0.239'), ('33.332', '-2.707'), ('33.640', '-2.423')] And I will have the

Re: str to float (rounded)

2008-06-10 Thread Diez B. Roggisch
Nader wrote: > Hello, > > I have a list of tuple with strin elements. These elements are number, > but they are save as string. Now I will change the string to number > which will be rounded. An example will make it more clear. > > t = [('35.757', '-0.239'), ('33.332', '-2.707'), ('33.640', '-2.

Re: Py2exe and name space package

2008-06-10 Thread Yuan HOng
On 6/10/08, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > I include the lxml package in some of my programs and I do so by > adding the following to the setup.py > > packages = ['lxml'] > > However, I'm not sure if what you want to add is truly a package. > Yours might go into the "includes" direct

Instructions on how to build py2exe 0.6.8 (or an installer would be nice, too!)

2008-06-10 Thread chardish
Hello, I'm trying to build an executable with py2exe, but unfortunately the version I have is 0.6.6, which has a rather annoying bug that doesn't let you rename the executable file if you bundle everything in a single executable. It seems fairly unacceptable to tell our customers that they can't r

proposal: give delattr ability to ignore missing attribute

2008-06-10 Thread Gary Wilson
I would like to propose that functionality be added to delattr to handle the case when the attribute does not exist. First off, getattr handles this nicely with the default parameter: value = getattr(obj, 'foo', False) instead of: try: value = getattr(obj, 'foo') except AttributeError:

Dumb idea?

2008-06-10 Thread Peter Hunt
Hi everyone - I like playing around with language syntax and semantics. I'm thinking about pulling down the PyPy code and messing around to see what I can accomplish. My first idea is most succinctly described by example: class IBlockProtocol: def __block__(self, func): # NO RETURN VA

Re: Instructions on how to build py2exe 0.6.8 (or an installer would be nice, too!)

2008-06-10 Thread Thomas Heller
[EMAIL PROTECTED] schrieb: > Hello, > > I'm trying to build an executable with py2exe, but unfortunately the > version I have is 0.6.6, which has a rather annoying bug that doesn't > let you rename the executable file if you bundle everything in a > single executable. It seems fairly unacceptable

Re: str to float (rounded)

2008-06-10 Thread Nader
On Jun 10, 4:30 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Nader wrote: > > Hello, > > > I have a list of tuple with strin elements. These elements are number, > > but they are save as string. Now I will change the string to number > > which will be rounded. An example will make it more cl

Re: Instructions on how to build py2exe 0.6.8 (or an installer would be nice, too!)

2008-06-10 Thread chardish
On Jun 10, 11:07 am, Thomas Heller <[EMAIL PROTECTED]> wrote: > You need the same compiler that was used to build the > Python that you use. Thanks for the tip. So if I downloaded a binary Python instead of building it from sources, I'm out of luck? -- http://mail.python.org/mailman/listinfo/pytho

Advice for a python newbie on parsing whois records?

2008-06-10 Thread Phillip B Oldham
Hi. I'm stretching my boundaries in programming with a little python shell-script which is going to loop through a list of domain names, grab the whois record, parse it, and put the results into a csv. I've got the results coming back fine, but since I have *no* experience with python I'm wonderin

Re: chm file for download?

2008-06-10 Thread member thudfoo
On 6/10/08, John Salerno <[EMAIL PROTECTED]> wrote: > Is the chm doc file available for download from the Python website? I can't > seem to find it. It would be nice to read through while I'm at work (where I > don't have Python installed). > > Also, is it possible to use a chm file on Linux? >

Re: Does the python library of Google Data API is truly free?

2008-06-10 Thread Lie
On Jun 10, 2:49 pm, Kless <[EMAIL PROTECTED]> wrote: > On 9 jun, 22:46, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > > Kless schrieb: > > > > On 9 jun, 21:40, Lie <[EMAIL PROTECTED]> wrote: > > >> Do you notice that the terms are for the SERVICE not for the SOFTWARE. > > >> The terms for the s

Re: str to float (rounded)

2008-06-10 Thread Diez B. Roggisch
> > If I do the next : > > t1 = [(round(float(x),1), round(float(y),2)) for x, y in t] > > I get the long float as : > > [(35.797, -0.23999), (33.297, > -2.71), (33.601,-2.4199)] > > But I would have a float with 2 decimal numbers.

Building 64-bit Python on AIX

2008-06-10 Thread Michael Mabin
Hi all. I am trying to rebuild Python on our AIX system in 64 bit so I can use our installed 64-bit UnixODBC library. Has anyone successfully done this and can they share the configure options they used? Thanks. Mike -- -- http://mail.python.org/mailman/listinfo/python-list

Re: Advice for a python newbie on parsing whois records?

2008-06-10 Thread Lie
On Jun 10, 9:47 pm, Phillip B Oldham <[EMAIL PROTECTED]> wrote: > Hi. I'm stretching my boundaries in programming with a little python > shell-script which is going to loop through a list of domain names, > grab the whois record, parse it, and put the results into a csv. > > I've got the results co

Re: Instructions on how to build py2exe 0.6.8 (or an installer would be nice, too!)

2008-06-10 Thread Mike Driscoll
On Jun 10, 10:04 am, [EMAIL PROTECTED] wrote: > Hello, > > I'm trying to build an executable with py2exe, but unfortunately the > version I have is 0.6.6, which has a rather annoying bug that doesn't > let you rename the executable file if you bundle everything in a > single executable. It seems fa

Re: Does the python library of Google Data API is truly free?

2008-06-10 Thread Diez B. Roggisch
> I don't speak about hosting else rights about data, data that are > entered by people: > > "By submitting, posting or displaying the content you give > Google a perpetual, irrevocable, worldwide, royalty-free, and non- > exclusive license to reproduce, adapt, modify, translate, publish, > public

Re: Building 64-bit Python on AIX

2008-06-10 Thread Michael Mabin
Oops. Forgot to mention this is AIX 5.3 and I'm trying to install Python 2.5.2. Using xlc compiler. On Tue, Jun 10, 2008 at 10:34 AM, Michael Mabin <[EMAIL PROTECTED]> wrote: > Hi all. I am trying to rebuild Python on our AIX system in 64 bit so I can > use our installed 64-bit UnixODBC library

Re: Does the python library of Google Data API is truly free?

2008-06-10 Thread Dan Upton
>> Or if they prohibit you to host malicious, offending or otherwise >> problematic content served by the free apache - is that "against free >> software?" > Please, don't be demagogue. Please don't be [a] troll? I fail to see what is so hard to understand about the difference between free so

Re: EXE is very slow by starting (>10sec.) (build with PyInstaller)

2008-06-10 Thread Lie
On Jun 10, 5:29 pm, "Mark Delon" <[EMAIL PROTECTED]> wrote: > Hi, > > My Python executable created with PyInstaller is too slow by starting... > It takes about 15 secs.!!! > > I am  using PyQt4 libraries for creating my very simple GUI-application. > > -> How can I SPEED UP my executable ??? > -> D

Re: Instructions on how to build py2exe 0.6.8 (or an installer would be nice, too!)

2008-06-10 Thread chardish
On Jun 10, 11:34 am, Mike Driscoll <[EMAIL PROTECTED]> wrote: > Maybe I'm missing something, but I can rename the executables I create > using py2exe 0.6.6 to anything I want after they're created. > > Or are you talking about a Windows installer for the py2exe module > itself? Where are you findin

mysql to sqlite

2008-06-10 Thread Gandalf
I'm trying to convert mysql database to sqlite. is their any free tool that does that? I can convert my mysql db to XML file through phpmyadmin, will it be easier to convert from XML to SQlite then from Mysql? -- http://mail.python.org/mailman/listinfo/python-list

Re: proposal: give delattr ability to ignore missing attribute

2008-06-10 Thread Lie
On Jun 10, 10:06 pm, Gary Wilson <[EMAIL PROTECTED]> wrote: > I would like to propose that functionality be added to delattr to > handle the case when the attribute does not exist. > > First off, getattr handles this nicely with the default parameter: > > value = getattr(obj, 'foo', False) > > inst

Python doesn't understand %userprofile%

2008-06-10 Thread bsagert
In xp when I try os.path.getmtime("%userprofile/dir/file%") Python bites back with "cannot find the path specified" Since my script has to run on machines where the username is unspecified I need a fix. Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python doesn't understand %userprofile%

2008-06-10 Thread bsagert
On Jun 10, 8:56 am, [EMAIL PROTECTED] wrote: > In xp when I try os.path.getmtime("%userprofile/dir/file%") Python > bites back with "cannot find the path specified" Since my script has > to run on machines where the username is unspecified I need a fix. > Thanks in advance. oops that should be os.

Re: Web Crawler - Python or Perl?

2008-06-10 Thread disappearedng
As to why as opposed to what, I am attempting to build a search engine right now that plans to crawl not just html but other things too. I am open to learning, and I don't want to learn anything that doesn't really contribute to building my search engine for the moment. Hence I want to see whether

Re: Python doesn't understand %userprofile%

2008-06-10 Thread Tim Golden
[EMAIL PROTECTED] wrote: In xp when I try os.path.getmtime("%userprofile/dir/file%") Python bites back with "cannot find the path specified" Since my script has to run on machines where the username is unspecified I need a fix. Well I can see a few problems here. First is that putting percent

chained exceptions

2008-06-10 Thread Rowland Smith
Is anyone aware of a module or recipe for defining a composite/chained exception superclass? I've seen the PEP on chained exceptions wrt Python-3K, but I'm looking for something that is 2.5 compatible. -Rowland --- "The Dude abides." - The Dude, The Bi

Re: Python doesn't understand %userprofile%

2008-06-10 Thread Lie
On Jun 10, 11:11 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > In xp when I try os.path.getmtime("%userprofile/dir/file%") Python > > bites back with "cannot find the path specified" Since my script has > > to run on machines where the username is unspecified I need a fix

problems with opening files due to file's path

2008-06-10 Thread Alexnb
Okay, so what I want my program to do it open a file, a music file in specific, and for this we will say it is an .mp3. Well, I am using the system() command from the os class. The problem I am running into is that when I send the path of the file to the system() command, which for those of you wh

Re: mysql to sqlite

2008-06-10 Thread Gerhard Häring
Gandalf wrote: I'm trying to convert mysql database to sqlite. is their any free tool that does that? I can convert my mysql db to XML file through phpmyadmin, will it be easier to convert from XML to SQlite then from Mysql? Did you look at http://www.sqlite.org/cvstrac/wiki?p=ConverterTools

Re: problems with opening files due to file's path

2008-06-10 Thread Gerhard Häring
Alexnb wrote: Okay, so what I want my program to do it open a file, a music file in specific, and for this we will say it is an .mp3. Well, I am using the system() command from the os class. [...] system("\"C:\Documents and Settings\Alex\My Documents\My Music\Rhapsody\Bryanbros\Weezer\(2001)\04

Re: problems with opening files due to file's path

2008-06-10 Thread Alexnb
Gerhard Häring wrote: > > Alexnb wrote: >> Okay, so what I want my program to do it open a file, a music file in >> specific, and for this we will say it is an .mp3. Well, I am using the >> system() command from the os class. [...] >> >> system("\"C:\Documents and Settings\Alex\My Documents\My

Re: eric4 wont start

2008-06-10 Thread Detlev Offenbach
Hi, please try with the latest release, which is 4.1.5, and report back. Regards, Detlev dusans wrote: > Hi i took a look at eric4, its nice, cuz u have the script output and > console in the same window, which is why i love pyscripter. > Then i upgradet eric4 to newest version: eric4-4.0.4, it

Re: Instructions on how to build py2exe 0.6.8 (or an installer would be nice, too!)

2008-06-10 Thread Mike Driscoll
On Jun 10, 10:47 am, [EMAIL PROTECTED] wrote: > On Jun 10, 11:34 am, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > > > Maybe I'm missing something, but I can rename the executables I create > > using py2exe 0.6.6 to anything I want after they're created. > > > Or are you talking about a Windows in

Re: problems with opening files due to file's path

2008-06-10 Thread Mike Driscoll
On Jun 10, 11:45 am, Alexnb <[EMAIL PROTECTED]> wrote: > Gerhard Häring wrote: > > > Alexnb wrote: > >> Okay, so what I want my program to do it open a file, a music file in > >> specific, and for this we will say it is an .mp3. Well, I am using the > >> system() command from the os class. [...] >

Re: Python doesn't understand %userprofile%

2008-06-10 Thread Mike Driscoll
On Jun 10, 11:11 am, Tim Golden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > In xp when I try os.path.getmtime("%userprofile/dir/file%") Python > > bites back with "cannot find the path specified" Since my script has > > to run on machines where the username is unspecified I need a fix

make more money

2008-06-10 Thread kumarvs06561
make more money internet jobs easy way to make money http://kumarpracticals.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: proposal: give delattr ability to ignore missing attribute

2008-06-10 Thread Fuzzyman
On Jun 10, 4:55 pm, Lie <[EMAIL PROTECTED]> wrote: > On Jun 10, 10:06 pm, Gary Wilson <[EMAIL PROTECTED]> wrote: > > > > > I would like to propose that functionality be added to delattr to > > handle the case when the attribute does not exist. > I've never once needed that functionality. In fact I

Re: problems with opening files due to file's path

2008-06-10 Thread Alexnb
Hey thanks!, both the raw and the double backslashes worked. You are a gentleman and a scholar. Mike Driscoll wrote: > > On Jun 10, 11:45 am, Alexnb <[EMAIL PROTECTED]> wrote: >> Gerhard Häring wrote: >> >> > Alexnb wrote: >> >> Okay, so what I want my program to do it open a file, a music file

Re: Instructions on how to build py2exe 0.6.8 (or an installer would be nice, too!)

2008-06-10 Thread chardish
On Jun 10, 1:11 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote: > On Jun 10, 10:47 am, [EMAIL PROTECTED] wrote: > > > > > On Jun 10, 11:34 am, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > > Maybe I'm missing something, but I can rename the executables I create > > > using py2exe 0.6.6 to anything I

Re: problems with opening files due to file's path

2008-06-10 Thread Alexnb
Well, now i've hit another problem, this time being that the path will be a variable, and I can't figure out how to make startfile() make it raw with a variable, if I put startfile(r variable), it doesn't work and startfile(rvariable) obviously won't work, do you know how to make that work or bett

Re: Python doesn't understand %userprofile%

2008-06-10 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > In xp when I try os.path.getmtime("%userprofile/dir/file%") Python > bites back with "cannot find the path specified" Since my script has > to run on machines where the username is unspecified I need a fix. > Thanks in advance. >>> os.path.expanduser("~/dir/file") 'C:\\

Re: Why does python not have a mechanism for data hiding?

2008-06-10 Thread Russ P.
On Jun 10, 1:04 am, Bruno Desthuilliers wrote: > If you hope to get a general agreement here in favor of a useless > keyword that don't bring anything to the language, then yes, I'm afraid > you're wasting your time. Actually, what I hope to do is to "take something away" from the language, and

Re: Python doesn't understand %userprofile%

2008-06-10 Thread [EMAIL PROTECTED]
On Jun 10, 2:09 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > In xp when I try os.path.getmtime("%userprofile/dir/file%") Python > > bites back with "cannot find the path specified" Since my script has > > to run on machines where the username is unspecified I need a fi

Re: problems with opening files due to file's path

2008-06-10 Thread Alexnb
No this time it perhaps gave me the worst of all heres what I entered, and the output >>> startfile(r"%s"%full)***full is the path*** startfile(r"%s"%full) WindowsError: [Error 2] The system cannot find the file specified: '"C:\\Documents and Settings\\Alex\\My Documents\\My Music\\Rhapsody

Re: problems with opening files due to file's path

2008-06-10 Thread Thomas Morton
maybe try string substitution... not sure if that's really the BEST way to do it but it should work startfile(r"%s"%variable) -- From: "Alexnb" <[EMAIL PROTECTED]> Sent: Tuesday, June 10, 2008 7:05 PM To: Subject: Re: problems with opening files

Re: Python for the web

2008-06-10 Thread Daniel Fetchinson
> Hello, > I have developed a python tool that basically does two things: > 1. Allow the user to search for a keyword or a group of Keywords in a > specailized collection of text files. This search option is part of a > massive custom tree control that was developed using wxpython. > 2. The rest o

Re: problems with opening files due to file's path

2008-06-10 Thread Mike Driscoll
On Jun 10, 1:25 pm, "Thomas Morton" <[EMAIL PROTECTED]> wrote: > maybe try string substitution... not sure if that's really the BEST way to > do it but it should work > > startfile(r"%s"%variable) I concur. That should work. A slightly more in depth example (assuming Windows): os.startfile(r'C:\

BANKRUPTCY LAWYER

2008-06-10 Thread MERLIN
** http://bankruptcylawyer1.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does python not have a mechanism for data hiding?

2008-06-10 Thread Patrick Mullen
Hi Russ, Here are just some pragmatic considerations. Personally I am against data hiding, but I obviously won't convince you in that regard. There are some pros and cons as with anything, and I feel the cons outweight the pros (namely that users of code should be able to use how they want, even

Re: problems with opening files due to file's path

2008-06-10 Thread Alexnb
That would work, but not for what I want. See the file could be anywhere on the user's system and so the entire path will be unique, and that didn't work with a unique path. What is the subprocess module you are talking about? Mike Driscoll wrote: > > On Jun 10, 1:25 pm, "Thomas Morton" <[EMAIL

Re: Web Crawler - Python or Perl?

2008-06-10 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > As to why as opposed to what, I am attempting to build a search engine > right now that plans to crawl not just html but other things too. > > I am open to learning, and I don't want to learn anything that doesn't > really contribute to building my search engine for the

Re: Why does python not have a mechanism for data hiding?

2008-06-10 Thread Jonathan Gardner
On Jun 10, 11:21 am, "Russ P." <[EMAIL PROTECTED]> wrote: > I took a risk in choosing Python, and I would > feel better about it if Python would move up to the next level with > more advanced features such as (optional) static typing and private > declarations. But every time I propose something li

Re: problems with opening files due to file's path

2008-06-10 Thread Thomas Morton
heh thanks Mike - glad im not going mad :P Just tested locally in IDLE (I know I know!) and it works for me like this: test = os.path.join(os.getcwd(),"NEWS.txt") test 'D:\\Python25\\NEWS.txt' os.startfile(r"%s"%test) And the file opens... Does the file definitely exist? Tom

Re: Determining which things in 'from package import *' are actually used

2008-06-10 Thread Robert Kern
Patrick Bouffard wrote: I have a fairly large library of Python code, where 'from package import *' is used rather liberally, and it's not uncommon for more than one of these to appear in any given module. What I'd like to be able to do is to clean my code up a bit and turn each of the 'from pack

Re: Python doesn't understand %userprofile%

2008-06-10 Thread Tim Golden
[EMAIL PROTECTED] wrote: On Jun 10, 2:09 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: In xp when I try os.path.getmtime("%userprofile/dir/file%") Python bites back with "cannot find the path specified" Since my script has to run on machines where the username is unspecif

Re: problems with opening files due to file's path

2008-06-10 Thread Carsten Haese
Alexnb wrote: No this time it perhaps gave me the worst of all heres what I entered, and the output startfile(r"%s"%full)***full is the path*** startfile(r"%s"%full) WindowsError: [Error 2] The system cannot find the file specified: '"C:\\Documents and Settings\\Alex\\My Documents\\My Mu

Re: Advice for a python newbie on parsing whois records?

2008-06-10 Thread Miki
Hello, > Hi. I'm stretching my boundaries in programming with a little python > shell-script which is going to loop through a list of domain names, > grab the whois record, parse it, and put the results into a csv. > > I've got the results coming back fine, but since I have *no* > experience with

Re: problems with opening files due to file's path

2008-06-10 Thread Mike Driscoll
On Jun 10, 2:09 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > Alexnb wrote: > > No this time it perhaps gave me the worst of all heres what I entered, and > > the output > > startfile(r"%s"%full)    ***full is the path*** > > > startfile(r"%s"%full) > > > WindowsError: [Error 2] The system ca

Re: problems with opening files due to file's path

2008-06-10 Thread Mike Driscoll
On Jun 10, 1:57 pm, Alexnb <[EMAIL PROTECTED]> wrote: > That would work, but not for what I want. See the file could be anywhere on > the user's system and so the entire path will be unique, and that didn't > work with a unique path. What is the subprocess module you are talking > about? > As C

Re: How to kill a thread?

2008-06-10 Thread Rhamphoryncus
On Jun 10, 1:55 am, Antoon Pardon <[EMAIL PROTECTED]> wrote: > On 2008-06-09, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > > > > > On Jun 9, 5:33 am, Antoon Pardon <[EMAIL PROTECTED]> wrote: > >> On 2008-06-07, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > > >> > On Jun 6, 12:44 pm, The Pythonista <[EMA

Re: post-mortem from core dump

2008-06-10 Thread peter
Bump Has noone ever needed this? On Jun 9, 10:58 am, peter <[EMAIL PROTECTED]> wrote: > AFAIK pdb only can do postmortem debugging if fed a Python stack > trace. Is there any way to obtain such a stack trace if all you've got > is a core dump? > > Or, put another way: can I do post-mortem debuggi

  1   2   >