Hi guys,
I need something about modules to be clarified.
Suppose I have written a module eg: ModuleA which imports an other
module, let us say the datetime.
If I import ModuleA in a script, will be datetime imported automatically?
Thanks in advance,
--
Urbán Gábor
Linux is like a wigwam: no G
Hi guys,
Thank you very much for the accurate answer.
Upgrading our Python to 3.7 seems to be out of question at the moment. I
will check the requirement specification if the order of the keys is
important at all.
It could be a wish only.
--
Urbán Gábor
Linux is like a wigwam: no Gates, no Win
to verify the sequence. Sometimes this test
fails, sometimes passes without any change neither in the code, nor in the
testcase. I am using "list(myDict.keys())" to create the list of the keys
of the dictionary.
I am running Python 3.3 on MS Windows. Any idea why is this?
Thx, Gabor
Hi guys,
I tried to solve the problem once again. I have inserted some print
statements the check the variables.
The actual code (naplo.py) is copy-pasted here:
class Naplo:
def __init__(self, pNeve, pMeret, pMode = 'a'):
self.logNev = pNeve
self.meret = pMeret
Hi,
I am facing an issue I was not able to solve yet. I have a class saving
messages to a file. The relevant code is:
import OS
import sys
class MxClass:
def __init__(self, fName, fMode,):
self.fileName = fName
self.fileMode = fMode
def writeMetho
Hi guys,
Thanks for the answers. IT is clear Noé.
Gábor
--
https://mail.python.org/mailman/listinfo/python-list
Hi guys,
I have a quite simple question but I could not find the correct answer.
I have twoo modules A and B. A imports B. If I import A in a script, Will
be B imported automatically? I guess not, but fő not know exactly.
Thanks for your answer ín advance,
Gábor
--
https://mail.python.org/mail
Hi,
my 11 years old son and his classmate told me, that they would like to
learn Python. They did some programming in Logo and turtle graphics, bat
not too much.
Doesn anybody has an idea how to start?
--
Urbán Gábor
Linux is like a wigwam: no Gates, no Windows and an Apache inside.
--
https:
Hi guys,
I am using Python 2.3 on an XP box at my company. (I know it is quite
outdated, but we could not make the management to upgrade.) I have started
a pilot project the last week to show the possibility of processing
incoming XML files and extracting data into Oracle tables.
Now I am almost
seems to be far from complete.
Thanks in advance,
Gabor Urban
--
Urbán Gábor
Linux is like a wigwam: no Gates, no Windows and an Apache inside.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I would like to enable loggin in my script using the logging module that comes
with Python 2.7.3.
I have the following few lines setting up logging in my script, but for
whatever reason I don't seem to get any output to stdout or to a file
provided to the basicConfig method.
Any ideas?
self.pack()
self.createWidgets()
self.db = 0
app = Application()
app.master.title('UG test')
app.mainloop()
Thx in advance...
Gabor
--
Linux is like a wigwam: no Gates, no Windows and an Apache inside.
--
http://mail.python.org/mailman/listinfo/python-list
Hi guys,
thanks for the ideas. Here you are the code. Not transcoded from Java
for I do not know Java enough..
I am scanning an XML file, and have a large ammount of logging.
Any ideas are wellcome as before
Thnx
Code:>
#-
## Generate CSV from O
dex].owner,packages[index].schema)
AttributeError: class Package has no attribute 'serial'
The strange in this issue for me, that I do not see why are the class
methods and fields lost.
Any idea is wellcome.
Gabor
--
Linux: Choice of a GNU Generation
--
http://mail.python.org/mailman/listinfo/python-list
on is performed only
once. How can we implement this? I do not know what to google for.....
Gabor
--
Linux: Choice of a GNU Generation
--
http://mail.python.org/mailman/listinfo/python-list
Hi guys,
this a very MS specific question. I do use a rather old Python
version, because we have a couple of applications written for that.
Porting them to a newer Python is not allowed by the bosses. Now we
will start a new project with latest stable Python. Can I have them
both on my computer, a
Hy guys,
Sorry, Vinay Sajip was right. I wrote my questions about PEP 391. I
would like to know your ideas about my questions posted in my last
mail.
Gabor
--
Linux: Choice of a GNU Generation
--
http://mail.python.org/mailman/listinfo/python-list
?
-- How can the logging module guarantee that there will be no data loss
during the reconfiguration process?
Regards,
Gabor
--
Linux: Choice of a GNU Generation
--
http://mail.python.org/mailman/listinfo/python-list
Hey guys,
this is supposed to be a Python mailing list...
Both editors are great and are with great potentials. I do use both of
them daily, though for different purposes. It is meaningless to start
this old issue of preferences anew.
--
Linux: Choice of a GNU Generation
--
http://mail.python.
created properly but contains no lines at all. If I
put the code directly in __main__, it works fine.
What did I miss? Any ideas are wellcome.
Gabor
--
Linux: Choice of a GNU Generation
--
http://mail.python.org/mailman/listinfo/python-list
conceot of wrtitten User Manual or
Reference. All we have learned Python from tutorials and not from the menues.
As a summary, any open source editor should be perfect, which is
extensible, optionally language-sensitive, portable, basically
independent of any OS features. THat cuts the list dramm
I use Emacs, as for the other editing activities. I like it for it is
very powerfull.
--
Linux: Choice of a GNU Generation
--
http://mail.python.org/mailman/listinfo/python-list
Java, C++,
and any other languages. For myself I can say, I am a seasoned Emacs
user, and would not switch to any fancy IDE. BUT that is personal
view.
IMHO this question does not bellong here, though I was very pleased to
read arguments instead of flames :-))
Gabor
--
Linux: Choice of a GNU
I gues, it was rather simple...
Begin with simple tasks, figure out how to do them. If you are
proceding well, then increase difficulty/complexity.
Gabor
--
Linux: Choice of a GNU Generation
--
http://mail.python.org/mailman/listinfo/python-list
n pro and contra. I would like to get the
background as precisely as possible.
Thanks in advance and good day to You!
Gabor
--
http://mail.python.org/mailman/listinfo/python-list
OK, you are right... Problem was not precise enough. I need to process CDs
to create a list. Does it ring a bell for you?
Thanks
2007/11/15, Laszlo Nagy <[EMAIL PROTECTED]>:
>
> Gabor Urban wrote:
> > Hi,
> >
> > I have a problem, which may be trivial, but I could
unix
type systems, and on MS XP or Vista, too
Any ideas are wellcome.
Gabor
--
http://mail.python.org/mailman/listinfo/python-list
Thx guys
You gave me good ideas. At the moment I do not have time for it, but I would
like to write a summary.
Have fun
--
http://mail.python.org/mailman/listinfo/python-list
Hullo,
I have started to use Python's logging, and got a problem. I have created
some loggers and wrote some lines in the log. The problem is, that most of
the lines appear doubled in the log, and some lines do not appear at all.
Any ideas or comments are wellcome,
Gabor
Here is the
Hullo,
I was just wondering if this thread was whithering out.. I gues not for
a good time.
A short summary in the hope for the last posting in this topic.
Some provocative posting caused or Twister brother to send a large amount of
doubtful info. It seems, he had some very bad experience w
Hi guys.
I have an issue I think Python could handle. But I do not have the knowledge
to do it.
Suppose I have a class 'myClass' and instance 'var'. There is function
'myFunc(..)'. I have to add (or bind) somehow the function to the class, or
the instance. Any help, info or point of referenc
mailing list of an open source
programming language. :-
Arguments and logic are not working, it's been a 'religious' flame topic.
I am open to discuss this issue further in private..
Gabor
--
http://mail.python.org/mailman/listinfo/python-list
of them, and IMHO could be
set as an efficiency/proficiency standard. But if it does not fit to your
fingers or working style, do not use it.
I am open to personal debate outside of this list,
Gabor
--
http://mail.python.org/mailman/listinfo/python-list
Hi guys...
This topic is not relevant in this mailing list.
Though some info from an other mailing list. Emacs (and xemacs) runs
perfectly well on non-gui environments as well. So keyboard commands are the
only efficient way to work with. It is true, Emacs may be a bit antiquated,
but it honed
t stuff!)."
I would suggest you to read Dive into Python. Very deep
descriptions.
3. I vote for Emacs :-))
Gabor Urban
NMC - ART
--
http://mail.python.org/mailman/listinfo/python-list
Stephen wrote:
" For a newbie any material referenced should be current and include
what is available in Python 2.5."
I disagree. A newbie should learn Python and and Python programming .
Not the latest should be the best choice....
Gabor Urban
NMC - ART
--
http://mail.python.o
good enough.
Good luck,
Gabor Urban
NMC - ART
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of urielka
Sent: 2007. május 2. 23:10
To: python-list@python.org
Subject: unittest dependencies
i am using unittest to test a project,and one thing i really want
ile "D:\Python24\lib\unittest.py", line 797, in runTests
sys.exit(not result.wasSuccessful())
SystemExit: False
>>>
The script I was executing was a simple unittest.TestCase descendant.
Any ideas?
Gabor Urban
NMC - ART
--
http://mail.python.org/mailman/listinfo/python-list
HI,
I could suggest you to use the minidom xml parser from xml module. Your
XML schema does not seem to complocated. You will find detailed
descriptions, and working code in the book: Dive ino Python. Google for
it :-))
Gabor Urban
NMC - ART
--
http://mail.python.org/mailman/listinfo
Martin v. Löwis wrote:
> gabor schrieb:
>>> I may have missed something, but did you present a solution that would
>>> make the case above work?
>> if we use the same decoding flags as binary-string.decode(),
>> then we could do:
>>
>> [os.path.
Martin v. Löwis wrote:
> gabor schrieb:
>> 1. simply fix the documentation, and state that if the file-name cannot
>> be decoded into unicode, then it's returned as byte-string.
>
> For 2.5, this should be done. Contributions are welcome.
>
> [...then]
&
Fredrik Lundh wrote:
> gabor wrote:
>
>> yes, sure... but then.. it's possible to implement it also on top of
>> an raise-when-error version :)
>
> not necessarily if raise-when-error means raise-error-in-os-listdir.
>
could you please clarify?
currently i
Martin v. Löwis wrote:
> gabor schrieb:
>> depends on the application. in the one where it happened i would just
>> display an error message, and tell the admins to check the
>> filesystem-encoding.
>>
>> (in other ones, where it's not critical to get the
Gregor Horvath wrote:
> walterbyrd schrieb:
>> What other "gotchas" would I look for?
>>
>
> Maybe this is helpfull for you:
>
> http://docs.turbogears.org/1.0/Hosting
>
and this:
http://code.djangoproject.com/wiki/DjangoFriendlyWebHosts
gabor
--
astcgi
- sci
- proxy
also the same way, for php:
- mod_php
- fastcgi
- cgi
- (maybe something more, i'm not much experienced with php)
so first you should tell us which python-solution would you like to
compare to which php-solution..
gabor
--
http://mail.python.org/mailman/listinfo/python-list
Martin v. Löwis wrote:
> gabor schrieb:
>> i also recommend this approach.
>>
>> also, raising an exception goes well with the principle of the least
>> surprise imho.
>
> Are you saying you wouldn't have been surprised if that had been
> the behavior
Fredrik Lundh wrote:
> gabor wrote:
>
>> get an Unicode-exception, as everywhere else. you see, exceptions are
>> ok, i can deal with them.
>
>> p.s: one additional note. if you code expects os.listdir to return
>> unicode, that usually means that all your cod
iles = [check_and_fix_wrong_filename(f) for f in files]
in other words, your opinion is that the proposed solution is not
optimal, or that the current behavior is fine?
gabor
--
http://mail.python.org/mailman/listinfo/python-list
Laurent Pointal wrote:
Laurent Pointal wrote:
> gabor a écrit :
>> hi,
>>
>> from the documentation (http://docs.python.org/lib/os-file-dir.html) for
>> os.listdir:
>>
>> "On Windows NT/2k/XP and Unix, if path is a Unicode object, the result
>> w
Jean-Paul Calderone wrote:
> On Fri, 17 Nov 2006 00:31:06 +0100, "\"Martin v. Löwis\""
> <[EMAIL PROTECTED]> wrote:
>> gabor schrieb:
>>>> All this code will typically work just fine with the current behavior,
>>>> so people typical
Martin v. Löwis wrote:
> gabor schrieb:
>
>> or am i using os.listdir the "wrong way"? how do other people deal with
>> this?
>
> You didn't say why the behavior causes a problem for you - you only
> explained what the behavior is.
>
> Most pe
l, because the auto-convert only
happens using 'ascii' as the encoding, and if it was not possible to
decode the filename inside listdir, it's quite probable that it also
will not work using 'ascii' as the charset.
gabor
--
http://mail.python.org/mailman/listinfo/python-list
currently wrong?
because from what i see (the bug will not be fixed),
it's still much safer to define a __hash__ even for mutable objects
(when the object also defines __eq__).
gabor
--
http://mail.python.org/mailman/listinfo/python-list
Max M wrote:
> gabor wrote:
>> hi,
>>
>> i'm trying to get the date of the day one month ago.
>>
>> for example:
>>
>> today = 12.apr.2006
>> one-month-ago = 12.mar.2006
>>
>> so:
>>
>> one-month-ago(12.apr.2006) =
the datetime.timedelta objects only work with hours or days or weeks,
not month (i understand why)...
but is there a way to calculate this in python?
i really don't want to calculate it by myself :-))
thanks,
gabor
--
http://mail.python.org/mailman/listinfo/python-list
m,
>>so I assumed it was string.
>
>
> I did too.
>
i'm sorry ;) it was a list of strings...
the code was something like:
for line in open('x.y'):
line = line.split('\t')
a better naming would be better it seems :)
gabor
--
http://mail.python.org/mailman/listinfo/python-list
hi,
there are 2 versions of a simple code.
which is preferred?
===
if len(line) >= (n+1):
text = line[n]
else:
text = 'nothing'
===
===
try:
text = line[n]
except IndexError:
text = 'nothing'
===
which is the one you would use?
when i am running a python process, and the
threads are running on different cpus?
i understand that because of the GIL i cannot make my application
faster. but slower?
thanks,
gabor
--
http://mail.python.org/mailman/listinfo/python-list
Mike Meyer wrote:
> gabor <[EMAIL PROTECTED]> writes:
>
>
>>ok, i ended up with the following code:
>>
>>def syncLog(filename,text):
>> f = os.open(filename,os.O_WRONLY | os.O_APPEND)
>> fcntl.flock(f,fcntl.LOCK_EX)
>> os.write(f
gabor wrote:
> Jp Calderone wrote:
>
>> To briefly re-summarize, when you want to acquire a lock, attempt to
>> create a directory with a well-known name. When you are done with it,
>> delete the directory. This works across all platforms and filesystems
>>
done periodically by
> another process, on a time-scale that is 'useful' if not
> instantaneous...
>
> Just trying to understand here...
>
actually this is what i implemented after asking the question, and works
fine :)
i just thought that maybe there is a solution wher
mething like a mutex-synchronized block of the code...
gabor
--
http://mail.python.org/mailman/listinfo/python-list
seems as a stupid way to do it :(
another idea was to use a simple database (sqlite?) which probably has
this problem solved already...
any better ideas?
thanks,
gabor
--
http://mail.python.org/mailman/listinfo/python-list
Gabor Farkas wrote:
> www.pythonchallange.com
sorry, wanted to send it to someone else..
(too tired...)
;(
gabor
--
http://mail.python.org/mailman/listinfo/python-list
www.pythonchallange.com
--
http://mail.python.org/mailman/listinfo/python-list
65 matches
Mail list logo