Take advantage of a great deal
--
http://mail.python.org/mailman/listinfo/python-list
i am sorry if this is the wrong section . i just
finished a huge website called www.this.explains.it
and i need your reviews
:
*More than 150,000 articles in the search database ..
*Learn how almost everything works in the easiest way possible...
*randomly generated articles
How can I get the OS Name, such as "Windows XP Pro". I know I can do
sys.getwindowsversion but that doesnt return a nice Windows XP Pro
string.
and os.name gives "nt"
thanks.
--
http://mail.python.org/mailman/listinfo/python-list
I have a website and by accessing it from the browser, for example:
"http://www..com:/status";, the web page will display "ok" only
if the URI is up. And it will return "website could not be found" alert
if the URI is down.
In Python, is there a way to retrieve "ok" programmatically and de
Is it possible to get the system date on a Windows XP machine? Most
Convenient would to retrieve , MM, and DD as seperate variables.
When I say system date, I'm thinking of the small clock in the
lower-right hand corner, which has date as well as time, but if there's
another clock t
I was running the HTTP GET example at
http://www.python.org/doc/current/lib/httplib-examples.html and ran
into a bit of trouble...
>>> import httplib # This works.
>>> conn = httplib.HTTPConnection("www.python.org") # This works.
>>> conn.request("
Hi,
must I parse argv[0] to get it, or is there an easier way (that works under
Windows and *nix)?
Ex:
python /home/hg/test/test.py ==> test.py #knows it is in /home/hg/test
Thanks,
hg
--
http://mail.python.org/mailman/listinfo/python-list
How does one get the process id?
Is there a method for windows and unix (mac os x etc...)
--
http://mail.python.org/mailman/listinfo/python-list
Steve Holden <[EMAIL PROTECTED]> writes:
> What *I* would like to know is: who is allowing the import of bsddb.os,
> thereby somehow causing the code of the os library module to be run a
> second time.
I would guess (without actually running the code) that this part is
responsible:
> if
Bernhard Herzog wrote:
Steve Holden <[EMAIL PROTECTED]> writes:
What *I* would like to know is: who is allowing the import of bsddb.os,
thereby somehow causing the code of the os library module to be run a
second time.
I would guess (without actually running the code) that this part is
responsibl
Bernhard Herzog <[EMAIL PROTECTED]> writes:
> Steve Holden <[EMAIL PROTECTED]> writes:
>> if package:
>> module.__path__ = sys.path
>
> You usually should initialize a package's __path__ to an empty list.
Actually, normally it's a list that contains the name of the package
d
In article <[EMAIL PROTECTED]>,
Bernhard Herzog <[EMAIL PROTECTED]> wrote:
> Bernhard Herzog <[EMAIL PROTECTED]> writes:
>
> > Steve Holden <[EMAIL PROTECTED]> writes:
> >> if package:
> >> module.__path__ = sys.path
> >
> > You usually should initialize a package's __path_
Just wrote:
In article <[EMAIL PROTECTED]>,
Bernhard Herzog <[EMAIL PROTECTED]> wrote:
Bernhard Herzog <[EMAIL PROTECTED]> writes:
Steve Holden <[EMAIL PROTECTED]> writes:
if package:
module.__path__ = sys.path
You usually should initialize a package's __path__ to an empty li
le.py" on sys.path) but he disliked the idea of
widening submodule imports that much. On the other hand, __path__ is a
mutable list so people can get the same effect by adding stuff to it.
> While this may be interesting history it's very confusing, and I'm
> encouraging
= getTagsByName('refrain')
print therefrain.toxml()
does print the whole Element
What code do I need to merely print the *value* of the element, i.e.,
I would like to see
Yo, Ho, Ho
printed out.
I can get Attribute values, the whole Element with tags, etc., and
could do a substr
Can someone provide a snippet which, when run, generates a TabError?
I can only seem to get SyntaxError and IndentationError.
Thanks,
M
--
http://mail.python.org/mailman/listinfo/python-list
codecraig wrote:
How can I get the OS Name, such as "Windows XP Pro". I know I can do
sys.getwindowsversion but that doesnt return a nice Windows XP Pro
string.
and os.name gives "nt"
thanks.
Read the docs... sys.getwindowsversion() should do the trick. AFAIK,
there is no
[rbt]
|
| codecraig wrote:
| > How can I get the OS Name, such as "Windows XP Pro". I
| know I can do
| >
| > sys.getwindowsversion but that doesnt return a nice Windows XP Pro
| > string.
| >
| > and os.name gives "nt"
| >
| > thanks.
| &g
i guess i wanted the result in a nice string like Windows XP instead of
5.1
i guess i'll have to convert it myself, thanks
--
http://mail.python.org/mailman/listinfo/python-list
where can I get wmi module, it doesnt come with Python right?
thanks.
--
http://mail.python.org/mailman/listinfo/python-list
[codecraig]
| where can I get wmi module, it doesnt come with Python right?
|
Sorry, should have said.
http://timgolden.me.uk/python/wmi.html
TJG
This e-mail has been scanned for all viruses by Star. The
service is
On 2005-04-15, codecraig <[EMAIL PROTECTED]> wrote:
> where can I get wmi module, it doesnt come with Python right?
http://www.google.com/search?q=python+wmi+module
--
Grant Edwards grante Yow! ... I want a COLOR
"codecraig" wrote:
> How can I get the OS Name, such as "Windows XP Pro"
>i guess i wanted the result in a nice string like Windows XP instead of
> 5.1
>
> i guess i'll have to convert it myself, thanks
your requirements keep changing. to get the OS name
my requirements for getting the OS info havent changed. My first
message says "How can I get the OS Name, such as "Windows XP Pro"."
that's what I wanted all along.
thanks for the information anyway, i believe platform is better than my
previous approach.
thanks
-
codecraig wrote:
> my requirements for getting the OS info havent changed. My first
> message says "How can I get the OS Name, such as "Windows XP Pro"."
> that's what I wanted all along.
>
> thanks for the information anyway, i believe platfo
hello everybody,
how can i just get 1 character ? i`ve done a search but just found
getch() for windows, i need same for unix and raw_input has any option
that is not documented ?
thanks.
--
http://mail.python.org/mailman/listinfo/python-list
The "urllib2" module is designed for tasks like this. The tutorial
shows how to use urllib2.urlopen() to fetch the contents of a URL
using the http protocol.
Jeff
pgpdV8higv7SR.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
Is this possible for a function to obtain its
own name ?
eg.
def func1():
print "my name is " +
get_my_name()
the result will show "my name is
func1"
Regards,
- Joe
--
http://mail.python.org/mailman/listinfo/python-list
See module inspect
--
http://mail.python.org/mailman/listinfo/python-list
Dustan:
>Is it possible to get the system date on a Windows XP machine?
Most certainly:
http://www.python.org/doc/lib/module-time.html
--
René Pijlman
--
http://mail.python.org/mailman/listinfo/python-list
>>> import time
>>> now = time.localtime()
>>> print now
(2006, 2, 5, 13, 21, 15, 6, 36, 0)
So to get the year, month, and day you would just have to manipulate
the values returned by time.gmtime().
- Dave
--
http://mail.python.org/mailman/listinfo/python-list
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
Dustan <[EMAIL PROTECTED]> wrote:
> Is it possible to get the system date on a Windows XP machine? Most
> Convenient would to retrieve , MM, and DD as seperate variables.
>
> When I say system date, I'm thinking of the small clock in the
> lower-right hand corner,
Dave wrote:
> Dustan,
>
> Python has a module called, appropriately, "time".
This is basically a wrapper around the standard C time
library. Python has a more modern and spiffy datetime
module which isn't restrained to 1970-2038, and just
handles spiffy date and datetime objects instead of
makin
Is there a similar function to sys.getwindowsversion() for Macs?
Many thanks!
--
http://mail.python.org/mailman/listinfo/python-list
Using Python on Windows XP, I am able to get almost all file and path
info using os.path or stat, but I don't see a way to retrieve the file
type? E.g. Microsoft Word file, HTML file, etc, the equivalent of what
is listed in the "Type" column in the Windows Explorer box.
Thanks,
Hi all,
the download link on http://jove.prohosting.com/iwave/ipython/pyMinGW.html
seems to be broken. Can anybody provide another link?
Is there a current version for python 2.4.3 available?
TIA,
aa
--
Andreas Ames | Programmer | Comergo GmbH |
Voice: +49 69 7505 3213 | ames AT avaya . c
[EMAIL PROTECTED] ha scritto:
> SpreadTooThin wrote:
> > How does one get the process id?
> > Is there a method for windows and unix (mac os x etc...)
>
> under linux, do:
> import os
> os.getpid()
Under Windows:
import ctypes
ctypes.windll.kernel32.GetC
billie wrote:
> [EMAIL PROTECTED] ha scritto:
>
> > SpreadTooThin wrote:
> > > How does one get the process id?
> > > Is there a method for windows and unix (mac os x etc...)
> >
> > under linux, do:
> > import os
> > os.getpid()
>
billie wrote:
>> under linux, do:
>
>> import os
>> os.getpid()
>
> Under Windows:
>
> import ctypes
> ctypes.windll.kernel32.GetCurrentProcessId()
getpid() works just fine on Windows too:
>>> import ctypes
>>> ctypes.windll.kernel32.GetCurrentProcessId()
1916
>>> import os
>>> os.get
SpreadTooThin wrote:
> How does one get the process id?
> Is there a method for windows and unix (mac os x etc...)
>
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/442477
hth
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh ha scritto:
> billie wrote:
>
> >> under linux, do:
> >
> >> import os
> >> os.getpid()
> >
> > Under Windows:
> >
> > import ctypes
> > ctypes.windll.kernel32.GetCurrentProcessId()
>
> getpid() works just fine on Windows too:
>
> >>> import ctypes
> >>> ctypes.windll.kernel
Pete wrote:
> I was running the HTTP GET example at
> http://www.python.org/doc/current/lib/httplib-examples.html and ran
> into a bit of trouble...
>
> >>> import httplib # This works.
> >>> conn = httplib.HTTPConnection("www.python.org") # This
won't know until you give the *full* traceback. Do you
> get the same results when you try what I did at the interpreter
> interactive prompt?
The error I received was from the interactive prompt thing. Is there
some way I can get more verbose information or something that would be
more hel
25 (Red Hat 4.1.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import httplib
>>> conn = httplib.HTTPConnection("www.python.org")
>>> conn.request("GET", "/index.
form are you running it on? Perhaps a file in /usr/lib/python2.4 is
> > corrupt, but we won't know until you give the *full* traceback. Do you
> > get the same results when you try what I did at the interpreter
> > interactive prompt?
>
> The error I received was fro
> > ...
> > > You appear to be running 2.4.n; what is n, and exactly which *x
> > > platform are you running it on? Perhaps a file in /usr/lib/python2.4 is
> > > corrupt, but we won't know until you give the *full* traceback. Do you
> > > get the same resul
ect...
> > > I'm running this on a Fedora Core 5 box...
> > >
> > > > ...
> > > > You appear to be running 2.4.n; what is n, and exactly which *x
> > > > platform are you running it on? Perhaps a file in /usr/lib/python2.4 is
> > > &
> > Python 2.4.3 (#1, Jun 13 2006, 11:46:08)
> > [GCC 4.1.1 20060525 (Red Hat 4.1.1-1)] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.
> > >>> import httplib
> > >>>
> > Python 2.4.3 (#1, Jun 13 2006, 11:46:08)
> > [GCC 4.1.1 20060525 (Red Hat 4.1.1-1)] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.
> > >>> import httplib
> > >>>
plib
> > > >>> conn = httplib.HTTPConnection("www.python.org")
> > > >>> conn.request("GET", "/index.html")
> > > Hello World.
> >
> > Off-hand -- I'd suggest you do a search of your computer for any
Pete wrote:
> So, I looked at my search path under the account that was experiencing
> the problem. That wasn't it... Then I'm thinking there's an
> environmental variable causing this. Too many to work right now. Will
> investigate later.
You can see all environment variables with the declare com
port httplib
> > > > >>> conn = httplib.HTTPConnection("www.python.org")
> > > > >>> conn.request("GET", "/index.html")
> > > > Hello World.
> > >
> > > Off-hand -- I'd sugges
Hi all,
I'm trying to build a program to set up a vpn connection. I'm using pexpect to handle this, but I can't get it to work.
The sendline() is causing troubles. I tested it in the interactive promt, with these results:
>>> import pexpect
>>> child = pe
Hi all,
For my first script, I'm trying to build a program to set up a vpn
connection. I'm using pexpect to handle this, but I can't get it to work.
The sendline() is causing troubles. I tested it in the interactive promt,
with these results:
>>> import pexpect
>>
Hi guys and gals,
I'm wrestling with the urlretrieve function in the urllib module. I
want to download a file from a web server and save it locally with the
same name. The problem is the URL - it's on the form
http://www.page.com/?download=12345. It doesn't reveal the file name.
Some hints to poin
I'm having trouble extracting cgi parameters in my code - this is a web
application, so I only know the line that's causing the problem.
here's the info I know:
form = FieldStorage(None, None, [MiniFieldStorage('zid', '17'),
MiniFieldStorage('keywords', 'aAUA'), MiniFieldStorage('keywords',
'aBOS
hg wrote:
> Hi,
>
> must I parse argv[0] to get it, or is there an easier way (that works
> under Windows and *nix)?
>
> Ex:
>
> python /home/hg/test/test.py ==> test.py #knows it is in /home/hg/test
>
> Thanks,
>
> hg
got it: os.path.dirname(sy
hg wrote:
> Hi,
>
> must I parse argv[0] to get it, or is there an easier way (that works under
> Windows and *nix)?
>
> Ex:
>
> python /home/hg/test/test.py ==> test.py #knows it is in /home/hg/test
IMHO it is easy enough:
>>> dname, fname = os.path.spli
Rob Wolfe wrote:
>
> hg wrote:
>> Hi,
>>
>> must I parse argv[0] to get it, or is there an easier way (that works
>> under Windows and *nix)?
>>
>> Ex:
>>
>> python /home/hg/test/test.py ==> test.py #knows it is in /home/hg/test
>
&g
SpreadTooThin wrote:
> How does one get the process id?
> Is there a method for windows and unix (mac os x etc...)
under linux, do:
import os
os.getpid()
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Is there any way i can get a message form internet explorer into my
python script when internet explorer completes loading a page?
_
ashok
--
http://mail.python.org/mailman/listinfo/python-list
Is there a method or attribute I can use to get a list of classes
defined or in-use within my python program? I tried using pyclbr and
readmodule but for reason that is dogslow. Thanks in advance
DigiO
--
http://mail.python.org/mailman/listinfo/python-list
The biggest store online
www.thebuckstore.com
http://www.thebuckstore.com/
--
http://mail.python.org/mailman/listinfo/python-list
When running with "-tt", you can get this error.
[EMAIL PROTECTED] src]$ python -tt
Python 2.3.3 (#1, May 7 2004, 10:31:40)
[GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7)] on linux2
Type "help", "copyright", "credits" or "license" for more informat
"Mr. Magoo" wrote:
> Can someone provide a snippet which, when run, generates a TabError?
>
> I can only seem to get SyntaxError and IndentationError.
$ python -c "print repr(open('test.py').read())"
'if 1:\n\tprint "hello"\nprint &qu
In article <[EMAIL PROTECTED]>,
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
> "Mr. Magoo" wrote:
>
> > Can someone provide a snippet which, when run, generates a TabError?
> >
> > I can only seem to get SyntaxError and IndentationError.
>
In article <[EMAIL PROTECTED]>,
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
> $ python -t test.py
> test.py: inconsistent use of tabs and spaces in indentation
> hello
> goodbye
On more question. When using py_compile from with a script, is there any
way to force the -t flag?
M
--
http://mail.
"Mr. Magoo" wrote:
>> $ python -t test.py
>> test.py: inconsistent use of tabs and spaces in indentation
>> hello
>> goodbye
>
> On more question. When using py_compile from with a script, is there any
> way to force the -t flag?
if you want to check for tab problems from inside a script, use the
Sinan Nalkaya wrote:
> hello everybody,
> how can i just get 1 character ? i`ve done a search but just found
> getch() for windows, i need same for unix and raw_input has any option
> that is not documented ?
> thanks.
Please use Google.
http://aspn.activestate.com/ASPN/Cookboo
Paul Watson wrote:
>Sinan Nalkaya wrote:
>
>
>>hello everybody,
>>how can i just get 1 character ? i`ve done a search but just found
>>getch() for windows, i need same for unix and raw_input has any option
>>that is not documented ?
>>thanks.
On Nov 17, Sinan Nalkaya wrote:
> how can i just get 1 character ? i`ve done a search but just found
> getch() for windows, i need same for unix and raw_input has any
> option that is not documented ?
Get all the characters one at a time:
>>> inp = raw_input('enter a
On Dec 02, Joe Wong (Mango) wrote:
> Is this possible for a function to obtain its own name ?
>
>eg.
>def func1():
>print "my name is " + get_my_name()
>
>the result will show "my name is func1"
This very question was discussed recently:
http://groups.google.com/group/com
Hi Guys,
I built a select in a form. My select is:
print ''
print 'ALL'
print 'AAA'
print 'BBB'
print ''
I can get which item value users select. For example users select item
2, I c
There is a syntactic sugar for item access in
dictionaries and sequences:
o[e] = v <-> o.__setitem__(e, v)
o[e] <-> o.__getitem__(e)
where e is an expression.
There is no similar way for set/get attribute for objects.
If e is a given name, then
o.e = v <-> o.__setattr
Hi,
I was working on a dir like function that gives more information than
the usual dir, but I am not satisfied with the way I get function
arguments for callable members of an object. Take a look at it here:
http://nerdierthanthou.nfshost.com/2005/07/mdir-for-python.html. I have
seen PythonWin
Hello,
how can I get the path of a class. I managed to do it with
c.__module__ + "." + c.__name__
but I'm sure there is a better way.
Thanks,
Florian
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I want to get a listing of my files at web server with ftp. I wantn 't
download the files.
With yyy = ftp.retrlines('LIST') I get this listing at stdout, but I
need this information at variable yyy.
How can I resolve this problem?
Thank's for your hints, Thomas
--
ht
"eels" wrote:
> I want to get a listing of my files at web server with ftp. I wantn 't
> download the files.
> With yyy = ftp.retrlines('LIST') I get this listing at stdout, but I
> need this information at variable yyy.
> How can I resolve this problem?
Hello Fredrik,
thank's for your quick help.
Greetings Eels
Fredrik Lundh schrieb:
> "eels" wrote:
>
> > I want to get a listing of my files at web server with ftp. I wantn 't
> > download the files.
> > With yyy = ftp.retrlines('LIST
Does anyone know how to call for the root prompt before launching your
app?
Kinda like synaptic or the superuser file manager does?
Thanks,
Tom
--
http://mail.python.org/mailman/listinfo/python-list
Hi
does anyone know how to get a column type from a database using jdbc
and python?
thanks
--
http://mail.python.org/mailman/listinfo/python-list
rbt wrote:
> Is there a similar function to sys.getwindowsversion() for Macs?
platform.mac_ver()
(And while we're at it: platform.win32_ver() might be prefered to
sys.getwindowsversion())
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
Are the graves of drea
Hello,
In the following cgi program, I cannot get subprocess output.
I print the header, flush stdout to prepare it to new content,
but variable 'o' is always empty.
Could somebody help me with that?
def main():
print "Content-type: text/html\n\n"
sys.stdout.flush(
How do I get the computer name in python?
I've been looking over the internet, and couldn't find anything.
Thanks!
Bud
--
http://mail.python.org/mailman/listinfo/python-list
BartlebyScrivener enlightened us with:
> Using Python on Windows XP, I am able to get almost all file and
> path info using os.path or stat, but I don't see a way to retrieve
> the file type? E.g. Microsoft Word file, HTML file, etc, the
> equivalent of what is listed in the &qu
BartlebyScrivener wrote:
> Using Python on Windows XP, I am able to get almost all file and path
> info using os.path or stat, but I don't see a way to retrieve the file
> type? E.g. Microsoft Word file, HTML file, etc, the equivalent of what
> is listed in the "Type&
ndows XP, I am able to get almost all file and path
> info using os.path or stat, but I don't see a way to retrieve the file
> type? E.g. Microsoft Word file, HTML file, etc, the equivalent of what
> is listed in the "Type" column in the Windows Explorer box.
>
> Thank
Hi all,
Has any of you fine geniuses figured out a nice python script to go to
the Southwest airlines website and check in, and retrieve your boarding
pass - automatically 24 hours in advance
--
http://mail.python.org/mailman/listinfo/python-list
Chicks dig guitar players.
So get more chicks!
Learn how to play guitar!
http://www.ExpertHumor.com/LearnGuitar.htm
*** Free account sponsored by SecureIX.com ***
*** Encrypt your Internet usage with a free VPN account from
http://www.SecureIX.com ***
--
http://mail.python.org
Chicks dig guitar players.
So get more chicks!
Learn how to play guitar!
http://www.ExpertHumor.com/LearnGuitar.htm
*** Free account sponsored by SecureIX.com ***
*** Encrypt your Internet usage with a free VPN account from
http://www.SecureIX.com ***
--
http://mail.python.org
hi,
I am doing example of address book.when user enter stop and presses
enter my loop should stop.But there is some prob in my loop.It is
accepting \r after pressing Enter key.How do i check end of input :
addressbook={}
name = raw_input("Enter Name (stop to Finish)")
name = EnterAddress
I'm not seeing how to get at the 'name' attribute of an HTML element.
form = cgi.FieldStorage()
gives you a dictionary-like object that has keys for the various named
elements *within* the form...
I could easily replicate the form name in a hidden field, but there ought to
be
in which the user has entered the text. To get the co
ordinates I am using the function event.GetPosition(). Here event is
wx.EVT_KEY_DOWN. Any pointers please?
--
http://mail.python.org/mailman/listinfo/python-list
Ok, somebody helped my and found with "help(child.sendline)" that the
number (7) is the number of characters from my password.
Still there doesn't seem to be that anything strange is happening. With
the logfile printed out, I found that child.expect places a 0 behind the
next rule. Is this always
Jurian Sluiman wrote:
> Ok, somebody helped my and found with "help(child.sendline)" that the
> number (7) is the number of characters from my password.
>
> Still there doesn't seem to be that anything strange is happening. With
> the logfile printed out, I found that child.expect places a 0 behin
Hi;
I'm writing a script that includes an email function. So I went to the
cookbook and dug up this, and tweaked it just a bit to make it easier to get
it to work, but it throws an error:
>>>def createMail(sender, recipient, subject, html, text):
... import MimeWriter, mimeto
Dear all,
I have been using the queue module for a multithreaded environment and
things seem to work well... until we had a requirement for the
application to be able to time sync to the server. With the time sync,
it actually disorientated the timeout in the queue's get() method...
e.g.
Anyone can help me getting the shift + tab key combination ?
I tried with getch () but with no success.
May be using the sys.stdin ??
Please, help would be very appreciated.
--
Andrés M.
-
--
http://mail.python.org/mailman/listinfo/python-list
Hello
I'd like to download pages from a site, but it checks whether
the requests are coming from a live user or a script; If the latter,
the server returns a blank page.
Using a proxy (Paros), I can see what information my script and
FireFox send, and there are a lot of information that P
1 - 100 of 1490 matches
Mail list logo