On Mon, 18 Aug 2008 08:28:53 -0700, Dan Lenski wrote:
> So is there a bug in the Python docs? Does __slots__ in fact work with
> subclasses of tuple?
>
> Dan
Anybody think that this may actually be a mistake in the Python docs? Who
would I contact about getting them corrected?
Dan
--
http://
Ghirai wrote:
> Would you mind sharing some code? The module is pretty ugly and on top has no
> docs whatsoever; got tired of reading the source...
Did you find out the right homepage at
http://chandlerproject.org/Projects/MeTooCrypto? The original author,
ngps, hasn't been involved in the projec
Hello folks,
I have a program which is in the form of a client-server. i wanna send the
parameters from my python script such that the client passes it to the
server.this is what i have done
Server is running in vmplayer.This is what i have done
b="c:\progs"
os.system('start c:\\pnew\\xyz\\win32\
I see on this link "# Python is Stupid"
http://schlake.livejournal.com/809567.html
Code is
#!/usr/bin/env python
for flour in range( 50, 1000 + 1, 5): # Python is Stupid
print '%.2f %.2f %.2f' % ( (flour), (flour * 0.6), (flour * 0.02) )
Output is corect :D
--
http://mail.python.org/mailma
On 2008-08-20, Lave <[EMAIL PROTECTED]> wroted:
> It's solved.
>
> Thank you all! You saved my life! Thank you very much.
>
> I love you! I love Python!
... I love the whole world, and all its languages,
Boom-de-yada, boom-de-yada, boom-de-yada, boom-de-yada...
Very sorry, but I just couldn'
En Tue, 19 Aug 2008 18:35:57 -0300, Gustavo Narea <[EMAIL PROTECTED]>
escribi�:
Hello, everyone.
Why do unitest.TestCase grand-grandchildren not work?
I've created a unittest.TestCase descendant, which contains the setUp()
and
tearDown() for testing some components of a web framework. Eve
Given a section like
[Data]
value1
value2
value3
Can ConfigParser be easily used to put the values in a dictionary? If
so, how?
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 19 Aug 2008 22:24:45 -0700, eliben wrote:
>> You want to look up Easier to Ask Forgivness than Permission (EAFP)
>> which is touted as the "canonical" error-handling paradigm for Python.
>
> Any (semi)complete guides on this canonical paradigm online ? I've only
> found some references in
En Tue, 19 Aug 2008 22:06:13 -0300, aditya shukla
<[EMAIL PROTECTED]> escribi�:
I am using windows vista and i am trying to communicate with various
processes.
so when i do
import subprocess
proc=subprocess.Popen('cmd.exe')
--This opens the command prompt
But when i do
proc=subprocess.Popen(
I found something interesting while working in idle.I have windows vista and
python2.5
if i do
import subprocess
proc
=subprocess.Popen('cmd.exe',stdin=subprocess.PIPE,stdout=subprocess.PIPE)
output = proc.communicate('dir\n')[0]
print repr(output)
This dosen't work in idle
while if it put it up
On Aug 20, 9:22 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I see on this link "# Python is
> Stupid"http://schlake.livejournal.com/809567.html
> Code is
>
> #!/usr/bin/env python
> for flour in range( 50, 1000 + 1, 5): # Python is Stupid
> print '%.2f %.2f %.2f' % ( (flour), (flour * 0
Hello,
I can't get getattr() to return nested functions, I tried this :
>>> def toto():
... def titi():
... pass
... f = getattr(toto, "titi")
... print str(f)
...
>>> toto()
Traceback (most recent call last):
File "", line 1, in
File "", line 4, in toto
AttributeError
En Wed, 20 Aug 2008 04:00:08 -0300, Dan Lenski <[EMAIL PROTECTED]>
escribi�:
On Mon, 18 Aug 2008 08:28:53 -0700, Dan Lenski wrote:
So is there a bug in the Python docs? Does __slots__ in fact work with
subclasses of tuple?
Anybody think that this may actually be a mistake in the Python doc
En Wed, 20 Aug 2008 04:20:15 -0300, aditya shukla
<[EMAIL PROTECTED]> escribi�:
I have a program which is in the form of a client-server. i wanna send
the
parameters from my python script such that the client passes it to the
server.this is what i have done
Server is running in vmplayer.This
En Wed, 20 Aug 2008 04:56:32 -0300, aditya shukla
<[EMAIL PROTECTED]> escribi�:
I found something interesting while working in idle.I have windows vista
and
python2.5
if i do
import subprocess
proc
=subprocess.Popen('cmd.exe',stdin=subprocess.PIPE,stdout=subprocess.PIPE)
output = proc.commu
Hello,
I'm trying to catch an "EOFError" exception that occurs when reading
truncated tarfile. Here's my routine, and below that the callback
trace. Note that although I'm trying to catch all TarFile exceptions,
the tarfile.EOFError ecxeption, and the global EOFError exception, the
program still f
Gabriel Rossetti <[EMAIL PROTECTED]> writes:
> I can't get getattr() to return nested functions, I tried this :
>
def toto():
> ... def titi():
> ... pass
> ... f = getattr(toto, "titi")
> ... print str(f)
> ...
toto()
> Traceback (most recent call last):
> File
Rafe a écrit :
(snip)
You can dynamically add properties to a class
The OP was asking for *per instance* properties...
just before returning
the
instance using __new__():
class AClass(object):
def __new__(cls):
setattr(cls,"propName", property(fget = ...,
En Wed, 20 Aug 2008 05:34:38 -0300, Gabriel Rossetti
<[EMAIL PROTECTED]> escribi�:
I can't get getattr() to return nested functions, I tried this :
>>> def toto():
... def titi():
... pass
... f = getattr(toto, "titi")
... print str(f)
...
>>> toto()
Traceback (most
Rafe a écrit :
(snip)
I posted this to another thread, but...
And I answered there, explaining why it's not a proper solution.
http://groups.google.com/group/comp.lang.python/browse_frm/thread/7ed51a8614a58082#
(snip about using __new__ to add class attributes, cf above link for more)
--
http
Gabriel Rossetti a écrit :
Hello,
I can't get getattr() to return nested functions,
Of course. Nested functions are not attributes of their container function.
I tried this :
>>> def toto():
... def titi():
... pass
... f = getattr(toto, "titi")
... print str(f)
...
On Wed, 20 Aug 2008 02:07:33 -0700 (PDT), [EMAIL PROTECTED] wrote:
> I'm trying to catch an "EOFError" exception that occurs when reading
> truncated tarfile. Here's my routine, and below that the callback
> trace. Note that although I'm trying to catch all TarFile exceptions,
> the tarfile.EOFErro
On Aug 20, 12:11 am, John Machin <[EMAIL PROTECTED]> wrote:
> On Aug 20, 5:06 am, Terry Reedy <[EMAIL PROTECTED]> wrote:
>
> > In your case, the standard Python idiom, as Jon said, is
>
> > it = iter(iterable)
> > next(it) # 2.6, 3.0
> > for for item in iterable:
> > f(item)
>
> or, perhaps, for
Hey,
Suppose I have a Python application consists of many modules (lets say
it is a Django application).
If all the modules files are importing sys module, how many times the
sys module will be compiled and executed?
Only once (the first time the PVM locates, compiles and executes the
sys module)?
On Aug 20, 7:56 pm, MRAB <[EMAIL PROTECTED]> wrote:
> On Aug 20, 12:11 am, John Machin <[EMAIL PROTECTED]> wrote:
>
> > or, perhaps, for completeness/paranoia/whatever:
>
> > it = iter(iterable)
> > try:
> > headings = it.next() # < 2.5
> > except StopIteration:
> > # code to handle empty
>
Hussein B a écrit :
Hey,
Suppose I have a Python application consists of many modules (lets say
it is a Django application).
If all the modules files are importing sys module, how many times the
sys module will be compiled and executed?
Only once (the first time the PVM locates, compiles and exec
On Aug 20, 8:08 pm, Hussein B <[EMAIL PROTECTED]> wrote:
> Hey,
> Suppose I have a Python application consists of many modules (lets say
> it is a Django application).
> If all the modules files are importing sys module, how many times the
> sys module will be compiled and executed?
> Only once (th
On Aug 20, 5:43 am, John Machin <[EMAIL PROTECTED]> wrote:
> On Aug 20, 8:08 pm, Hussein B <[EMAIL PROTECTED]> wrote:
>
> > Hey,
> > Suppose I have a Python application consists of many modules (lets say
> > it is a Django application).
> > If all the modules files are importing sys module, how man
On Tue, 19 Aug 2008 21:44:04 -0400, Eric Wertman wrote:
> I've a number of scripts set up that require a username/password
> combination to log in elsewhere. It's gotten to the point where I
> need to keep them in a more secure location, instead of just in the
> scripts themselves. I did a bit of
On 13 Aug, 11:08, Victor Lin <[EMAIL PROTECTED]> wrote:
> Hi,
> I'm writting a application using python standardloggingsystem. I
> encounter some problem with unicode message passed tologginglibrary.
> I found that unicode message will be messed up bylogginghandler.
>
> piese of StreamHandler:
>
>
Hi Diez:
The file browse button will get me a filename on the client machine.
You are saying post will transfer the file itself? I am using straight
cherrypy no turbo gears etc, so ill have to do manually.
I have not been able to find the javascript on google despite a lot of
searching. Would appr
brahmaforces wrote:
> Hi Diez:
> The file browse button will get me a filename on the client machine.
> You are saying post will transfer the file itself? I am using straight
> cherrypy no turbo gears etc, so ill have to do manually.
You need to use POST, and some enctype-this-or-that-stuff. Ther
On Aug 20, 5:43 am, John Machin <[EMAIL PROTECTED]> wrote:
> On Aug 20, 8:08 pm, Hussein B <[EMAIL PROTECTED]> wrote:
>
> > Hey,
> > Suppose I have a Python application consists of many modules (lets say
> > it is a Django application).
> > If all the modules files are importing sys module, how man
bopla geschirr siemens geschirr geschirr boerse breker geschirr
vileroy und boch geschirr fuerstenberg geschirr geschirr billig
geschirr koeln
+
+
+
+
+++ BILLIGES GESCHIRR ONLINE KAUFEN +++ BILLIGES GESCHIRR ONLINE
BESTELLEN +++
+
+
http://WWW.GESCHIRR-ONLINE.INFO
http://WWW.GESCHIRR-ONLINE.INFO
Hussein B a écrit :
(snip)
One more question:
If I have this structure:
orig/com/domain/project/Klass1.py
Klass2.py
__init__.py
Why com, domain, project should have __init__.py also?
Yes, why should they ? Unless you want to mimic Java's package
Hussein B wrote:
Thank you both for your kind help and patience :)
Built-in modules are compiled but even if they are so, when importing
them (sys for example), Python will run their code in order to create
bindings and objects, right?
I'm learning Python and I want to learn it well, so that I'm
On Aug 20, 6:39 am, Bruno Desthuilliers wrote:
> Hussein B a écrit :
> (snip)
>
> > One more question:
> > If I have this structure:
> > orig/com/domain/project/Klass1.py
> > Klass2.py
> > __init__.py
>
> > Why com, domain, project should have __init
Hussein B a écrit :
(snip)
Thank you both for your kind help and patience :)
Built-in modules are compiled
For which definition of "compiled" ?
but even if they are so, when importing
them (sys for example), Python will run their code in order to create
bindings and objects, right?
As the n
damenkleidung kaufen uebergroessen mango damenbekleidung bestellen
damen mantel bestellen bekleidung fuer damen bestellen only
damenbekleidung bestellen
damenbekleidung bestellen in uebergroessen damenbekleidung bestellen
muenchen basler damenbekleidung bestellen triathlon bek
Hussein B wrote:
On Aug 20, 6:39 am, Bruno Desthuilliers wrote:
Hussein B a écrit :
One more question:
If I have this structure:
orig/com/domain/project/Klass1.py
Klass2.py
__init__.py
Why com, domain, project should have __init__.py also?
Yes,
Hi,
I am trying to write a BOT to read the search results from Google.
When I read from the www.google.com, the code works fine, loads in
the web page. When I try to load in a url with the search results,
http://www.google.com/search?hl=en&q=ted', I get a web page that says
I do not have permiss
On Aug 20, 8:14 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Tue, 19 Aug 2008 11:18:00 -0300, <[EMAIL PROTECTED]> escribi :
>
> > Is the following code is ok. who to call all method.
> > It is working but the call to m() without a reference to self seems
> > strange
>
> Ok, so you alread
On Aug 20, 5:34 pm, loial <[EMAIL PROTECTED]> wrote:
> Given a section like
>
> [Data]
> value1
> value2
> value3
>
> Can ConfigParser be easily used to put the values in a dictionary? If
> so, how?
Dictionaries are key/value pairs. Do you expect 'value1' to be a key
or a value?
If the data is li
Bruno Desthuilliers wrote:
As the name imply, built-in modules are built in the interpreter - IOW,
they are part of the interpreter *exposed* as modules[1]. Unless you
have a taste for gory implementation details, just don't worry about this.
Other "ordinary" modules need of course to be execu
We have over 700 companies that will pay you
We have over 700 companies that will pay you to:
Take online surveys - Get paid from $5 to $125 Each Survey!
Get paid to drive your car $1000 to $3000 per month!
Participate in Focus Groups - Get Paid up to $150 per hour
Try new products and paid $10 t
Hi there,
it seems that child.wait() is ignored when
print "Server running [PID %s]"%(child.pid)
fpid.write(child.pid)
are between the process creation child = Popen(cmd.split(),
stderr=flog) and child.wait().
It seems to be a bug, doesn't it ?
Mathieu
(I'm running x11vnv with args in the
On Aug 20, 11:27 am, John Machin <[EMAIL PROTECTED]> wrote:
> On Aug 20, 7:56 pm, MRAB <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Aug 20, 12:11 am, John Machin <[EMAIL PROTECTED]> wrote:
>
> > > or, perhaps, for completeness/paranoia/whatever:
>
> > > it = iter(iterable)
> > > try:
> > > headings =
On Tue, 19 Aug 2008 22:24:45 -0700, eliben wrote:
> """ between file()
> and open() in Python 2 and 3, a NameError is thrown with open() in
> Python 3 and an IOError is thrown in the other three cases against keyboard>.
> """
I'm curious about the claim that open() will raise NameError in Python
MRAB wrote:
> So it's defined behaviour that an exhausted iterable will always raise
> StopIteration no matter how many times it's asked for the next value?
That is not enforced. However, quoting
http://www.python.org/dev/peps/pep-0234/
"""
Iterator implementations (in C or in Python) should gua
On Wed, 20 Aug 2008 06:16:17 -0700, MRAB wrote:
> So it's defined behaviour that an exhausted iterable will always raise
> StopIteration no matter how many times it's asked for the next value?
Be careful -- an iterable is not the same as an iterator.
Iterables are anything that you can iterate o
Sept
Sender: "Professional Customer Service" <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: multipart/related; type="multipart/alternative";
boundary="=_NextPart_000_22D9BBBE_0.3E24F6BA"
Date: Wed, 20 Aug 2008 19:31:34 +0800
Message-ID: <[EMAIL PROTECTED]>
Reply-To: "Professional Customer
On Wed, 20 Aug 2008 05:42:34 -0700 (PDT), [EMAIL PROTECTED] wrote:
> the web page. When I try to load in a url with the search results,
> http://www.google.com/search?hl=en&q=ted', I get a web page that says
> I do not have permissions. Is theree a way around this, or is Google
> just to smart?
de.rec.tanz microsoft.public.de.exchange
--
http://mail.python.org/mailman/listinfo/python-list
Okay, I have used BeautifulSoup a lot lately, but I am wondering, how do you
open a local html file?
Usually I do something like this for a url
soup = BeautifulSoup(urllib.urlopen('http://www.website.com')
but the file extension doesn't work. So how do I open one?
--
View this message in conte
Do you like to travel?
If so please feel free to check out the following link.
http://talkingcommunities.com:80/wm/archives/rse56639c62348/Traverusbp/
Email if interested at [EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
On 2008-08-20, Alexnb <[EMAIL PROTECTED]> wroted:
> Okay, I have used BeautifulSoup a lot lately, but I am wondering, how do you
> open a local html file?
>
> Usually I do something like this for a url
>
> soup = BeautifulSoup(urllib.urlopen('http://www.website.com')
>
> but the file extension doe
Alexnb wrote:
>
> Okay, I have used BeautifulSoup a lot lately, but I am wondering, how do
> you open a local html file?
>
> Usually I do something like this for a url
>
> soup = BeautifulSoup(urllib.urlopen('http://www.website.com')
>
> but the file extension doesn't work. So how do I open on
I am a newbie to python even mobile side also.
I am using openmoko device, there I installed stripped down python from feed
path's and I need tzset() of time module for my application but when running my
application.
time.tzset()
at above line getting "no attribute tzset() for module" . So
On Wed, 20 Aug 2008 07:33:32 -0700 (PDT), Alexnb <[EMAIL PROTECTED]> wrote:
Okay, I have used BeautifulSoup a lot lately, but I am wondering, how do you
open a local html file?
Usually I do something like this for a url
soup = BeautifulSoup(urllib.urlopen('http://www.website.com')
urllib.u
Microsoft Office Live Free
Users get:
Free Domain Name
Free Web Hosting
Free Business Email Accounts
join now >>>http://easylnk.com/?6896
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Genellina wrote:
En Wed, 20 Aug 2008 05:34:38 -0300, Gabriel Rossetti
<[EMAIL PROTECTED]> escribi�:
I can't get getattr() to return nested functions, I tried this :
>>> def toto():
... def titi():
... pass
... f = getattr(toto, "titi")
... print str(f)
...
>>
Bruno Desthuilliers wrote:
Gabriel Rossetti a écrit :
Hello,
I can't get getattr() to return nested functions,
Of course. Nested functions are not attributes of their container
function.
Ok
I tried this :
>>> def toto():
... def titi():
... pass
... f = getattr(toto
On Wed, 20 Aug 2008 15:09:11 +0200, Mathieu Prevot wrote:
> flog = open(logfile, 'w')
> fpid = open(pidfile, 'w')
> try:
> child = Popen(cmd.split(), stderr=flog)
> print "Server running [PID %s]"%(child.pid)
> fpid.write(child.pid)
What happens if you change:
fpid.write(child.pid)
into:
LINK <<< LINK >>> LINK <<< LINK
>>$ FREE MONEY RIGISTERED $<<<
FREE Registered On Site
http://rex.boobslove.info/voyngojchngogua/vegas/girl/sex/videos/
http://www.unregisteredlookup.com/refunded_domains/2007/march/17/com/com_march_17_2007
On Aug 19, 4:12 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Tue, 19 Aug 2008 11:07:39 -0700, [EMAIL PROTECTED] wrote:
> > def do_something(filename):
> > if not os.access(filename,os.R_OK):
> > return err(...)
> > f = open(filename)
> > ...
>
> You're
[EMAIL PROTECTED] a écrit :
On Aug 19, 10:19 am, eliben <[EMAIL PROTECTED]> wrote:
P.S. There's a common case where a method is passed a filename, to do
something with a file (say, read data). Should the method catch the
errors possibly thrown by open(), or leave it to the caller ?
You want t
eliben a écrit :
This is *exactly* my concern with Python exceptions. You just never
know what can be thrown at you.
This rarely happen to be a problem in real life. At least not in mine.
Exception that can be expected (ie : IOError when dealing with files)
are usually obvious and more or le
On Aug 20, 12:47 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Rafe wrote:
> > Again, this is probably too simple to help, but the only way to ignore
> > certain types of exceptions, as far as I know, is to catch them and
> > pass.
> > e.g. this ignores type errors...
>
> > try:
> > somethingB
All,
I've just recently started fiddling with my Wiimote using python
and PyBluez. I'm interested particular in getting the position IR
sensor data out of the Wiimote, but I'd like to develop a library that
let's you access all of it easily in an OO manner. If anyone has any
interest in explo
I'm running ActiveState Python 2.5 on Windows XP. It used
to work fine. Today however I get (10061, 'Connection refused')
for any site I try with urllib.urlopen().
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh <[EMAIL PROTECTED]> writes:
> Robert Brown wrote:
>> You may find the above surprising, but Common Lisp users expect the
>> default argument expression to be evaluated anew when needed by a
>> function call:
>
> well, I'd say an argument based on "Common Lisp users" is a lot more
> du
I found out why. I set a proxy in IE and I didn't know
ActiveState Python use IE proxy!
> I'm running ActiveState Python 2.5 on Windows XP. It used
> to work fine. Today however I get (10061, 'Connection refused')
> for any site I try with urllib.urlopen().
--
http://mail.python.org/mailman/list
Gabriel Rossetti wrote:
Bruno Desthuilliers wrote:
Gabriel Rossetti a écrit :
I thought that since functions are objects, that I could obtain it's
nested functions.
Well, there's probably a very hackish way, but it's not worth the
pain.
What Bruno meant here, I believe, is that there i
On Aug 20, 10:06 am, "jlist" <[EMAIL PROTECTED]> wrote:
> I'm running ActiveState Python 2.5 on Windows XP. It used
> to work fine. Today however I get (10061, 'Connection refused')
> for any site I try with urllib.urlopen().
May be the host is Listening on the port you are connecting to or the
ho
jlist wrote:
I found out why. I set a proxy in IE and I didn't know
ActiveState Python use IE proxy!
I'm running ActiveState Python 2.5 on Windows XP. It used
to work fine. Today however I get (10061, 'Connection refused')
for any site I try with urllib.urlopen().
Perhaps IE's proxy settings
Hi Ken,
Yes, I'm interested in using the Wiimote with Python.
However so far I did not use ('use' means 'just try') the Wiimote with
anything except Glovepie.
There's three setups I'm interested in (less Python, than a general
setup issues so far):
- Wiimote with Windows XP: Problem is, tha
I'm having issues with Boost Python, downloaded via http://www.boostpro.com.
I *think* it's related to WinXP side by side assemblies. My
application that uses Boost Python fails to start.
I ran dependancy walker on the Boost Python DLL and I get the
following:
Error: The Side-by-Side configuratio
On Wed, 20 Aug 2008 09:23:22 -0700, [EMAIL PROTECTED] wrote:
> On Aug 19, 4:12 pm, Steven D'Aprano <[EMAIL PROTECTED]
> cybersource.com.au> wrote:
>> On Tue, 19 Aug 2008 11:07:39 -0700, [EMAIL PROTECTED] wrote:
>> > def do_something(filename):
>> > if not os.access(filename,os.R_OK):
>> >
On Wed, 20 Aug 2008 13:09:21 -0400, Robert Brown wrote:
> In any case, chances are high that Lisp's way of handling default
> arguments would have been changed had it been shown to cause performance
> problems.
But nobody is suggesting that it would cause performance problems in
*Lisp*. It might
My guess is urllib.urlopen() wraps the wininet calls, which share
IE proxy settings.
> Perhaps IE's proxy settings are effectively setting the Windows system
> networking proxy settings?
--
http://mail.python.org/mailman/listinfo/python-list
hello,
I'm trying to create a high level debugger, based on rpd2.
So when the debugger enters a breakpoint,
I want to display the values of all variables in the, let's say,
5 lines above the breakpoint (if possible).
Any hints on how I get a list of all vars in those lines ?
My rough idea is to
On Wed, 20 Aug 2008 18:37:02 +0200, Bruno Desthuilliers wrote:
>> I personally think this is sloppy because you have to couple the
>> exception type with the function --- between file() and open() in
>> Python 2 and 3, a NameError is thrown with open() in Python 3
>
> ??? I suspect this has nothi
Hello,
I am trying to parse a log file. I want to sort based on the second element
the list that is in the file.
What is the best way to do this? The sort is just on the line itself where
I want to re-organize the lines based on the second element of the csv file
Thanks,
Ron
--
http://mail.pyt
I've got a hopefully simple question, maybe I'm just not searching for the
right information.
I'm working on a project that is using kickstarts to build Fedora/CentOS
variant machines. Within the kickstart in the post section we will be
performing disk space reductions by removing any unnecessary
English is my first language, but I doesn't be very good at it.
I was trying to endow my symlinked python module with the ability to
divine where it actually resides when I came across os.readlink(),
documented at http://docs.python.org/lib/os-file-dir.html
I'm not sure readlink() lives up to
2008/8/20 Ron Brennan <[EMAIL PROTECTED]>
>
>
> Hello,
>
> I am trying to parse a log file. I want to sort based on the second
> element the list that is in the file.
>
> What is the best way to do this? The sort is just on the line itself where
> I want to re-organize the lines based on the sec
JBW wrote:
I'm not sure readlink() lives up to its documentation. To wit:
$ touch bar # Create an empty file
$ ln -s bar foo # And a symlink to it.
$ python
Python 2.5.1 <... Herald "the snitch" Redacted ...>
Type "help", "copyright", "credits" or "license" for more infor
jlist wrote:
My guess is urllib.urlopen() wraps the wininet calls, which share
IE proxy settings.
urllib doesn't use wininet, but it does fetch the proxy settings from
the Windows registry.
--
http://mail.python.org/mailman/listinfo/python-list
joey boggs wrote:
In the end I'd like to be able to run a custom interpreter and just feed
it one command and a directory. The end result in the kickstart
something like this:
%post --interpreter #!/usr/bin/myinterpreter
DROP /tmp/directory
DROP /tmp/directory2
How would I setup the interpre
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> On Wed, 20 Aug 2008 13:09:21 -0400, Robert Brown wrote:
>
>> In any case, chances are high that Lisp's way of handling default
>> arguments would have been changed had it been shown to cause performance
>> problems.
>
> But nobody is suggesting that it
Hello folks, i am trying to find a particular file in a given search path.I
found code for this on internet.
Code
from os.path import exists, join
from os import pathsep
from string import split
def search_file(filename, search_path):
"""Given a search path, find file
"""
file_found = 0
En Wed, 20 Aug 2008 12:22:16 -0300, Wojtek Walczak <[EMAIL PROTECTED]> escribió:
> On Wed, 20 Aug 2008 15:09:11 +0200, Mathieu Prevot wrote:
>
>> child = Popen(cmd.split(), stderr=flog)
>> print "Server running [PID %s]"%(child.pid)
>> fpid.write(child.pid)
>
> I think that the problem here
jlist wrote:
>
> I found out why. I set a proxy in IE and I didn't know
> ActiveState Python use IE proxy!
>
> > I'm running ActiveState Python 2.5 on Windows XP. It used
> > to work fine. Today however I get (10061, 'Connection refused')
> > for any site I try with urllib.urlopen().
>
switching
Fredrik Lundh wrote:
> JBW wrote:
>> I'm not sure readlink() lives up to its documentation. ...
>> The result makes sense, but it belies the documentation. Should I report
>> this? Or is there another plausible interpretation?
>
> the part about joining with dirname(path) assumes that you pass in
Hi,
I'm sorry if this has been asked before, but I can't seem to find an
answer to this anywhere and so far, trial and error hasn't gotten me
far either.
Using python 2.4, I've created a testing application. When the app
starts up, I do a [code]from tests import *[/code] and it looks at
the /test
That's kinda what I'm looking for, but it can't be interactive as
there's no way to send input during the installation.
It should pass the DROP statements to the interpreter and the
interpreter takes the input and runs os.rmdir() or something similar.
This way the backend does all the work and the
En Wed, 20 Aug 2008 17:10:15 -0300, aditya shukla <[EMAIL PROTECTED]> escribió:
> Hello folks, i am trying to find a particular file in a given search path.I
> found code for this on internet.
>
> if __name__ == '___main__':
>search_path = '/bin' + pathsep + '/usr/bin' # ; on windows, : on un
Hi!
Can somebody tell me if there is an os independent way to detect a
sequence of key strokes. For example, I want to start some other
program once the user presses a couple of keys: ex: key a and then key
b
Thanks,
Raj
--
"For him who has conquered the mind, the mind is the best of friends;
I am trying to figure out how to test if two numbers are of the same
sign (both positive or both negative). I have tried
abs(x) / x == abs(y) / y
but that fails when one of the numbers is 0. I'm sure that there is
an easy way to do this. Any suggestions?
Thanks
--
http://mail.python.org/mailm
Hi!
I was able to do this in the following way:
import os
fKey= raw_input('')
if fKey=='ab':
print(os.listdir(os.getcwd()))
Is there a better way to do this?
Thanks,
Raj
On Wed, Aug 20, 2008 at 2:21 PM, Rajanikanth Jammalamadaka
<[EMAIL PROTECTED]> wrote:
> Hi!
>
> Can somebody tell
1 - 100 of 161 matches
Mail list logo