Hello,
I’ve just typed „pip install selenium“ into my command prompt on windows 10.
Although my computer told me that the requirement was already satisfied, import
selenium did not work. So I tried different methods to install it and typed
„Python“ in my command prompt and imported selenium. It
Hello,
I recently coded this snippet of code:
myString=„hello“
for i in range(len(myString):
print(string[i])
And now for the weird part:
SOMETIMES, the output is this:
hello
And SOMETIMES, the output changes to:
ohell
WHY??? Why do I get different outputs with the EXACT SAME CODE?
Can
Hello,
I recently programmed some code for a webdriver with selenium.
I asked the program to find an input tag, which is interactible, with this:
searchbar=driver.find_element_by_class_name("ut-player-search-control--input-container")
then i ask it to send keys, which has worked before too.
Dear Python-Team,
I have just repaired python after running my program which imports pyautogui,
closing and reopening it and then getting this: ModuleNotFoundError: No module
named „pyautogui“. Repairing didn’t work and I still get that message. All I
did was closing the perfectly working progr
Hi,
On 2014-08-16 09:01:57 +, Peter Otten said:
Philipp Kraus wrote:
The code works till last week correctly, I don't change the pattern.
Websites' contents and structure change sometimes.
My question is, can it be a problem with string encoding?
Your regex is all-as
On 2014-08-16 00:48:46 +, Roy Smith said:
In article ,
Philipp Kraus wrote:
found = re.search( "http://sourceforge.net/projects/boost/files/boost/";)
)
if found == None :
raise MyError.StopError("Boost Download URL not found")
But found is always None,
Hello,
I have defined a function with:
def URLReader(url) :
try :
f = urllib2.urlopen(url)
data = f.read()
f.close()
except Exception, e :
raise MyError.StopError(e)
return data
which get the HTML source code from an URL. I use this to get a part of
a HTML
Best,
Philipp
On 09/26/2013 05:13 PM, Bill wrote:
> I have been using the script youtube-dl
> http://rg3.github.io/youtube-dl/
>
> And I was wondering if there is a way to download all of a user's
> favorites or uploads.
>
> The script has a functionality to download all
Hi anonymous,
your code is working perfectly right. It's just that the only time that
you find anything matching //div[@class="col f-cb"] is this one:
名称
视频下载
课程简介
And obviously, there's no in there, so the xpath won't match.
Cheers,
Philipp
On 02
there - instead of relying on the intuitive
grasp that both "a" and "ä" are single character strings, and that print
is a function like any other, they have to work with a lot of magic and
hand-waving)
- Philipp
signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list
ut the
problem is that that would mean lots of load on PyPi (if you query every
minute or so) and outdated packages (if you query less often than that).
Keeping a connection that PyPi would push to seems to be much cleaner.
- Philipp
signature.asc
Description: OpenPGP digital signature
--
http:
?
Cheers,
Philipp
On 02/21/2013 02:52 PM, Michael Herman wrote:
> I'd love to see https://crate.io/ set up an API or at the very least an RSS
> feed for tracking changes. I've emailed the author about this. I think if
> enough people do, an RSS feed would be easy to setup.
>
>
ed the entire changelog, just download it once (it's not that
large, barely 40MB). Here it is, up until 1361452402 (now):
http://phihag.de/2013/pypi-changelog-2013-02-20.json.bz2
What I'd like is a real-time push service of changelog entries, but I'm
not certain that would be sca
ing.
4. Update all subclasses whenever something changes.
5. Traverse the entire class hierarchy for every method call.
Which option should be picked?
Additionally, the reference implementation is not actually a fork of
cpython (or a metaclass), but a Python script that - as far as I
understand - I
everything has been sent or an error occurs.
If you're using TCP with blocking sockets and don't want to be bothered
by internals (this is the case for most simple network applications),
use sendall.
Otherwise, use send and make sure to read and process its return value.
- Philipp
On
cause a bluescreen,
Python 2.7 still works fine one thousands of Win7 machines.
Cheers,
Philipp
signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list
Better
write another one that wraps the calculation and outputs stuff.
>
> def secondBlockDifferences():
Instead of writing two methods to do the same thing, write one with
arguments.
> (...)
> text_file=open(file_name, 'w')
You're leaking the handle. Use with(open(file_name, 'w')) as text_file: .
> text_file.write('\nParticipant info: ', participant_info)
> firstBlockDifferences()
> secondBlockDifferences()
- Philipp
signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list
put to the invocation
arguments is often a better choice.
- Philipp
signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list
On 07/30/2012 01:31 PM, Jürgen A. Erhard wrote:
> On Mon, Jul 30, 2012 at 12:35:38PM +0200, Philipp Hagemeister wrote:
>> import subprocess
>> [ l.partition(' ')[0] # or l[:7], if you want to copy it verbatim
>> for l in subprocess.check_output(['lspci&
r l in subprocess.check_output(['lspci']).splitlines()
if 'Q' in l and isp_str1 in l and isp_str2 in l
]
You can also just paste the whole pipeline with the shell=True
parameter. That's not recommended though, and it's hard to correctly
quote strings.
- Phil
impression that the exception was not properly caught
by the except clause.
Oops, over a dozen posts and I still haven't grasped the OP's problem.
Sorry! and thanks for noting that.
- Philipp
signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list
on of non-newline characters. Therefore, the
most you can do is calculate an upper bound for the line number.
- Philipp
signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list
you can do is count the number of bytes with the value 10 before
ude.start, like this:
lineGuess = buf[:ude.start].count(b'\n') + 1
- Philipp
On 07/25/2012 01:05 PM, jaroslav.dob...@gmail.com wrote:
> it doesn't work
signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list
# to actually find out what pass happens to be in this context)
- Philipp
On 07/25/2012 10:40 AM, Ulrich Eckhardt wrote:
> Hi!
>
> I just had an idea, it occurred to me that the pass statement is pretty
> similar to the print statement, and similarly to the print() function,
ons to the dictionary, the
lists will directly correspond.
In most cases, you should simply use items() though. Can you elaborate
on the use case for needing both keys() and values(), where items() is
not applicable?
- Philipp
[1] http://docs.python.org/library/stdtypes.html#dict.items
signatu
On 07/16/2012 02:37 PM, Philipp Hagemeister wrote:
> Can we improve the discoverability of the discover
> option, for example by making it the default action, or including a
> message "use discover to find test files automatically" if there are no
> arguments?
Oops, alr
automatically" if there are no
arguments?
- Philipp
signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list
ree and run them all with a single command.
Currently, $ python -m unittest does nothing useful (afaik). Would it
break anything to look in . , ./test, ./tests for any files matching
test_* , and execute those?
- Philipp
signature.asc
Description: OpenPGP digital signature
--
http://mai
u can just queue a special message.
- Philipp
signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list
=target)
p.start()
p.join()
# try it here in main
target()
Cheers,
Philipp
On 06/12/2012 11:02 PM, Dave Cook wrote:
> Why doesn't my excepthook get called in the child process?
>
> import sys
> import multiprocessing as mp
>
> def target():
> name =
If you're looking for skilled developers, the best way to find them is
probably to search their current work.
http://careers.stackoverflow.com/ and the more experimental
http://githire.com/ are two excellent developer-friendly solutions for that.
- Philipp
On 03/01/2012 12:08 AM, Greg Har
lob('/usr/lib/python*/encodings/*.py')]
for e in encs:
try:
codecs.lookup(e)
except LookupError:
pass # __init__.py or something
enumerate /usr/lib/python.*/encodings/*.py and call codecs.lookup for
every os.path.splitext(os.path.basename(filename))[0]
Dou you see any p
ttps://github.com/rg3/youtube-dl/issues/152) will be your best shot.
Note that you can already redirect youtube-dl's output to a file, just
like any other shell program:
$ youtube-dl uHlDtZ6Oc3s > log
will write a file log that contains all of youtube-dl's output. If the
return code i
ure implemented is providing a patch (in form of a
github pull-request, if possible).
- -- Philipp (youtube-dl developer)
l...@mail.python.org wrote:
> python-based youtube-dl
> ~
> http://rg3.github.com/youtube-dl/
> ~
> is sorely missing a flag in order to indicate the maxi
t in searchedwordset
(or just skip this method and write word not in searchedwordset).
Cheers,
Philipp
Emeka wrote:
> Hello All,
>
> While learning Python I put together another Text Twist. I would want
> somebody to go through it and comment.
> https://github.com/janus/Text-Twi
el
and therefore include a slightly older one).
-- Philipp
signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list
..
cu
Philipp
--
Dr. Philipp Pagel
Lehrstuhl f. Genomorientierte Bioinformatik
Technische Universität München
http://webclu.bio.wzw.tum.de/~pagel/
--
http://mail.python.org/mailman/listinfo/python-list
and deleted it by accident.
Philipp
>
> Python 3.2a0 (py3k:74624, Sep 1 2009, 16:53:00)
> [GCC 4.3.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> class X:
> ... def __index__(sel
e object to int before constructing the hex string?
Regards,
Philipp Hagemeister
signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list
other
steps have you tried?)
Philipp
hunteroakes...@gmail.com wrote:
> HI
> I am new to python and am having trouble coming up with a script that
> idenifies all the live hosts on my network.
> thanks Hunter
signature.asc
Description: OpenPGP digital signature
--
http://mail.python
n:oasis:names:tc:opendocument:xmlns:table:1.0',
'protected',
'true')
doc.save('out.ods')
Regards,
Philipp
shruti surve wrote:
> hey,
> i am using odfpy and generating spreadsheet in open office..but nobody
> should modify the file..so can anyb
David Lyon wrote:
> On Mon, 18 May 2009 14:34:33 +0200, Philipp Hagemeister
> wrote:
>> Yes, but that processing will add /example/ to sys.path, right?
>
> It actually works the other way around. The directories listed in
> sys.path are scanned for .pth files.
No, they ar
ctly is wrong
> here?
>
> What are you expecting? and maybe we can tell you why you aren't getting
> it...
>
> David
I'm expecting .pth files in the current directory to be be processed,
according to docs/install/. Christian Heimes already pointed out this is
not the
"
1&3&5 => 6) echo /example/ > test.pth; python -c 'import
sys;print(repr(sys.path))' should contain '/example'.
I think I misinterpreted the documentation, but what exactly is wrong here?
Regards,
Philipp
signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list
alueError("Unknown protocol family " + family)
Since socket.AF_INET6 will not be defined on old systems (are there any
versions of Python 2.5+ that do not have that defined?), your solution
is better for those (but needs netaddr, which is unlikely to enter
stdlib soon). Thanks for sharing it.
Hi,
I'm trying to run the python profiler on some code but I always get
NameErrors, even for the simplest case taken from the docs:
import profile
def foo():
a = 5
def prof():
profile.run('foo()')
When I run prof() I get the following output:
Traceback (most recent call last):
File "",
; out = struct.pack('=H', struct.unpack('!H', inp)[0])
>>> out
'\x00\x04'
For more information, look for "Size and alignment" in
http://docs.python.org/library/struct.html.
Regards,
Philipp Hagemeister
-BEGIN PGP SIGNATURE-
Version
rite it. But then, why should I need ipaddr?
netaddr[3] has the function I'm looking for Addr('::1').packed(), but
it's way over the top for this purpose; an assembler implementation
would be more readable.
Kind regards,
Philipp Hagemeister
[1] http://bugs.python.org/issue5379
[
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
socket.inet_pton which does exactly what I want is not available on 2.x
on Windows. Strangely, the documentation of socket.inet_aton (IPv4 only)
reads:
"inet_aton() does not support IPv6, and getnameinfo() should be used
instead for IPv4/v6 dual sta
teria for
picking the values are, of course.
cu
Philipp
--
Dr. Philipp Pagel
Lehrstuhl f. Genomorientierte Bioinformatik
Technische Universität München
http://mips.gsf.de/staff/pagel
--
http://mail.python.org/mailman/listinfo/python-list
s" documentation:
http://docs.python.org/install/index.html
Have a look at Section 3 "Alternate installation".
cu
Philipp
--
Dr. Philipp Pagel
Lehrstuhl f. Genomorientierte Bioinformatik
Technische Universität München
http://mips.gsf.de/staff/pagel
--
http://mail.python.org/mailman/listinfo/python-list
sh that way. Biopython has such a parser:
www.biopython.org
cu
Philipp
--
Dr. Philipp Pagel
Lehrstuhl f. Genomorientierte Bioinformatik
Technische Universität München
http://mips.gsf.de/staff/pagel
--
http://mail.python.org/mailman/listinfo/python-list
Mensanator <[EMAIL PROTECTED]> wrote:
> On May 30, 10:03???am, Philipp Pagel <[EMAIL PROTECTED]>
> wrote:
> > 'P' is obviously not an ASCII representation of a number.
> It is in base 36.
Sure, but if that was the OP's intent he would most likely ha
t(a)
> and what you will get ? An error !!!
'P' is obviously not an ASCII representation of a number.
What did you expect? The closest number by visual appearance?
cu
Philipp
--
Dr. Philipp Pagel
Lehrstuhl f. Genomorientierte Bioinformatik
Technische Universität München
http
azrael <[EMAIL PROTECTED]> wrote:
> A friend of mine i a proud PERL developer which always keeps making
> jokes on python's cost.
There is only one sane way to deal with this situation: You need a
common enemy. Java comes to mind ;-)
cu
Philipp
--
Dr. Philipp
ense
but I don't think that's a good solution to the OP's problem.
cu
Philipp
--
Dr. Philipp Pagel
Lehrstuhl f. Genomorientierte Bioinformatik
Technische Universität München
http://mips.gsf.de/staff/pagel
--
http://mail.python.org/mailman/listinfo/python-list
s.
- More specific stuff e.g. in A. Gibbons "Algorithmic Graph Theory".
cu
Philipp
--
Dr. Philipp Pagel
Lehrstuhl f. Genomorientierte Bioinformatik
Technische Universität München
http://mips.gsf.de/staff/pagel
--
http://mail.python.org/mailman/listinfo/python-list
also do this:
import os
os.system('rm .lock*')
cu
Philipp
--
Dr. Philipp Pagel
Lehrstuhl f. Genomorientierte Bioinformatik
Technische Universität München
http://mips.gsf.de/staff/pagel
--
http://mail.python.org/mailman/listinfo/python-list
e date_string and format can't be parsed by
time.strptime() or if it returns a value which isn't a time tuple.
New in version 2.5.
--
cu
Philipp
--
Dr. Philipp Pagel
Lehrstuhl f. Genomorientierte Bio
Gerardo Herzig <[EMAIL PROTECTED]> wrote:
> Rockins Chen wrote:
> Well, if you have to use os.system, that could be
> os.system("export target=localhost.localdomain.org; ./callee.sh")
Or os.system("env target=localhost.localdomain.org ./callee.sh")
cu
On Nov 7, 4:08 pm, [EMAIL PROTECTED] wrote:
> 911 carried out by evil jews and mossadhttp://www.guba.com/watch/2000991770
>
> 911 truckload of Explosives on the George Washington
> Bridgehttp://www.youtube.com/watch?v=J520P-MD9a0
>
[...]
I reported the first post in this thread (on Google groups)
Ever came to your mind that there are people (programmers and others)
who will not use emacs for their day-to-day work simply because they
have tools that suit them better for the work they have to do (Eclipse
for me, as an example)?
Except from that: I personally don't feel that your rantings are
you want:
>>> import copy
>>> a=[[2,4],[9,3]]
>>> b = copy.deepcopy(a)
>>> [map(list.sort,b)]
[[None, None]]
>>> a
[[2, 4], [9, 3]]
>>> b
[[2, 4], [3, 9]]
cu
Philipp
--
Dr. Philipp Pagel Tel. +49-8161-71 2131
t: either upgrade to something less outdated or see if you
can get todays csv to work with the oldtimer.
cu
Philipp
--
Dr. Philipp Pagel Tel. +49-8161-71 2131
Dept. of Genome Oriented BioinformaticsFax. +49-8161-71 2186
Technical University of Munich
http://mip
quot;)
> What I want to do is return true if any member of tuple t1 is found in
> the remaining tuples.
Another way to go instead of using sets, although probably less elegant:
>>> True in [x in t1 for x in t2]
True
>>> True in [x in t1 for x in t3]
True
>>> Tru
ea_name)
'"*Foo*"'
Unless there are files with funny names containing '"' you will not get a
match.
cu
Philipp
--
Dr. Philipp Pagel Tel. +49-8161-71 2131
Dept. of Genome Oriented BioinformaticsFax. +49-8161-71 2186
Technical University of Munich
http://mips.gsf.de/staff/pagel
--
http://mail.python.org/mailman/listinfo/python-list
Chris <[EMAIL PROTECTED]> wrote:
> It could easily be the 2gig file size limitation, how large are the
> extracts?
The files are much smaller than that, so that's not the issue.
Anyway, Antoon pointed me in the right direction.
Thanks for the help
Philipp
--
Antoon Pardon <[EMAIL PROTECTED]> wrote:
> On 2007-02-09, Philipp Pagel <[EMAIL PROTECTED]> wrote:
> > for filename in file_list:
> > file = os.popen('uncompress -c '+filename, 'r')
> > do_something(file)
> > file.cl
compress
changes the wording of the error message but not the result.
I tried to give popen a large bufsize argument but that didn't really
help.
Probably I'm overlooking something obvious here but right now I can't
see it. Any hints?
cu
Philipp
--
Dr. Philipp Pagel
differetn groupos of some kind? Or are you just looking for extreme
values (outliers maybe?)?
So it's more of statistical question than a python one.
cu
Philipp
--
Dr. Philipp Pagel Tel. +49-8161-71 2131
Dept. of Genome Oriented BioinformaticsFax. +49-
Chris Brat <[EMAIL PROTECTED]> wrote:
> Is there a better way to replace/remove characters (specifically ' and
> " characters in my case, but it could be anything) in strings in a
> list, than this example to replace 'a' with 'b':
x = map(lambda foo:
extend this function to any given value ?
By subtracting the desired value from foo.
cu
Philipp
--
Dr. Philipp Pagel Tel. +49-8161-71 2131
Dept. of Genome Oriented BioinformaticsFax. +49-8161-71 2186
Technical University of Munich
http://mips.gsf.de/staff/pagel
--
http://mail.python.org/mailman/listinfo/python-list
got
wxPython-2.6.3.2-1.fc5
installed, but, excuse me, I really don't know anymore what at least helped.
Did you solve your problem?
Because I am writing a documentation for wiki I could need your experience.
Thanks
Philipp
--
http://mail.python.org/mailman/listinfo/python-list
Hello Pythonistas
I'm new to Python, I hope you understand my question.
I would like to pass a parameter "gap" to a function. gap should be
used there to create a timedelta Object.
from datetime import *
def f(gap):
print (datetime.now() + datetime.timedelta(gap))
f('hours = -8')
I r
Hello,
I am trying to xor the byte representation of every char in a string with
its predecessor. But I don't know how to convert a char into its byte
representation. This is to calculate the nmea checksum for gps data.
e.g. everything between $ and * needs to be xor:
$GPGSV,3,1,10,06,79,
mrstephengross schrieb:
> I'd like to do some basic SQL stuff in Python. It seems like there are
> a heck of a lot of SQL modules for Python. What's the simplest and
> easiest one to use?
>
> Thanks,
> --Steve ([EMAIL PROTECTED])
>
Do you have any
Hello,
I would like to use abstract methods in python to force some of the
classes to implement common methods.
I found this web page and wonder if it is a good way of implementing them:
http://www.lychnis.net/blosxom/programming/python-abstract-methods-3.lychnis
Also could some one please tel
Hello,
thank you very much for all your help. I have solved the problem - you
guys where right, the problem was some where else.
I have another class which got an accessor:
def getCenter(self):
global center
return center
and I called it by saying n.getCenter, but this returns:
Hello,
I got a newbie question, I have written the following distance function:
def distance(self,element1, element2):
dist = 0
for n in range(len(element1)):
dist = dist + pow((element1[n] - element2[n]),2)
print 'dist' + dist
return sqrt(dist)
and i
Hello,
this is the solution I went for, as I am indeed not concernt about
security and the implementation is straight forward.
Thank you,
Phil
> If you're not worried about security, you could write the repr() of each
> dict to the file and get the values back by using the eval() function.
> r
Thank you for you answer.
> > I would like to store multiple dictionaries in a file, if possible one per
> > line.
>
> Why "one per line" ?
I agree with you that it sounds like nasty code :-) but there is a good
reason for doing it this way - I think. My code collects data (attributes)
of its cu
Hello,
I would like to store multiple dictionaries in a file, if possible one per
line. My code currently produces a new dictionary every iteration and
passes it on to another peace of code. In order to be able to re-run some
experiments at a later date I would like to store every dictionary in th
82 matches
Mail list logo