I remembered that the open office was started to promote java long time ago by
Sun
selling work stations.
But the project ended to be practical.
--
http://mail.python.org/mailman/listinfo/python-list
there is a simple code,which can run locally ,and get three csv file in
c:/
#coding:utf-8
import urllib
import re
import os
exchange=['NASDAQ','NYSE','AMEX']
for down in exchange:
myfile=open('c:/'+down,'w')
url='
http://www.nasdaq.com/screening/companies-by-industry.aspx?exchange='+down+'
Terry Reedy writes:
> I would too, but if you prefer the indentation, just leave out the
> '+'s and let Python do the catenation when compiling:
Or use a trimple quoted string, with indentation in the source, and use
Python's batteries to manage it at runtime. Best of both worlds
http://stackove
On Jan 10, 8:21 pm, Jeffrey Britton wrote:
> I am building a standalone Windows executable using cx_Freeze.
> The resulting executable will not run and writes the following error
> to the console.
>
> ImportError: could not import gobject (error was: 'No module named
> gobject')
>
> The project us
Use size_t
http://en.wikipedia.org/wiki/C_data_types#Size_and_pointer_difference_types
On Wed, Jan 11, 2012 at 2:20 PM, Evan Driscoll wrote:
> Might as well ask another question of the list.
>
> I've written a ctypes-based Python wrapper around the 'readdir'
> function. (I want access to the dt_
Tom Zych on Mon, 28 Feb 2011 05:26:35 -0500
typed in comp.lang.python the following:
>We all like computers here. No doubt many of us like computer games.
>And most of us will be at least somewhat familiar with Monty Python.
>Therefore, I present (drum roll)...
>
>http://www.youtube.com/watch?v=Z
I am building a standalone Windows executable using cx_Freeze.
The resulting executable will not run and writes the following error
to the console.
ImportError: could not import gobject (error was: 'No module named
gobject')
The project using the gtk libraries for Cairo and Pango on Windows.
The
On Tue, 10 Jan 2012 22:59:23 -0500, Terry Reedy wrote:
> On 1/10/2012 8:43 PM, Chris Angelico wrote:
>
>> about = "Built by Walter Hurry using Python and wxPython,\n" + \
>> "with wxGlade to generate the code for the GUI elements.\n" +
>> \ "Phil Lewis' get_iplayer does the real
On 1/10/2012 8:43 PM, Chris Angelico wrote:
about = "Built by Walter Hurry using Python and wxPython,\n" + \
"with wxGlade to generate the code for the GUI elements.\n" + \
"Phil Lewis' get_iplayer does the real work.\n\n" + \
"Version 1.05: January 10, 2012"
I'd do t
On 1/10/2012 3:08 AM, Terry Reedy wrote:
On 1/9/2012 11:24 PM, pyscrip...@gmail.com wrote:
Using python 3.2 in Windows 7 I am getting the following:
compile('pass', r'c:\temp\工具\module1.py', 'exec')
Is this a filename that could be an actual, valid filename on your system?
UnicodeEncodeErr
Might as well ask another question of the list.
I've written a ctypes-based Python wrapper around the 'readdir'
function. (I want access to the dt_type field of the result, without
calling stat().)
However, it feels very... fragile. What happens on a different *nix
which uses a different size of
In article ,
Lie Ryan wrote:
> >> All serious database has rollback feature when they're available to
> >> quickly revert database state in the setUp/cleanUp phase.
> >
> > I guess MongoDB is not a serious database?
>
> I guess there are always those oddball cases, but if you choose MongoDB
>
Chris Angelico writes:
> On Wed, Jan 11, 2012 at 10:44 AM, HoneyMonster
> wrote:
> > Hi,
> >
> > I'm new to Python and recently completed my first project. I used
> > wxPython with wxGlade to generate the GUI bits.The application seems to
> > work well, but I am entirely self-taught, so have und
On 1/10/2012 9:06 AM, Jean-Michel Pichavant wrote:
- I quite dislike your avg method which does more than averaging, it
also inserts a value and removes another modifying the object in place.
It could be very confusing for someone reading your code. Fortunately,
you have documented it, that make
On 1/10/2012 8:17 PM, Ian Kelly wrote:
On Tue, Jan 10, 2012 at 4:44 PM, HoneyMonster wrote:
Hi,
I'm new to Python and recently completed my first project. I used
wxPython with wxGlade to generate the GUI bits.The application seems to
work well, but I am entirely self-taught, so have undoubtedl
On Wed, Jan 11, 2012 at 10:44 AM, HoneyMonster
wrote:
> Hi,
>
> I'm new to Python and recently completed my first project. I used
> wxPython with wxGlade to generate the GUI bits.The application seems to
> work well, but I am entirely self-taught, so have undoubtedly committed a
> number of howler
I'd like to be able to be able to define options and then look at the
lists. (For a concrete idea of a use case, suppose that it did not
directly support the --help option and I wanted to write code that took
its place.) Unfortunately, there doesn't seem to be any public API for
doing this.
Even i
On Jan 9, 8:19 pm, Stefan Behnel wrote:
> Note that lxml currently lacks binary Windows builds for its latest
> releases. There are eggs for the original 2.3 release, though.
Christoph Gohlke provides a fairly up-to-date set of Python packaged
binaries for Windows 32- & 64-bit.
There are lxml pa
On Tue, Jan 10, 2012 at 4:44 PM, HoneyMonster wrote:
> Hi,
>
> I'm new to Python and recently completed my first project. I used
> wxPython with wxGlade to generate the GUI bits.The application seems to
> work well, but I am entirely self-taught, so have undoubtedly committed a
> number of howlers
Terry Reedy writes:
> Are there any links for that?
[…]
> Do you have any idea how to get the importable modules?
Those will have to be exercises for someone with more need than I of
hacking on an office suite. I have no experience with that.
--
\“Your [government] representative owes
On 1/10/2012 8:43 AM, jmfauth wrote:
D:\>c:\python32\python.exe
Python 3.2.2 (default, Sep 4 2011, 09:51:08) [MSC v.1500 32 bit
(Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
'\u5de5'.encode('utf-8')
b'\xe5\xb7\xa5'
'\u5de5'.encode('mbcs')
Traceback
On 1/10/2012 5:29 PM, Ben Finney wrote:
LibreOffice supports scripting with several languages, including Python
http://help.libreoffice.org/Common/Scripting>.
So that page says. But it only tells how to attach a Python script once
writen, not how to write one that will do anything. Are there
Hi,
I'm new to Python and recently completed my first project. I used
wxPython with wxGlade to generate the GUI bits.The application seems to
work well, but I am entirely self-taught, so have undoubtedly committed a
number of howlers in terms of style, design, standards, best practice and
so forth
On Mon, 9 Jan 2012 00:55:22 -0300, Sean Wolfe
wrote:
>kindle? ipad? tablet?
I'm interested in books, not files ...
(seriously, now ... I don't have any of those devices)
>also there is python programming for the absolute beginner, which is
>agreat book but it's pretty beginner. But well writte
Yigit Turgut wrote:
class test(test1):
def __init__(self, device):
.
.
.
def _something(self, x=1)
self.dt = data
if __name__ == "__main__":
test.something.dt ???
I am trying to call a variable located in a function of a class
dt is an attribute of an instance of the class.
t = test() #
Sean Wolfe writes:
> I'm a somewhat-satisfied openoffice.org user.
You may know about the change of focus in recent months to LibreOffice
https://www.libreoffice.org/>. The Document Foundation is where the
majority of the project's institutional knowledge, development effort,
open collaboration,
On Tue, Jan 10, 2012 at 6:53 PM, Nelle Varoquaux
wrote:
> Small nitpick: Openoffice.org (and LibreOffice) has in fact very little
> java. The core of it is written in C++, so if you ever want to extend it
> (unlikely), you won't be dealing with java code.
>
hmm I didn't know this, nice to know. Y
On Wed, Jan 11, 2012 at 2:24 AM, Stéphane Klein wrote:
> Hi,
>
> I wonder if there are a tool like webalizer in python language.
> (http://en.wikipedia.org/wiki/Webalizer).
>
> I would like to do some patch in webalizer, but I don't want to spend too
> many time to do that in C language. In Python
On 10 January 2012 22:43, Sean Wolfe wrote:
> I'm a somewhat-satisfied openoffice.org user. I mean it works, but if
> it weren't in Java I'd be doing some of my own tweaking. But since
> it's in Java I stay away... no likey.
>
Small nitpick: Openoffice.org (and LibreOffice) has in fact very litt
I'm a somewhat-satisfied openoffice.org user. I mean it works, but if
it weren't in Java I'd be doing some of my own tweaking. But since
it's in Java I stay away... no likey.
Has there been any talk of doing another similar office suite, or
maybe just writer + spreadsheet, in a better language eg
On 01/10/2012 03:24 PM, bruce wrote:
Since dict_hash returns a string, which is immutable, you can now use
a dictionary to find the unique elements:
uniques_map = {}
for d in list_of_dicts:
uniques[dict_hash(d)] = d
unique_dicts = uniques_map.values()
*** not sure what the "uniqes" is, o
trying to figure out how to generate a unique set of dicts from a
json/list of dicts.
initial list :::
[{"pStart1a":
{"termVal":"1122","termMenu":"CLASS_SRCH_WRK2_STRM","instVal":"OSUSI",
"instMenu":"CLASS_SRCH_WRK2_INSTITUTION","goBtn":"CLASS_SRCH_WRK2_SSR_PB_SRCH",
"pagechk":"CLASS_SRCH_WRK2_SS
On 01/10/12 10:49, Roy Smith wrote:
The docs for re.VERBOSE say, "Whitespace within the pattern is
ignored, except when [...] preceded by an unescaped
backslash". It's unclear exactly what that means. If my
pattern is:
is the second space considered to be preceded by a backslash,
and thus ta
Am 10.01.2012 13:31, schrieb Lie Ryan:
While it is possible to replace __dict__ with OrderedDict and it is
possible to reorder the test, those are not his original problem, and
the optimal solution to his original problem differs from the optimal
solution to what he think he will need.
Oh, and
Ian Kelly writes:
> Probably nobody has noticed it until now. It seems to be a quirk of
> the archive files that they are double-gzipped...
Interesting, but I don't think the files are actually double-gzipped. If
I download
http://mail.python.org/pipermail/python-list/2012-January.txt.gz with
w
On Tue, 2012-01-10 at 09:05 -0500, Roy Smith wrote:
>
> I guess MongoDB is not a serious database?
That's opening up a can of worms ;)
... anyway, cassandra is far better.
Tim
--
http://mail.python.org/mailman/listinfo/python-list
The docs for re.VERBOSE say, "Whitespace within the pattern is ignored, except
when [...] preceded by an unescaped backslash". It's unclear exactly what that
means. If my pattern is:
is the second space considered to be preceded by a backslash, and thus taken
literally, or does the backslas
On 1/9/12 16:41 , Philipp Hagemeister wrote:
I want to forbid my application to access the filesystem. The easiest
way seems to be chrooting and droping privileges. However, surprisingly,
python loads the codecs from the filesystem on-demand, which makes my
program crash:
import os
os.getuid()
Rod Kosloski wrote:
> I'm perlexed by an apparent inconsistency in the behavior of the import
> statement.
>
> First, the files. There is a simple package, pkg, containing two files:
> mod.py and util.py, and a stand-alone module also named util.py:
>
>*** ./pkg/__init__.py ***
>from mod
Another option is to copy the data to the a location under the new chroot and
register a new lookup functions
(http://docs.python.org/library/codecs.html#codecs.register). This way you can
save some memory.
--
http://mail.python.org/mailman/listinfo/python-list
I'm perlexed by an apparent inconsistency in the behavior of the import
statement.
First, the files. There is a simple package, pkg, containing two files: mod.py
and util.py, and a stand-alone module also named util.py:
*** ./pkg/__init__.py ***
from mod import *
*** ./pkg/mod.py ***
On 01/11/2012 01:05 AM, Roy Smith wrote:
In article,
Lie Ryan wrote:
On 01/10/2012 12:05 PM, Roy Smith wrote:
Somewhat more seriously, let's say you wanted to do test queries against
a database with 100 million records in it. You could rebuild the
database from scratch for each test, but d
> Jean-Michel wrote: Module names should be lowercase
You're right. I was too lazy and just copied the class name. I will keep
that in mind for the future. ;)
> Jean-Michel wrote: I quite dislike your avg method which does more than
> averaging, it also inserts a value and removes another modifyi
Am 10.01.2012 12:37 schrieb Νικόλαος Κούρας:
So that means that
for host, hits, agent, date in dataset:
is:
for host, hits, agent, date in (foo,7,IE6,1/1/11)
and then:
for host, hits, agent, date in (bar,42,Firefox,2/2/10)
and then:
for host, hits, agent, date in (baz,4,Chrome,3/3/09)
Νικόλαος Κούρας wrote:
> On 10 Ιαν, 03:11, Ian Kelly wrote:
> > 2012/1/9 Íéêüëáïò Êïýñáò :
> >
> > > if the MySQL query was:
> >
> > > cursor.execute( '''SELECT host, hits, agent, date FROM visitors WHERE pin
> > > =
> > > %s ORDER BY date DESC''', pin )
> >
> > > can you help me imagine how th
Hi,
I wonder if there are a tool like webalizer in python language.
(http://en.wikipedia.org/wiki/Webalizer).
I would like to do some patch in webalizer, but I don't want to spend
too many time to do that in C language. In Python I can do this patch in
few minute.
Do you know a tool like t
Hi StephenThanks for examining and advise a solution. Before testing CPython I wanted to run this very simple think to send a tuple to a method of a python class.I have succeeded in sending a tuple (declared exactly the same way as I do in the code) to a method written in a python filebut as soon
In article ,
Lie Ryan wrote:
> On 01/10/2012 12:05 PM, Roy Smith wrote:
> > Somewhat more seriously, let's say you wanted to do test queries against
> > a database with 100 million records in it. You could rebuild the
> > database from scratch for each test, but doing so might take hours per
>
patr...@bierans.de wrote:
Thanks for the feedback!
I took the time reading and understanding it and to let it getting into my
bones. And I also lost time on reading more of this freaky and interesting
documentation and was testing a lot of different stuff with my enviroment.
My current code can
[cleaned up top-posted citation order to make the replies readable]
刘振海, 10.01.2012 14:24:
> 2012/1/10 Stefan Behnel
>> """
>> # in module "gluecode.pyx" (or whatever you want to name it)
>>
>> import mModule8
>>
>> cdef api float compute_norm(float init_value, float x, float y, float z):
>>ve
On 10 jan, 13:28, jmfauth wrote:
Addendum, Python console ("dos box")
D:\>c:\python32\python.exe
Python 3.2.2 (default, Sep 4 2011, 09:51:08) [MSC v.1500 32 bit
(Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> '\u5de5'.encode('utf-8')
b'\xe5\xb7\xa5'
" ??" wrote in message
news:afd612b7-2366-40be-badf-13c97655f...@o12g2000vbd.googlegroups.com...
>
> So that means that
>
> for host, hits, agent, date in dataset:
>
> is:
>
> for host, hits, agent, date in (foo,7,IE6,1/1/11)
>
> and then:
>
> for host, hits, agent, date in (bar,42
Hi,
I have been using Cython for a period of time.
But I can not find a description for the "api" key word in Cython documents
cdef api float compute_norm(float init_value, float x, float y, float z):
Can you explain it a little bit? Thanks!
Regards,
Liu Zhenhai
2012/1/10 Stefan Behnel
> Hi a
On 01/09/2012 04:35 PM, John Nagle wrote:
A type-inferring compiler has to analyze the whole program at
once, because the type of a function's arguments is determined
by its callers. This is slow. The alternative is to guess
what the type of something is likely to be, compile code at
run time, an
Hi again,
just as a little teaser, to make it clear that I'm not joking, here's your
code below translated into Cython.
Stefan Behnel, 10.01.2012 13:33:
> paspa...@noos.fr, 10.01.2012 11:57:
>> the code is the following:
> [...]
>> // Class
>> pclass = PyObject_GetAttrString(mymod, "cVector");
>>
Νικόλαος Κούρας writes:
> So that means that
>
> for host, hits, agent, date in dataset:
>
> is:
>
> for host, hits, agent, date in (foo,7,IE6,1/1/11)
>
> and then:
>
> for host, hits, agent, date in (bar,42,Firefox,2/2/10)
>
> and then:
>
> for host, hits, agent, date in (baz,4,Chrome,3
On 01/10/2012 03:59 AM, Ulrich Eckhardt wrote:
There is another dependency and that I'd call a logical dependency. This
occurs when e.g. test X tests for an API presence and test Y tests the
API behaviour. In other words, Y has no chance to succeed if X already
failed. Unfortunately, there is n
Hi!
paspa...@noos.fr, 10.01.2012 11:57:
> I am trying to pass a tuple to a method of a class from C++ to Python. I get
> a
> Run Failed from the execution.
> thanks for help/suggestions
My *suggestion* is to use Cython instead of writing the glue code yourself.
There are several bugs and lots o
On 01/10/2012 12:16 AM, Ulrich Eckhardt wrote:
Am 09.01.2012 13:10, schrieb Lie Ryan:
I was just suggesting that what the OP thinks he wants is quite
likely not what he actually wants.
Rest assured that the OP has a rather good idea of what he wants and
why, the latter being something you don'
On 10 jan, 11:53, 8 Dihedral wrote:
> Terry Reedy於 2012年1月10日星期二UTC+8下午4時08分40秒寫道:
>
>
> > I get the same error running 3.2.2 under IDLE but not when pasting into
> > Command Prompt. However, Command Prompt may be cheating by replacing the
> > Chinese chars with '??' upon pasting, so that Pyth
On 01/10/2012 12:05 PM, Roy Smith wrote:
Somewhat more seriously, let's say you wanted to do test queries against
a database with 100 million records in it. You could rebuild the
database from scratch for each test, but doing so might take hours per
test. Sometimes, real life is just*so* incon
On 10 Ιαν, 12:57, Thomas Rachel wrote:
> Am 10.01.2012 10:02 schrieb Νικόλαος Κούρας:
>
> > ---
> > | HOST | HITS | AGENT | DATE |
> > ---
> > | foo | 7 | IE6 | 1/1/11 |
> > --
On 10 Ιαν, 12:57, Thomas Rachel wrote:
> Am 10.01.2012 10:02 schrieb Νικόλαος Κούρας:
>
> > ---
> > | HOST | HITS | AGENT | DATE |
> > ---
> > | foo | 7 | IE6 | 1/1/11 |
> > --
Am 10.01.2012 10:02 schrieb Νικόλαος Κούρας:
---
| HOST| HITS| AGENT | DATE |
---
| foo | 7 | IE6 | 1/1/11 |
---
| bar | 42 | Fi
Yigit Turgut wrote:
class test(test1):
def __init__(self, device):
.
.
.
def _something(self, x=1)
self.dt = data
if __name__ == "__main__":
test.something.dt ???
I am trying to call a variable located in a function of a class from
main but couldn't succeed
HelloI am trying to pass a tuple to a method of a class from C++ to Python. I get a Run Failed from the execution. thanks for help/suggestionsthe code is the following:Python Code:class cVector: def __init__(self,msg): self.value = msg def ComputeNorm(self,vecData): #don't use vecData for
Terry Reedy於 2012年1月10日星期二UTC+8下午4時08分40秒寫道:
> On 1/9/2012 11:24 PM, pyscr...@gmail.com wrote:
> > Using python 3.2 in Windows 7 I am getting the following:
> >
> >>> compile('pass', r'c:\temp\工具\module1.py', 'exec')
> > UnicodeEncodeError: 'mbcs' codec can't encode characters in position 0--1:
>
1) If I copy/paste these CJK chars from Google Groups in two of my
interactive
interpreters (no "dos/cmd console"), I have no problem.
>>> import unicodedata as ud
>>> ud.name('工')
'CJK UNIFIED IDEOGRAPH-5DE5'
>>> ud.name('具')
'CJK UNIFIED IDEOGRAPH-5177'
>>> hex(ord(('工')))
'0x5de5'
>>> hex(ord('
On 10 Ιαν, 03:11, Ian Kelly wrote:
> 2012/1/9 Íéêüëáïò Êïýñáò :
>
> > if the MySQL query was:
>
> > cursor.execute( '''SELECT host, hits, agent, date FROM visitors WHERE pin =
> > %s ORDER BY date DESC''', pin )
>
> > can you help me imagine how the mysql database cursor that holds the query
> > r
On Jan 7, 4:13 pm, Chris Angelico wrote:
> On Sat, Jan 7, 2012 at 9:59 PM, Sophie Sperner
> wrote:
> > Could you please list me 2 or 3 projects in Python and/or Java which
> > are currently active (vivid) and useful?
>
> Easiest way to find a project to join would be to go to SourceForge,
> Goog
On 1/9/2012 11:24 PM, pyscrip...@gmail.com wrote:
Using python 3.2 in Windows 7 I am getting the following:
compile('pass', r'c:\temp\工具\module1.py', 'exec')
UnicodeEncodeError: 'mbcs' codec can't encode characters in position 0--1:
invalid character
Can anybody explain why the compile state
71 matches
Mail list logo