Hi,
I need a traffic network simulator(for roads) for my
project work.I would prefer the simulator to be in
python so that i can reprogram/modify it according to
my needs.
does anyone know where i can find something of the
sort or are there any special modules available which
can help me build one
Hi,
I intend to create compiled python binaries on linux.
I understand that freeze can be used to do this.
But I have few doubts i would like to clarify.
1. In the freeze documentation i found the lines:
"One tricky issue: Freeze assumes that the Python
interpreter and
environment you're using t
Hi,
Do exe files generated by py2run on linux???i thought
it was only for windows.
Shitiz
--- "Jacob S." <[EMAIL PROTECTED]> wrote:
> My two bits.
>
> 1) Download py2exe found here
> http://py2exe.sourceforge.net/
> 2) Make a setup file -- intructions can be found
> through above link, I
> thi
Hi,
I do see a problem.
The script is fine, the problem lies else where.
Your script is trying to write log.bak to log, it
should b other way round.
i.e
srcfile = open('/var/log/httpd-access.log', 'r')
dstfile = open('/var/log/httpd-access.log.bak', 'w')
hope that fixes it.
About the effici
Hi,
My solution might raise purist's eyebrows but here it
goes...
How about using a try loop every time you read from
the list.
try:
x=list[someno]
except:
x=nothing(or whatever)
This goes on till the all lists start returning none.
for shorter lists try throws an index out of range
excepti
How about
cat log|grep -v -E [[:alnum]]'{2096}'>> log.bak
The issue is - will unix shell command be any more
efficient than a python script??
Also i used append because i gathered that the user
will not want to erase the previous logs. He is free
to use a single > if he does.
--- Alan Gaul
I aplogise for a typo...
Please read the command as:
cat log|grep -v -E [[:alnum]]'{2096,}'>> log.bak
note the missing comma in the previous command.
--- Shitiz Bansal <[EMAIL PROTECTED]> wrote:
>
> How about
>cat log|grep -v -E [[:alnum]]'{2096}
Hi,
Is there a way to terminate a thread from another
thread?
Shitiz
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
___
Tutor maillist - Tutor@
Hi,
Is there a python equivalent of c's sizeof function.
If not, then what are the typical sizes of the
BoundedSemaphore object in python?
Shitiz
__
Do you Yahoo!?
Yahoo! Sports - Sign up for Fantasy Baseball.
http://baseball.fantasysports.yaho
Hi,
I am trying to build a traffic network simulator using
python, for my degree project.
I need to run at least 5-6000 cars simultaneously.I
wanted to run each car in a separate thread.
However , after about 400 threads i am unable to
create new threads.
Here's the code:
>>> cars=range(1000)
>>
the point?
Shitiz
--- Shitiz Bansal <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am trying to build a traffic network simulator
> using
> python, for my degree project.
>
> I need to run at least 5-6000 cars simultaneously.I
> wanted to run each car in a separate threa
>
> Information is at www.stackless.com
>
> Hugo
>
> Shitiz Bansal wrote:
> > Hi,
> >
> > I am trying to build a traffic network simulator
> using
> > python, for my degree project.
> >
> > I need to run at least 5-6000 cars
> simultaneously
ating this HCF at
the beginning is not going to work.
Any comments?
--- Shitiz Bansal <[EMAIL PROTECTED]> wrote:
> Hi,
> Thanx everyone for all your suggestions.I used a
> separate thread for every car as I wanted my cars to
> run in real time, to coordinate effectively with
> 2. I got a while loop which does the port scan
> itself. How can I end
> it while its working ?
using the break statement anywhere inside the loop
will exit the loop.
> 3. For some reason the scan is too slow (2-3 seconds
> for a port). Is
> there a way to make it faster (other port scanner
>
--- Mark Kels <[EMAIL PROTECTED]> wrote:
> Can anyone give me a very simple example on thread
> programming ?
> I looked at some tutorials but they don't really
> make sense...
>
>
> Thanks in advance
> --
> 1. The day Microsoft makes something that doesn't
> suck is probably the
> day they st
Hi,
some questions need to be addressed.
First, is execution time a factor, bcos admittedly
python sols r much slowere than c/c++.
second, wats the exact conf of python installed on
machines checking our sols.
i.e. which modules r allowed n which r not.
shitiz
--- Sridhar <[EMAIL PROTECTED]> wrote:
le "", line 1, in -toplevel-
abcd
NameError: name 'abcd' is not defined
I am not very sure about the CPU usage of a stopped
thread.Perhaps someone from the group can enlighten
us.
Hope this makes it clear.
Cheers,
Shitiz
--- Mark Kels <[EMAIL PROTECTED]> wrote:
>
Hi,
Any body has any idea on how to implement a linked
list in python?
Ordinary python lists are not quite the same. what i
need is a list i can traverse through sequentially
without bothering about the indices, as another
process is continuously editing this list, by
inserting and deleting elemen
I could not understand what you exactly mean.
In order to explain wat my problem is, here is an
example code. Its not exactly what I am doing, I am
using multiple threads and a rather complicated code
so try and understand the sense rather than the code
itself.
>>> myls=range(50)
>>> for i in my
Got ya, it doesnt however help in my case as inside
the for loop also i intend to change the list
elements.
--- Kent Johnson <[EMAIL PROTECTED]> wrote:
> Shitiz Bansal wrote:
> > I could not understand what you exactly mean.
> >
> > In order to explain wat my problem
I faced the same problem once.Dont remember the
solution, but it is definitely the slashes which are
causing the problem.I couldnt find a specific rule in
whole of microsoft documentation, so i assume it has
to be hit and try.Try a mix of backslashes n forward
slashes till u get there.
Whats worse,
Hi,
How do i delete a class instance in a function running
within itself?
All the instances of the class are stored in a list,
and they need to be deleted after executing their
function.
However since the list is dynamic, there is no way to
know the exact position of the instance within the
list.
<[EMAIL PROTECTED]> wrote:
> Shitiz Bansal wrote:
> > Hi,
> > How do i delete a class instance in a function
> running
> > within itself?
> > All the instances of the class are stored in a
> list,
> > and they need to be deleted after executing thei
> In the code you have shown, I don't see any need for
> the queue. Just create the thread and start it.
> I don't think you have to keep a reference to it.
> I'm not sure, but I think the thread will be
> garbage collected when it completes. (Can anyone
> else confirm this?)
This does make se
--- Danny Yoo <[EMAIL PROTECTED]> wrote:
> Ok, this makes sense. Each passenger thread needs
> to know about the
> queue, because that's the place you want the
> passenger to drop out of.
>
> Lists support a 'remove()' method, so you may be
> able to use it.
Does it operate like queue.remove(s
Now this is so basic, i am feeling sheepish asking
about it.
I am outputting to the terminal, how do i use a print
command without making it jump no newline after
execution, which is the default behaviour in python.
To clarify:
print 1
print 2
print 3
I want output to be
123
whereas by default
Hi,
I need to program a web browser in python.I dont have any idea of how to start, what i do have is time and willingness to learn.Could anyone direct me to some suitable reference?
Shitiz__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam
Hi,
I actually want to create a web-browser on my own. There are so many changes i would like to see in my browser that i felt that i would be better of creating my own rather than trying to modify the existing ones.As for the size of project, I have been pursuing programming as a hobby for years
Hi,
Suppose i have a string '347 liverpool street'.
I want to remove all the numbers coming at the starting of the string.
I can think of a few ways but whats the cleanest way to do it?
Shitiz__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best
does this error make sense to anyone?
Traceback (most recent call last):
File "C:/Documents and
Settings/Administrator/Desktop/lkp.py", line 46, in
-toplevel-
s.sendmail(msg['From'], i, msg.as_string())
File "C:\Python24\lib\smtplib.py", line 692, in
sendmail
raise SMTPDataError(code,
Hi,
I want to update a textfile using the r+ file mode.
contents of file:
abcd
efgh
ijkl
mnop
qrst
uvwx
yx12
my scripts is:
file1=open("aa.txt",'r+')
file1.readline()
file1.readline()
file1.write("1234\n")
file1.close()
This should replace the third line with 1234.
However it does nothing.
Mor
<[EMAIL PROTECTED]> wrote:
At 01:11 AM 9/24/2005, Shitiz Bansal wrote:>Hi,>I want to update a textfile using the r+ file mode.>contents of file:>>abcd>efgh>ijkl>mnop>qrst>uvwx>yx12>>my scripts is:>>file1=open("aa.txt",'r+')&g
--- "Michael P. Reilly" <[EMAIL PROTECTED]> wrote:
> On 9/24/05, Shitiz Bansal <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > How do i proceed if i am not sure about the number
> of characters in the
> > fist two lines and want to write
x27;)
>>> file1.read()
'abcd\n1234\x08\nijkl\nmnop\nqrst\nuvwx\nyx12\n'
>>>
I find this very very strange.
shitiz.
--- "Michael P. Reilly" <[EMAIL PROTECTED]> wrote:
> On 9/27/05, Shitiz Bansal <[EMAIL PROTECTED]> wrote:
> >
> >
try:
import
except:
import
--- Ed Hotchkiss <[EMAIL PROTECTED]> wrote:
> i have a generic script that is using several
> modules on windows and linux
> boxes. i need to have the scripts test if a module
> is installed, and then if
> not - then to install the module. can anyone give m
Hi,
i have a string abc.
i need a file handle f pointing to a file which contains this string.
is there any way i can achieve this without actually writing the contents to a
file and then opening it? for performance reasons i want to run this entire
process within the physical memory!
Thanks,
S
Hi,
I am using beautiful soup for extracting links from a web page.
Most pages use relative links in their pages which is causing a problem. Is
there any library to extract complete links or do i have to parse this myself?
Thanks,
Shitiz
Terry Carroll <[EMAIL PROTECTED]> wrote: On Wed, 29 Nov
Thanks, urlparse.urljoin did the trick.
Akash- the problem with directly prefixing url to the link is that the url most
of the times contains not just the page address but also parameters and
fragments.
Andreas Kostyrka <[EMAIL PROTECTED]> wrote: * Akash [061129 20:54]:
> On 11/30/0
Hi,
I am using beautiful soup to get links from an html document.
I found that beautiful Soup changes the & in the links to & due to which
some of the links become unusable.
Is there any way I could stop this behaviour?
Regards,
Shitiz
-
Access over 1 million so
Hi,
I need to implement a system which stores Strings(average length 50 chars).
For every input String it would need to tell the user wether that string
already exists in the system. It would also need to add that input String to
the system if it did not exist. It will also be useful to know the
, this is bound to outperform
them.
It might be blasphemous to say this here but is there an equivalent c library
as I am willing to spend an extra amount of time coding for that extra zing in
performance.
Alan Gauld <[EMAIL PROTECTED]> wrote: "Shitiz Bansal" wrote
> I
41 matches
Mail list logo