Re: Cannot install python under Win32

2008-06-10 Thread Payala
Hi Martin, I checked the md5 checksum, it is the following: d806af2312a33a8d817a6cc3d2ee7bed *python-2.5.2.msi which doesn't match with the one on the website ( http://www.python.org/download/releases/2.5.2/ ) d71e45968fdc4e206bb69fbf4cb82b2d python-2.5.2.msi (11294720 bytes, signature) File si

Re: Using ElementTree as backend for a chat web application issues

2008-06-10 Thread Marcelo de Moraes Serpa
Well folks, I appreciate your help, but I've got the problem solved by re-implementing the chat backend (server) in Rails. It is working great now (persisting the data in a mysql database, instead of XML files). At least this has led me to search more about concurrent issues and programming. I'm s

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

2008-06-10 Thread Russ P.
On Jun 10, 11:58 am, Jonathan Gardner > Who cares what the type of an object is? Only the machine. Being able > to tell, in advance, what the type of a variable is is a premature > optimization. Tools like psyco prove that computers (really, > programmers) nowadays are smart enough to figure thing

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

2008-06-10 Thread Niklas Norrthon
On 6 Juni, 03:09, "Russ P." <[EMAIL PROTECTED]> wrote: > On Jun 5, 2:57 pm, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > > > "Russ P." <[EMAIL PROTECTED]> writes: > > > By the way, my recollection is that in C++ access defaults to private > > > if nothing is declared explicity. So normally the "priva

Re: time.clock() or Windows bug?

2008-06-10 Thread Tim Roberts
Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > >Hmmm, 10,000,000 cycles (40 ms @2.5GHz) is nowhere near the ~90,000 >second jump in time.clock() output reported by the OP. I wonder if >there could be a different cause? Just wild theorizing, but it's possible that they are actually getting a negativ

Re: Producer-consumer threading problem

2008-06-10 Thread Carl Banks
On Jun 10, 11:33 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > I'd like some feedback on a solution to a variant of the producer- > consumer problem. My first few attempts turned out to deadlock > occasionally; this one seems to be deadlock-free so far but I can't > tell if it's provably correct,

Re: Producer-consumer threading problem

2008-06-10 Thread Rhamphoryncus
Why not use a normal Queue, put a dummy value (such as None) in when you're producer has finished, and have the main thread use the normal Thread.join() method on all your child threads? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to kill a thread?

2008-06-10 Thread Rhamphoryncus
On Jun 10, 3:41 pm, Fuzzyman <[EMAIL PROTECTED]> wrote: > On Jun 10, 2:03 am, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > > So how does .NET deal with the sys.stdout corruption? Does it? > > That has never been an issue for us. Of course. It's far more likely to hit the underlying blocked I/O tha

Re: Producer-consumer threading problem

2008-06-10 Thread George Sakkis
On Jun 10, 11:47 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > > I had a little trouble understanding what exact problem it is that you are > trying to solve but I'm pretty sure that you can do it with one of two > methods: Ok, let me try again with a different example: I want to do what can be ea

Re: Confusion with weakref, __del__ and threading

2008-06-10 Thread Rhamphoryncus
On Jun 10, 8:15 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > I'm baffled with a situation that involves: > 1) an instance of some class that defines __del__, > 2) a thread which is created, started and referenced by that instance, > and > 3) a weakref proxy to the instance that is passed to the t

Thanks for help re: %userprofile%

2008-06-10 Thread bsagert
The python community is very helpful to newbies like me. I did however manage to solve my problem in the meantime. I needed the modification time of certain files on various computers, but I didn't know the usernames ahead of time, so I used windows %userprofile% method. Python likes forward slash

catastrophic regexp, help!

2008-06-10 Thread cirfu
pat = re.compile("(\w* *)*") this matches all sentences. if fed the string "are you crazy? i am" it will return "are you crazy". i want to find a in a big string a sentence containing Zlatan Ibrahimovic and some other text. ie return the first sentence containing the name Zlatan Ibrahimovic. pat

Re: Producer-consumer threading problem

2008-06-10 Thread Larry Bates
George Sakkis wrote: I'd like some feedback on a solution to a variant of the producer- consumer problem. My first few attempts turned out to deadlock occasionally; this one seems to be deadlock-free so far but I can't tell if it's provably correct, and if so, whether it can be simplified. The g

Re: Using ElementTree as backend for a chat web application issues

2008-06-10 Thread Gabriel Genellina
En Mon, 09 Jun 2008 15:32:00 -0300, Marcelo de Moraes Serpa <[EMAIL PROTECTED]> escribió: I've built a chat with a front-end Ajax client and backend usign ElementTree to persist the data. In some circunstances I could not yet discover (it seems random) when I edit/save the structure, the st

Producer-consumer threading problem

2008-06-10 Thread George Sakkis
I'd like some feedback on a solution to a variant of the producer- consumer problem. My first few attempts turned out to deadlock occasionally; this one seems to be deadlock-free so far but I can't tell if it's provably correct, and if so, whether it can be simplified. The generic producer-consume

Re: Problem with TimedRotatingFileHandler

2008-06-10 Thread Gabriel Genellina
En Thu, 05 Jun 2008 04:14:07 -0300, <[EMAIL PROTECTED]> escribió: Hi everyone I'm trying to use python's logging mechanism to write exception data into a log file with the TimedRotatingFileHandler but the rotating of the file is not working... Here's a bit of sample code of what I'm doing

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

2008-06-10 Thread Alexnb
I don't think you understand it doesn't matter how the variable gets there, the same code is run regardless, I have no problem with the GUI, but you asked, and so I told you. the code os.startfile( is run if there is a GUI or it is a console app. Carsten Haese-2 wrote: > > Alexnb wrote: >>

Re: Dynamic HTML from Python Script

2008-06-10 Thread Aidan
Aidan wrote: asdf wrote: On Wed, 11 Jun 2008 11:20:48 +1000, Aidan wrote: asdf wrote: Well, there's a few ways you could approach it. You could create a cgi program from your script - this is probably the solution you're looking for. Output from the script does come up very often. There i

Re: Dynamic HTML from Python Script

2008-06-10 Thread Aidan
asdf wrote: On Wed, 11 Jun 2008 11:20:48 +1000, Aidan wrote: asdf wrote: Well, there's a few ways you could approach it. You could create a cgi program from your script - this is probably the solution you're looking for. Output from the script does come up very often. There is a new output

Earn $5000 + /mo Just by clicking Ads :: all u need is a internet connection

2008-06-10 Thread mathewedward
Did you know there are sites that are willing to pay you to click Ads? Did you also know that it's FREE to sign up to them? You can earn moneyonline, right now, there are already tens of thousands of people that are paid to work at home, some are making a tidy sum just by clickingon a link. PTC's o

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

2008-06-10 Thread Grant Edwards
On 2008-06-11, Alexnb <[EMAIL PROTECTED]> wrote: path = "C:\Documents and Settings\Alex\My Documents\My Music\Rhapsody\Bryanbros\Jason Mraz\I'm Yours (Single)\01 - I'm Yours.wma" Your string doesn't contain what you think it does. Do a "print path". Hint: the string "\01" consist

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

2008-06-10 Thread Carsten Haese
Alexnb wrote: Okay, I don't understand how it is too vague, but here: > [snip a bunch of irrelevant examples...] Did I clarify? No. Earlier you wrote: On 2008-06-11, Alexnb <[EMAIL PROTECTED]> wrote: I am using GUI, Tkinter to be exact. But regardless of how the path gets there, it needs

Re: Code correctness, and testing strategies

2008-06-10 Thread Ben Finney
David <[EMAIL PROTECTED]> writes: > On Sun, Jun 8, 2008 at 12:28 PM, Ben Finney > <[EMAIL PROTECTED]> wrote: > > I did do it in a mostly top-down way, but didn't stop the BDD > process to actually run the app :-) > > It sounds like what you are suggesting is something like this: > > 1) Followin

Re: Dynamic HTML from Python Script

2008-06-10 Thread Mike
On Wed, Jun 11, 2008 at 2:16 PM, asdf <[EMAIL PROTECTED]> wrote: > On Wed, 11 Jun 2008 11:20:48 +1000, Aidan wrote: > > > asdf wrote: > >>> Well, there's a few ways you could approach it. > >>> > >>> You could create a cgi program from your script - this is probably the > >>> solution you're looki

Re: Dynamic HTML from Python Script

2008-06-10 Thread asdf
On Wed, 11 Jun 2008 11:20:48 +1000, Aidan wrote: > asdf wrote: >>> Well, there's a few ways you could approach it. >>> >>> You could create a cgi program from your script - this is probably the >>> solution you're looking for. >>> >>> >> Output from the script does come up very often. There is a n

Confusion with weakref, __del__ and threading

2008-06-10 Thread George Sakkis
I'm baffled with a situation that involves: 1) an instance of some class that defines __del__, 2) a thread which is created, started and referenced by that instance, and 3) a weakref proxy to the instance that is passed to the thread instead of 'self', to prevent a cyclic reference. This probably

Re: Dynamic HTML from Python Script

2008-06-10 Thread Mike
Web.py also springs to mind, I'd say it's worth looking at. Well, in that case you could simply append the new output to a static file > every 10 seconds, or whenever there is new output. That way, you just need > to refresh the static file in your browser to see updates... Given what I > underst

Re: h2py.py bug?

2008-06-10 Thread Gabriel Genellina
En Tue, 10 Jun 2008 09:44:13 -0300, Gabriel Rossetti <[EMAIL PROTECTED]> escribió: 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 p

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

2008-06-10 Thread Alexnb
Okay, I don't understand how it is too vague, but here: >>> path = "C:\Documents and Settings\Alex\My Documents\My >>> Music\Rhapsody\Bryanbros\Jason Mraz\I'm Yours (Single)\01 - I'm >>> Yours.wma" >>> os.startfile(path) Traceback (most recent call last): File "", line 1, in os.startfile(p

Re: Dynamic HTML from Python Script

2008-06-10 Thread Larry Bates
asdf wrote: I have a python script whose output i want to dynamically display on a webpage which will be hosted using Apache. How do I do that? thanks Take a look at Django. It may be overkill for this first project but any time you spend learning it should be paid back in future projects.

Re: GIL cpu multi core usage problem

2008-06-10 Thread Gabriel Genellina
En Mon, 09 Jun 2008 15:26:09 -0300, Pau Freixes <[EMAIL PROTECTED]> escribió: Surly this is a recurring theme into python dev world, but I need your help for confirm if the follow image it's really http://www.milnou.net/~pfreixes/img/cpu_usage_gil_problem.png

Re: Dynamic HTML from Python Script

2008-06-10 Thread Aidan
asdf wrote: Well, there's a few ways you could approach it. You could create a cgi program from your script - this is probably the solution you're looking for. Output from the script does come up very often. There is a new output every 10 secs and it's possible that the script might be run i

Re: Dynamic HTML from Python Script

2008-06-10 Thread asdf
> Well, there's a few ways you could approach it. > > You could create a cgi program from your script - this is probably the > solution you're looking for. > Output from the script does come up very often. There is a new output every 10 secs and it's possible that the script might be run indefi

Re: Dynamic HTML from Python Script

2008-06-10 Thread Aidan
asdf wrote: I have a python script whose output i want to dynamically display on a webpage which will be hosted using Apache. How do I do that? thanks Well, there's a few ways you could approach it. You could create a cgi program from your script - this is probably the solution you're looki

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

2008-06-10 Thread Mike Driscoll
Evan, > > > I finally figured out how to check out the code. I'm at work now, > > where I only have VS2008 installed so I'll have to wait until I get > > home this evening to try compiling it. I'll let you know if I have any > > luck. > > > - > > Mike > > > Python Extension B

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

2008-06-10 Thread Grant Edwards
On 2008-06-11, Alexnb <[EMAIL PROTECTED]> wrote: > I am using GUI, Tkinter to be exact. But regardless of how the > path gets there, it needs to opened correctly. The problem I > am running into is that the program receives a path of a file, > either .wma or .mp3 and is supposed to open it. I run

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, 4:47 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > [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. > > >

Re: cgi, parse_header and semi-colon

2008-06-10 Thread Gabriel Genellina
En Sat, 07 Jun 2008 04:49:41 -0300, Sylvain <[EMAIL PROTECTED]> escribió: > If we upload a file with a semi-colon (i.e : "C:/my;file.jpg") : > cgi.FieldStorage.filename returns only "my" everything after the semi- > colon is missing It's a known bug: http://bugs.python.org/issue1540529 - the

Re: Question by someone coming from C...

2008-06-10 Thread John Krukoff
On Wed, 2008-06-11 at 00:43 +0200, Christian Heimes wrote: > John Krukoff wrote: > > Since you probably want access to these from many different places in > > your code, I find the simplest way is to create a logging module of your > > own (not called logging, obviously) and instantiate all of you

Re: Python doesn't understand %userprofile%

2008-06-10 Thread castironpi
On Jun 10, 6:51 pm, TheSaint <[EMAIL PROTECTED]> wrote: > On 00:11, mercoledì 11 giugno 2008 Tim Golden wrote: > > > "%USERPROFILE%/dir/file". > > os.environ('USERPROFILE') should return an info regarding that environment > variable. > I guess that, not yet tried. > -- > Mailsweeper Home :http://it

Re: TWITTER API and urllib2

2008-06-10 Thread Mike
On Tue, Jun 10, 2008 at 11:03 PM, Mike <[EMAIL PROTECTED]> wrote: > > > 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 havi

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

2008-06-10 Thread Alexnb
I am using GUI, Tkinter to be exact. But regardless of how the path gets there, it needs to opened correctly. The problem I am running into is that the program receives a path of a file, either .wma or .mp3 and is supposed to open it. I run into problems when there is either a ")" or a number next

Dynamic HTML from Python Script

2008-06-10 Thread asdf
I have a python script whose output i want to dynamically display on a webpage which will be hosted using Apache. How do I do that? thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Python doesn't understand %userprofile%

2008-06-10 Thread TheSaint
On 00:11, mercoledì 11 giugno 2008 Tim Golden wrote: > "%USERPROFILE%/dir/file". os.environ('USERPROFILE') should return an info regarding that environment variable. I guess that, not yet tried. -- Mailsweeper Home : http://it.geocities.com/call_me_not_now/index.html -- http://mail.python.org/ma

Re: Do this as a list comprehension?

2008-06-10 Thread Mensanator
On Jun 10, 6:09 pm, Lie <[EMAIL PROTECTED]> wrote: > On Jun 8, 11:11 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > > > > > On Jun 8, 4:04 am, Lie <[EMAIL PROTECTED]> wrote: > > > > On Jun 8, 8:56 am, Mensanator <[EMAIL PROTECTED]> wrote: > > > > > On Jun 7, 8:22�pm, John Salerno <[EMAIL PROTECTED

Re: money data type

2008-06-10 Thread Lie
On Jun 10, 12:02 am, Stephan Diehl <[EMAIL PROTECTED]> wrote: > Lie wrote: > > On Jun 9, 10:22 pm, Stephan Diehl <[EMAIL PROTECTED]> wrote: > >> Hi lazyweb, > >> I'm wondering, if there is a usable money data type for python available. > >> A quick search in pypi and google didn't convey anything,

Re: Do this as a list comprehension?

2008-06-10 Thread Lie
On Jun 8, 11:11 pm, Mensanator <[EMAIL PROTECTED]> wrote: > On Jun 8, 4:04 am, Lie <[EMAIL PROTECTED]> wrote: > > > > > On Jun 8, 8:56 am, Mensanator <[EMAIL PROTECTED]> wrote: > > > > On Jun 7, 8:22�pm, John Salerno <[EMAIL PROTECTED]> wrote: > > > > > Mensanator wrote: > > > > > What I DID say wa

Re: pass data from optparse to other class instances

2008-06-10 Thread Tim Arnold
On Jun 9, 5:42 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Tim Arnold schrieb: > > > > > Hi, > > I'm writing a command-line interface using optparse. The cli takes > > several options with a single action and several parameters to be used > > in the resulting worker classes. > > > I've been

Re: Question by someone coming from C...

2008-06-10 Thread Christian Heimes
John Krukoff wrote: > Since you probably want access to these from many different places in > your code, I find the simplest way is to create a logging module of your > own (not called logging, obviously) and instantiate all of your loggers > in that namespace, then import that one module as needed

Re: can't assign to literal

2008-06-10 Thread Larry Bates
maehhheeyy wrote: On Jun 10, 1:21 pm, Matimus <[EMAIL PROTECTED]> wrote: On Jun 10, 12:53 pm, maehhheeyy <[EMAIL PROTECTED]> wrote: this is stopping my program from running properly. is there something wrong in my code when that happens? yes Post your code, or at least the full error message

Re: can't assign to literal

2008-06-10 Thread Steven Clark
> > for 1 in oids, vals head_oids: > SyntaxError: can't assign to literal > -- 1 is a literal, you can't assign it to something. Are you trying to use it as a variable name? -- http://mail.python.org/mailman/listinfo/python-list

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

2008-06-10 Thread Larry Bates
[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 installer for the py2exe module itself? W

Re: can't assign to literal

2008-06-10 Thread Steven Clark
On Tue, Jun 10, 2008 at 5:30 PM, maehhheeyy <[EMAIL PROTECTED]> wrote: > On Jun 10, 1:21 pm, Matimus <[EMAIL PROTECTED]> wrote: >> On Jun 10, 12:53 pm, maehhheeyy <[EMAIL PROTECTED]> wrote: >> >> > this is stopping my program from running properly. is there something >> > wrong in my code when that

Re: lots of futex_wait calls

2008-06-10 Thread skunkwerk
On Jun 6, 10:03 am, André Malo <[EMAIL PROTECTED]> wrote: > skunkwerkwrote: > > I've got a python program written for the django web framework that > > starts about 100 threads. When I start the server, it sometimes eats > > up 100% of the CPU for a good minute or so... though none of the > > thre

Re: How to kill a thread?

2008-06-10 Thread Fuzzyman
On Jun 10, 2:03 am, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > On Jun 9, 2:52 pm, Fuzzyman <[EMAIL PROTECTED]> wrote: > > > > > On Jun 9, 9:20 pm, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > > > > On Jun 9, 5:33 am, Antoon Pardon <[EMAIL PROTECTED]> wrote: > > > > > On 2008-06-07, Rhamphoryncus <[EM

Re: can't assign to literal

2008-06-10 Thread maehhheeyy
On Jun 10, 1:21 pm, Matimus <[EMAIL PROTECTED]> wrote: > On Jun 10, 12:53 pm, maehhheeyy <[EMAIL PROTECTED]> wrote: > > > this is stopping my program from running properly. is there something > > wrong in my code when that happens? > > yes > > Post your code, or at least the full error message if y

Re: Cannot install python under Win32

2008-06-10 Thread Martin v. Löwis
> DEBUG: Error 2356: Couldn't locate cabinet in stream: python. That sounds bad indeed. In the original file, that stream is definitely present, so most likely, you experienced a corruption in download. Please check the md5 sum of the MSI file; if it differs, download again (preferably using a di

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

2008-06-10 Thread Patrick Bouffard
On Jun 10, 3:03 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > 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 t

Re: Books for programmers

2008-06-10 Thread vasudevram
On Jun 5, 3:09 am, [EMAIL PROTECTED] (Michael H. Goldwasser) wrote: > Dick Moores <[EMAIL PROTECTED]> writes: > > Do not neglect the 2008 book, "Object-Oriented Programming in Python", > > by Goldwasser and Letscher. > > > >

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

2008-06-10 Thread GHUM
Evan, > I hear this problem is fixed in 0.6.8, but unfortunately there's no > standalone installer for py2exe 0.6.8 - the most recent version that Maybe you can solve your problem via updating the build_exe.py after installing py2exe 0.6.6 So: a) use the 0.6.6 installer b) update the build_exe.p

Re: can't assign to literal

2008-06-10 Thread Matimus
On Jun 10, 12:53 pm, maehhheeyy <[EMAIL PROTECTED]> wrote: > this is stopping my program from running properly. is there something > wrong in my code when that happens? yes Post your code, or at least the full error message if you want more details. Matt -- http://mail.python.org/mailman/listinf

can't assign to literal

2008-06-10 Thread maehhheeyy
this is stopping my program from running properly. is there something wrong in my code when that happens? -- http://mail.python.org/mailman/listinfo/python-list

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

2008-06-10 Thread Samuel Bayer
Jonathan Gardner wrote: Let me share my personal insight. I used Python for a mission-critical application that needed, in effect, almost 100% uptime with superior throughput. In other words, it was a very fine piece of art that needed to be precise and correct. In the end, Python delivered, und

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

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: 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: 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: 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 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: 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: 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: 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: 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: 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: 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: 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

BANKRUPTCY LAWYER

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

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:\

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 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 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: 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 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: 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: 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
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: 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

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: 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

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: 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: 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: 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: 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: 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

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: 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

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 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

  1   2   >